#*------------------------------------------------------------------- * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. * * This LIBRARY is free software; you can distribute it and/or modify * it under the therms of the ALSOC FREE LICENSE as available at * http://www.enq.ufrgs.br/alsoc. * * EMSO Copyright (C) 2004 - 2007 ALSOC, original code * from http://www.rps.eng.br Copyright (C) 2002-2004. * All rights reserved. * * EMSO is distributed under the therms of the ALSOC LICENSE as * available at http://www.enq.ufrgs.br/alsoc. * *-------------------------------------------------------------------- * Description of a flowsheet with only one cell based on the model * galvanic.model. * * Model of a falvanostatic charge/open-circuit/discharge process * Proposed by Wu and White, 2001 * This example is use to analize the convergence range of the * initialization algorithm. * *---------------------------------------------------------------------- * Author: Rafael de Pelegrini Soares * $Id: sample_galvanic.mso 83 2006-12-08 20:29:34Z paula $ *--------------------------------------------------------------------*# include "types"; FlowSheet cell PARAMETERS iapp; F as Real(Brief="Faraday constant"); R as Real(Brief="Ideal Gas constant"); T as Real(Brief="Temperature"); pho; W; V; phi1; phi2; i01; i02; VARIABLES y1 as current(Default=0.5, Brief="Mole fraction of NiOOH"); y2 as current(Default=0.5, Brief="Potential difference at the solid-liquid interface"); EQUATIONS #pho*V/W*$(y1) = j1/F; "Equation 1(a)" 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; "Equation 1(b)" i01*(2*(1-y1)*exp(0.5*F/(R*T)*(y2-phi1))-2*y1*exp(-0.5*F/(R*T)*(y2-phi1))) + i02*(exp(F/(R*T)*(y2-phi2))-exp(-F/(R*T)*(y2-phi2))) = iapp; #j1+j2 = iapp ; #j1 = i01*(2*(1-y1)*exp(0.5*F/R/T*(y2-phi1))-2*y1*exp(-0.5*F/R/T*(y2-phi1))); #j2 = i02*(exp(F/R/T*(y2-phi2))-exp(-F/R/T*(y2-phi2))); #limintes de convergência # -inf < y1 < inf # -2.70< y2 < 2.66 # #j1,j2 # SET F = 96487; R = 8.314; T = 298.15; pho= 3.4; W = 92.7; V = 1e-5; phi1 = 0.420; phi2 = 0.303; i01 = 1e-4; i02 = 1e-10; iapp = 1e-5; INITIAL #Parameters used for the initial conditions #y1 = 0.05; y2 = 0.38; OPTIONS time = [0:100:4000]; #integration time relativeAccuracy = 1e-5; #relative tolerance absoluteAccuracy = 1e-8; #absolute tolerance end