Skip to content

Commit

Permalink
comments in Chemical.Components.Membrane
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekMatejak committed Jun 10, 2014
1 parent cab27bc commit 1ca847c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Physiolibrary/Chemical.mo
Expand Up @@ -2605,17 +2605,17 @@ It works in two modes:
p=Permeabilities;
end if;

kH = kH_T0 .* Modelica.Math.exp(C * (1/T_heatPort - 1/T0));
lossHeat = Modelica.Constants.R* C*particlesOutside.q; //negative = heat are comsumed when change from liquid to gas

//no accumulation of particles:
particlesInside.q + particlesOutside.q = zeros(NumberOfParticles); //nothing lost inside

//electroneutrality:
if abs(Charges.*Charges*p)<=Modelica.Constants.eps then
KAdjustment=0; //no penetrating electrolytes => KAdjustment and electroneutrality of flux is not needed
else
Charges*particlesInside.q = 0; //electroneutrality of flux through membrane
end if;

//diffusion, penetration, particle movement:
for i in 1:NumberOfParticles loop
if Charges[i]==0 then //normal diffusion
particlesInside[i].q = p[i] * (particlesInside[i].conc - kH[i]*particlesOutside[i].conc);
Expand All @@ -2626,6 +2626,10 @@ It works in two modes:
end if;
end for;

//different solubilities:
kH = kH_T0 .* Modelica.Math.exp(C * (1/T_heatPort - 1/T0));
lossHeat = Modelica.Constants.R* C*particlesOutside.q; //negative = heat are comsumed when change from liquid to gas

annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics), Documentation(info="<html>
<p><u><b><font style=\"color: #008000; \">Filtration throught semipermeable membrane.</font></b></u></p>
Expand Down

0 comments on commit 1ca847c

Please sign in to comment.