From 1ca847c0e24d07bbd0bbdd0d5363e067d33a8497 Mon Sep 17 00:00:00 2001 From: Marek Matejak Date: Tue, 10 Jun 2014 15:30:36 +0200 Subject: [PATCH] comments in Chemical.Components.Membrane --- Physiolibrary/Chemical.mo | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Physiolibrary/Chemical.mo b/Physiolibrary/Chemical.mo index 5195a27..b0824bc 100644 --- a/Physiolibrary/Chemical.mo +++ b/Physiolibrary/Chemical.mo @@ -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); @@ -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="

Filtration throught semipermeable membrane.