Last change
on this file since 1 was
1,
checked in by Rafael de Pelegrini Soares, 16 years ago

Initial import of the library


Property svn:eolstyle set to
native

Property svn:keywords set to
Id

File size:
1.6 KB

Rev  Line  

[1]  1  # Sample file of E·M·SO (TM) 

 2  # 

 3  # Description of a flowsheet with only one cell based on the model 

 4  # galvanic.model. 

 5  # 

 6  

 7  # Author : Rafael de Pelegrini Soares 

 8  # Date : 15aug2002 

 9  

 10  

 11  # 

 12  # Model of a falvanostatic charge/opencircuit/discharge process 

 13  # Proposed by Wu and White, 2001 

 14  # This example is use to analize the convergence range of the 

 15  # initialization algorithm. 

 16  

 17  include "types"; 

 18  

 19  

 20  FlowSheet cell 

 21  

 22  PARAMETERS 

 23  

 24  iapp; 

 25  F as Real(Brief="Faraday constant"); 

 26  R as Real(Brief="Ideal Gas constant"); 

 27  T as Real(Brief="Temperature"); 

 28  

 29  pho; W; V; phi1; phi2; i01; i02; 

 30  

 31  

 32  VARIABLES 

 33  

 34  y1 as current(Default=0.5, Brief="Mole fraction of NiOOH"); 

 35  y2 as current(Default=0.5, Brief="Potential difference at the solidliquid interface"); 

 36  

 37  

 38  EQUATIONS 

 39  

 40  #pho*V/W*$(y1) = j1/F; 

 41  

 42  "Equation 1(a)" 

 43  pho*V/W*diff(y1) = i01*(2*(1y1)*exp(0.5*F/(R*T)*(y2phi1))2*y1*exp(0.5*F/(R*T)*(y2phi1)))/F; 

 44  

 45  "Equation 1(b)" 

 46  i01*(2*(1y1)*exp(0.5*F/(R*T)*(y2phi1))2*y1*exp(0.5*F/(R*T)*(y2phi1))) 

 47  + i02*(exp(F/(R*T)*(y2phi2))exp(F/(R*T)*(y2phi2))) = iapp; 

 48  

 49  

 50  #j1+j2 = iapp ; 

 51  #j1 = i01*(2*(1y1)*exp(0.5*F/R/T*(y2phi1))2*y1*exp(0.5*F/R/T*(y2phi1))); 

 52  #j2 = i02*(exp(F/R/T*(y2phi2))exp(F/R/T*(y2phi2))); 

 53  

 54  #limintes de convergência 

 55  # inf < y1 < inf 

 56  # 2.70< y2 < 2.66 

 57  

 58  # 

 59  #j1,j2 

 60  # 

 61  

 62  

 63  SET 

 64  

 65  F = 96487; 

 66  R = 8.314; 

 67  T = 298.15; 

 68  pho= 3.4; 

 69  W = 92.7; 

 70  V = 1e5; 

 71  phi1 = 0.420; 

 72  phi2 = 0.303; 

 73  i01 = 1e4; 

 74  i02 = 1e10; 

 75  iapp = 1e5; 

 76  

 77  INITIAL 

 78  #Parameters used for the initial conditions 

 79  #y1 = 0.05; 

 80  y2 = 0.38; 

 81  

 82  

 83  OPTIONS 

 84  time = [0:100:4000]; #integration time 

 85  relativeAccuracy = 1e5; #relative tolerance 

 86  absoluteAccuracy = 1e8; #absolute tolerance 

 87  end 

Note: See
TracBrowser
for help on using the repository browser.