Skip to content

Commit

Permalink
solvent fractions for osmotic pressures for solutions with significan…
Browse files Browse the repository at this point in the history
…t volume amount of impermeable particles (e.g. intracellular fluid)
  • Loading branch information
MarekMatejak committed Apr 3, 2015
1 parent c889e3a commit 5fd64c0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Physiolibrary/Osmotic.mo
Expand Up @@ -404,6 +404,11 @@ package Osmotic "Domain with Osmorarity and Solvent Volumetric Flow"
"Temperature on both membrane sides if useTemperatureInputs=false"
annotation (Dialog(enable=not useTemperatureInputs));

parameter Types.Fraction solventFractionInside=1
"Free solvent fraction inside (i.e. water fraction in plasma=0.94, in cells=0.65)";
parameter Types.Fraction solventFractionOutside=1
"Free solvent fraction outside (i.e. water fraction in plasma=0.94, in cells=0.65)";

Types.RealIO.TemperatureInput temperatureIn(start=T)=ti if useTemperatureInputs annotation (Placement(
transformation(extent={{-20,-20},{20,20}},
rotation=90,
Expand Down Expand Up @@ -443,7 +448,10 @@ package Osmotic "Domain with Osmorarity and Solvent Volumetric Flow"
cond=perm;
end if;

q_in.q = perm * ( (-po + q_out.o*(Modelica.Constants.R*to)) - (-pi + q_in.o*(Modelica.Constants.R*ti)));
q_in.q = perm * ( (-po + q_out.o*(Modelica.Constants.R*to)*solventFractionOutside) - (-pi + q_in.o*(Modelica.Constants.R*ti)*solventFractionInside));
//OsmoticPressure*VolumeOfAveragePermeableParticle = -R*T*ln(MoleFractionOfPermeables) = -R*T*ln(1-MoleFractionOfImpermeables) =approx= R*T*MoleFractionOfImpermeables
// OsmoticPressure =approx= R*T*AmountOfImpermeables/((AmountOfPermeables+AmountOfImpermeables)*VolumeOfAveragePermeableParticle)
// solventFraction = VolumeOfSolvent/VolumeOfSolution =approx= ((AmountOfPermeables+AmountOfImpermeables)*VolumeOfAveragePermeableParticle)/VolumeOfSolution

opi = q_in.o*(Modelica.Constants.R*ti);
opo = q_out.o*(Modelica.Constants.R*to);
Expand Down

0 comments on commit 5fd64c0

Please sign in to comment.