source: mso/sample/miscellaneous/sample_galvanic.mso @ 113

Last change on this file since 113 was 83, checked in by Paula Bettio Staudt, 16 years ago

Updated miscelaneous sample files header

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 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 83 2006-12-08 20:29:34Z paula $
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  current(Default=0.5, Brief="Mole fraction of NiOOH");
47        y2  as  current(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) = 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        #limintes de convergência
67        # -inf < y1 < inf
68        # -2.70< y2 < 2.66
69
70        #
71        #j1,j2
72        #
73
74
75        SET
76
77        F = 96487;
78        R = 8.314;
79        T = 298.15;
80        pho= 3.4;
81        W = 92.7;
82        V = 1e-5;
83        phi1 = 0.420;
84        phi2 = 0.303;
85        i01  = 1e-4;
86        i02  = 1e-10;
87        iapp = 1e-5;
88
89        INITIAL
90        #Parameters used for the initial conditions
91        #y1 = 0.05;
92        y2 = 0.38;
93
94
95        OPTIONS
96        time = [0:100:4000]; #integration time
97        relativeAccuracy = 1e-5; #relative tolerance
98        absoluteAccuracy = 1e-8; #absolute tolerance
99end
Note: See TracBrowser for help on using the repository browser.