source: trunk/sample/miscellaneous/sample_galvanic.mso @ 650

Last change on this file since 650 was 535, checked in by Argimiro Resende Secchi, 15 years ago

removing text.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*--------------------------------------------------------------------
16*  Description of a flowsheet with only one cell based on the model
17* galvanic.model.
18*
19* Model of a falvanostatic charge/open-circuit/discharge process
20* Proposed by Wu and White, 2001
21* This example is use to analize the convergence range of the
22* initialization algorithm.
23*
24*----------------------------------------------------------------------
25* Author: Rafael de Pelegrini Soares
26* $Id: sample_galvanic.mso 535 2008-06-12 21:44:29Z arge $
27*--------------------------------------------------------------------*#
28
29include "types";
30
31
32FlowSheet cell
33
34        PARAMETERS
35
36        iapp;
37        F as Real(Brief="Faraday constant");
38        R as Real(Brief="Ideal Gas constant");
39        T as Real(Brief="Temperature");
40
41        pho; W; V; phi1; phi2; i01; i02;
42
43
44        VARIABLES
45
46        y1  as  Real(Default=0.5, Brief="Mole fraction of NiOOH");
47        y2  as  Real(Default=0.5, Brief="Potential difference at the solid-liquid interface");
48
49
50        EQUATIONS
51
52        #pho*V/W*$(y1) = j1/F;
53       
54        "Equation 1(a)"
55        pho*V/W*diff(y1)*'s' = i01*(2*(1-y1)*exp(0.5*F/(R*T)*(y2-phi1))-2*y1*exp(-0.5*F/(R*T)*(y2-phi1)))/F;
56       
57        "Equation 1(b)"
58        i01*(2*(1-y1)*exp(0.5*F/(R*T)*(y2-phi1))-2*y1*exp(-0.5*F/(R*T)*(y2-phi1)))
59           + i02*(exp(F/(R*T)*(y2-phi2))-exp(-F/(R*T)*(y2-phi2))) = iapp;
60       
61         
62        #j1+j2 = iapp;
63        #j1 = i01*(2*(1-y1)*exp(0.5*F/R/T*(y2-phi1))-2*y1*exp(-0.5*F/R/T*(y2-phi1)));
64        #j2 = i02*(exp(F/R/T*(y2-phi2))-exp(-F/R/T*(y2-phi2)));
65
66        #convergence limits
67        # -inf < y1 < inf
68        # -2.70< y2 < 2.66
69
70
71        SET
72
73        F = 96487;
74        R = 8.314;
75        T = 298.15;
76        pho= 3.4;
77        W = 92.7;
78        V = 1e-5;
79        phi1 = 0.420;
80        phi2 = 0.303;
81        i01  = 1e-4;
82        i02  = 1e-10;
83        iapp = 1e-5;
84
85        INITIAL
86        #Parameters used for the initial conditions
87        #y1 = 0.05;
88        y2 = 0.38;
89
90
91        OPTIONS
92        TimeStep = 100;
93        TimeEnd = 4000;
94end
Note: See TracBrowser for help on using the repository browser.