Skip to content

Commit

Permalink
adding figures to user's guide
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekMatejak committed May 13, 2015
1 parent 6cc89fd commit 444d777
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Binary file modified Chemical/Resources/Documentation/User's Guide.docx
Binary file not shown.
16 changes: 8 additions & 8 deletions Chemical/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6078,8 +6078,8 @@ package Chemical "Library of Electro-Chemical models (chemical reactions, diffus
parameter Modelica.SIunits.MoleFraction xBuffered_start=1e-7
"Initial value of mole fraction of the buffered substance";

parameter Modelica.SIunits.AmountOfSubstance BufferValue(final unit="1") = 1
"Fixed buffer value (slope between amount of free substance (x*n) and -log10(x)) if useBufferValueInput=false"
parameter Modelica.SIunits.AmountOfSubstance BufferValue = 0.001
"Fixed buffer value (slope between amount of buffered substance and -log10(activity)) if useBufferValueInput=false"
annotation (HideResult=true, Dialog(enable=not useMoleFractionInput));

parameter Boolean useBufferValueInput = false
Expand Down Expand Up @@ -6118,7 +6118,7 @@ package Chemical "Library of Electro-Chemical models (chemical reactions, diffus

der(nBuffered) = port_a.q;
xBuffered = nBuffered/AmountOfSolution;
port_a.q = (AmountOfSolution/Tau)*(-xBuffered -log10(x)*bufferValue);
port_a.q = (AmountOfSolution/Tau)*(-xBuffered -log10(a)*bufferValue);

//solution properties at the port
temperature = Temperature;
Expand Down Expand Up @@ -6167,11 +6167,11 @@ package Chemical "Library of Electro-Chemical models (chemical reactions, diffus
"Source of substance bounded to constant amount of buffer to reach linear dependence between concentration and electrochemical potential"
extends Interfaces.PartialSubstanceInSolution;

parameter Modelica.SIunits.MoleFraction xBuffered_start=1e-7
parameter Modelica.SIunits.MoleFraction a_start=1e-7
"Initial value of mole fraction of the buffered substance";

parameter Modelica.SIunits.AmountOfSubstance BufferValue = 0.003
"Fixed buffer value (slope between amount of free substance (x*n) and -log10(x)) if useBufferValueInput=false"
parameter Modelica.SIunits.AmountOfSubstance BufferValue = 0.001
"Fixed buffer value (slope between amount of buffered substance and -log10(activity)) if useBufferValueInput=false"
annotation (HideResult=true, Dialog(enable=not useMoleFractionInput));

parameter Boolean useBufferValueInput = false
Expand All @@ -6195,15 +6195,15 @@ package Chemical "Library of Electro-Chemical models (chemical reactions, diffus
Modelica.SIunits.AmountOfSubstance nBuffered;
Modelica.SIunits.MoleFraction xBuffered;
initial equation
xBuffered = xBuffered_start;
xBuffered = log10(a)*(bufferValue/solution.n);
equation
if not useBufferValueInput then
bufferValue = BufferValue;
end if;

der(nBuffered) = port_a.q;
xBuffered = nBuffered/solution.n;
port_a.q = (solution.n/Tau)*(-xBuffered -log10(x)*(bufferValue/solution.n));
port_a.q = (solution.n/Tau)*(-xBuffered -log10(a)*(bufferValue/solution.n));

//solution properties at the port
/* temperature = Temperature;
Expand Down

0 comments on commit 444d777

Please sign in to comment.