source: branches/gui/sample/miscellaneous/sample_galvanic.mso @ 740

Last change on this file since 740 was 574, checked in by Rafael de Pelegrini Soares, 15 years ago

Updated the models to work with some language constraints

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
RevLine 
[83]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 574 2008-07-25 14:18:50Z rafael $
27*--------------------------------------------------------------------*#
[1]28
[574]29using "types";
[1]30
31FlowSheet cell
32
33        PARAMETERS
34
35        iapp;
36        F as Real(Brief="Faraday constant");
37        R as Real(Brief="Ideal Gas constant");
38        T as Real(Brief="Temperature");
39
40        pho; W; V; phi1; phi2; i01; i02;
41
42
43        VARIABLES
44
[218]45        y1  as  Real(Default=0.5, Brief="Mole fraction of NiOOH");
46        y2  as  Real(Default=0.5, Brief="Potential difference at the solid-liquid interface");
[1]47
48
49        EQUATIONS
50
51        #pho*V/W*$(y1) = j1/F;
52       
53        "Equation 1(a)"
[218]54        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;
[1]55       
56        "Equation 1(b)"
57        i01*(2*(1-y1)*exp(0.5*F/(R*T)*(y2-phi1))-2*y1*exp(-0.5*F/(R*T)*(y2-phi1)))
58           + i02*(exp(F/(R*T)*(y2-phi2))-exp(-F/(R*T)*(y2-phi2))) = iapp;
59       
60         
[535]61        #j1+j2 = iapp;
[1]62        #j1 = i01*(2*(1-y1)*exp(0.5*F/R/T*(y2-phi1))-2*y1*exp(-0.5*F/R/T*(y2-phi1)));
63        #j2 = i02*(exp(F/R/T*(y2-phi2))-exp(-F/R/T*(y2-phi2)));
64
[535]65        #convergence limits
[1]66        # -inf < y1 < inf
67        # -2.70< y2 < 2.66
68
69
70        SET
71
72        F = 96487;
73        R = 8.314;
74        T = 298.15;
75        pho= 3.4;
76        W = 92.7;
77        V = 1e-5;
78        phi1 = 0.420;
79        phi2 = 0.303;
80        i01  = 1e-4;
81        i02  = 1e-10;
82        iapp = 1e-5;
83
84        INITIAL
85        #Parameters used for the initial conditions
86        #y1 = 0.05;
87        y2 = 0.38;
88
89
90        OPTIONS
[182]91        TimeStep = 100;
92        TimeEnd = 4000;
[1]93end
Note: See TracBrowser for help on using the repository browser.