Physiolibrary.Osmotic.Components

Information

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Physiolibrary.Osmotic.Components.OsmoticCell OsmoticCell Solvent container
Physiolibrary.Osmotic.Components.Membrane Membrane Solvent diffusion through semipermeable membrane
Physiolibrary.Osmotic.Components.SolventFlux SolventFlux Prescripted solvent flow
Physiolibrary.Osmotic.Components.IdealOverflowFiltration IdealOverflowFiltration Semipermeable membrane filtration (e.g. flux through capillary membrane) of overflowing solution (e.g. blood microcirculation)
Physiolibrary.Osmotic.Components.Reabsorption Reabsorption Divide inflow to outflow and reabsorption

Physiolibrary.Osmotic.Components.OsmoticCell Physiolibrary.Osmotic.Components.OsmoticCell

Solvent container

Physiolibrary.Osmotic.Components.OsmoticCell

Information

The liquid volume of the penetrating solution is accumulated in "OsmoticCell", where the nonpenetrating solutes are held. Instances of this class can represent both sides of the membrane, for example intracellular space, extracellular space, interstitial space, blood plasma or cerebrospinal fluid.

Extends from Icons.OsmoticCell, SteadyStates.Interfaces.SteadyState (Abstract class for any dynamic state calculation (for any derivation), which is driven by SimulationType option.).

Parameters

TypeNameDefaultDescription
IntegerNumberOfMembraneTypes1Membrane type is determined by membrane permeabilities for substances.
AmountOfSubstanceImpermeableSolutes[NumberOfMembraneTypes]zeros(NumberOfMembraneTypes)Amount of impermeable substance if useImpermeableSolutesInput=false [mol]
Initialization
Volumevolume_start0.001Initial volume of compartment [m3]
External inputs/outputs
BooleanuseImpermeableSolutesInputfalse=true, if impermeable substance amount as an input
IO
Functions to read or store
replaceable package UtilitiesTypes.FilesUtilities (direct...How to store or load the values
Initialization
Realstate_startvolume_startState start or init value
Value I/O
StringstoreUnit"mOsm/l"Unit in Utilities input/output function
StringstateNamegetInstanceName()Name in Utilities input/output function
BooleanLOAD_STARTSfalseLoad start value of state
BooleanSAVE_RESULTSfalseSave final state values
BooleanSAVE_COMPARISONfalseCompare final state values with original values
Equilibrium
Simulation
SimulationTypeSimulationTypes.SimulationType.NormalI...Dynamic with Initialization or Steady State
BooleanisDependentfalse=true, If zero flow is propagated in eqiulibrium through resistors, impedances, reactions, etc.

Connectors

TypeNameDescription
OsmoticPort_aq_in[NumberOfMembraneTypes]Flux to/from osmotic compartment
input AmountOfSubstanceInputimpermeableSolutes[NumberOfMembraneTypes]Amount of impermeable solutes in compartment [mol]
output VolumeOutputvolumeActual volume of compartment [m3]

Modelica definition

model OsmoticCell "Solvent container" extends Icons.OsmoticCell; extends SteadyStates.Interfaces.SteadyState( state_start=volume_start, storeUnit= "mOsm/l"); parameter Integer NumberOfMembraneTypes=1 "Membrane type is determined by membrane permeabilities for substances."; Interfaces.OsmoticPort_a q_in[NumberOfMembraneTypes] "Flux to/from osmotic compartment"; parameter Types.Volume volume_start = 0.001 "Initial volume of compartment"; parameter Boolean useImpermeableSolutesInput = false "=true, if impermeable substance amount as an input"; parameter Types.AmountOfSubstance ImpermeableSolutes[NumberOfMembraneTypes]=zeros(NumberOfMembraneTypes) "Amount of impermeable substance if useImpermeableSolutesInput=false"; Types.RealIO.AmountOfSubstanceInput impermeableSolutes[NumberOfMembraneTypes](start=ImpermeableSolutes)= is if useImpermeableSolutesInput "Amount of impermeable solutes in compartment"; Types.RealIO.VolumeOutput volume "Actual volume of compartment"; protected Types.AmountOfSubstance is[NumberOfMembraneTypes] "Current amount of impermeable solutes"; equation if not useImpermeableSolutesInput then is=ImpermeableSolutes; end if; q_in.o = is / volume; change = ones(NumberOfMembraneTypes) * q_in.q; //der(volume)=q_in.q state = volume; // assert(volume>=-Modelica.Constants.eps,"Collapsed cells by osmotic pressure are not supported!"); end OsmoticCell;

Physiolibrary.Osmotic.Components.Membrane Physiolibrary.Osmotic.Components.Membrane

Solvent diffusion through semipermeable membrane

Physiolibrary.Osmotic.Components.Membrane

Information

The main element of osmotic phenomena is a semipermeable membrane, which generates the flow of penetrating substances together with water. The connector on both sides is composed of molar concentration of non-penetrating solutes (osmolarity), and from penetrating volumetric flow (osmotic flux). Flow through the membrane depends on a pressure gradient, where pressure on both sides is calculated from the osmotic and hydraulic component.

Extends from Interfaces.OnePort (Osmotic one port), Icons.Membrane.

Parameters

TypeNameDefaultDescription
OsmoticPermeabilitycond1e-15Membrane permeability for solvent if useConductanceInput = false [m3/(Pa.s)]
PressureHydraulicPressureIn0Hydraulic pressure inside if useHydraulicPressureInputs=false [Pa]
PressureHydraulicPressureOut0Hydraulic pressure outside if useHydraulicPressureInputs=false [Pa]
TemperatureT310.15Temperature on both membrane sides if useTemperatureInputs=false [K]
External inputs/outputs
BooleanuseConductanceInputfalse=true, if membrane permeability input is used
BooleanuseHydraulicPressureInputsfalse=true, if hydraulic pressure inputs is used
BooleanuseTemperatureInputsfalse=true, if temperature on both sides is used

Connectors

TypeNameDescription
OsmoticPort_aq_inForward flux through membrane
OsmoticPort_bq_outBackward flux through membrane
input PressureInputhydraulicPressureIn[Pa]
input PressureInputhydraulicPressureOut[Pa]
input TemperatureInputtemperatureIn[K]
input TemperatureInputtemperatureOut[K]
input OsmoticPermeabilityInputconduction[m3/(Pa.s)]

Modelica definition

model Membrane "Solvent diffusion through semipermeable membrane" extends Interfaces.OnePort; extends Icons.Membrane; //Icons.Resistor; parameter Boolean useConductanceInput = false "=true, if membrane permeability input is used"; parameter Types.OsmoticPermeability cond=1e-15 "Membrane permeability for solvent if useConductanceInput = false"; parameter Boolean useHydraulicPressureInputs = false "=true, if hydraulic pressure inputs is used"; parameter Types.Pressure HydraulicPressureIn=0 "Hydraulic pressure inside if useHydraulicPressureInputs=false"; parameter Types.Pressure HydraulicPressureOut=0 "Hydraulic pressure outside if useHydraulicPressureInputs=false"; Types.RealIO.PressureInput hydraulicPressureIn(start=HydraulicPressureIn)=pi if useHydraulicPressureInputs; Types.RealIO.PressureInput hydraulicPressureOut(start=HydraulicPressureOut)=po if useHydraulicPressureInputs; parameter Boolean useTemperatureInputs = false "=true, if temperature on both sides is used"; parameter Types.Temperature T=310.15 "Temperature on both membrane sides if useTemperatureInputs=false"; Types.RealIO.TemperatureInput temperatureIn(start=T)=ti if useTemperatureInputs; Types.RealIO.TemperatureInput temperatureOut(start=T)=to if useTemperatureInputs; Types.OsmoticPermeability perm; Types.Pressure opi "osmotic pressure at q_in", opo "osmotic pressure at q_out"; protected Types.Pressure pi,po; Types.Temperature ti,to; public Types.RealIO.OsmoticPermeabilityInput conduction=perm if useConductanceInput; equation if not useHydraulicPressureInputs then pi=HydraulicPressureIn; po=HydraulicPressureOut; end if; if not useTemperatureInputs then ti=T; to=T; end if; if not useConductanceInput then cond=perm; end if; q_in.q = perm * ( (-po + q_out.o*(Modelica.Constants.R*to)) - (-pi + q_in.o*(Modelica.Constants.R*ti))); opi = q_in.o*(Modelica.Constants.R*ti); opo = q_out.o*(Modelica.Constants.R*to); end Membrane;

Physiolibrary.Osmotic.Components.SolventFlux Physiolibrary.Osmotic.Components.SolventFlux

Prescripted solvent flow

Physiolibrary.Osmotic.Components.SolventFlux

Information

Extends from Interfaces.OnePort (Osmotic one port), Hydraulic.Interfaces.ConditionalSolutionFlow (Input of solution volumetric flow vs. parametric solution volumetric flow).

Parameters

TypeNameDefaultDescription
VolumeFlowRateSolutionFlow0Volumetric flow of solution if useSolutionFlowInput=false [m3/s]
External inputs/outputs
BooleanuseSolutionFlowInputfalse=true, if solution flow input is used instead of parameter SolutionFlow

Connectors

TypeNameDescription
OsmoticPort_aq_inForward flux through membrane
OsmoticPort_bq_outBackward flux through membrane
input VolumeFlowRateInputsolutionFlow[m3/s]

Modelica definition

model SolventFlux "Prescripted solvent flow" extends Interfaces.OnePort; extends Hydraulic.Interfaces.ConditionalSolutionFlow; equation q_in.q = q; end SolventFlux;

Physiolibrary.Osmotic.Components.IdealOverflowFiltration Physiolibrary.Osmotic.Components.IdealOverflowFiltration

Semipermeable membrane filtration (e.g. flux through capillary membrane) of overflowing solution (e.g. blood microcirculation)

Physiolibrary.Osmotic.Components.IdealOverflowFiltration

Information

Bidirectional mass flow by concentration

Possible field values:

forward flow

backward flow

solutionFlow

>=0

<=0

q_in.q

=solutionFlow*q_in.conc

=-q_out.q

q_out.q

=-q_in.q

=solutionFlow*q_out.conc


Extends from Icons.FlowFiltration, Hydraulic.Interfaces.ConditionalSolutionFlow (Input of solution volumetric flow vs. parametric solution volumetric flow).

Parameters

TypeNameDefaultDescription
VolumeFlowRateSolutionFlow0Volumetric flow of solution if useSolutionFlowInput=false [m3/s]
PressureHydraulicPressureIn0Hydraulic pressure inside of leaving overflow (e.g. blood pressure after capillary net) if useHydraulicPressureInputs=false [Pa]
PressureHydraulicPressureOut0Hydraulic pressure outside (e.g. interstitium hydraulic pressure) if useHydraulicPressureInputs=false [Pa]
TemperatureT310.15Temperature on both membrane sides if useTemperatureInputs=false [K]
External inputs/outputs
BooleanuseSolutionFlowInputfalse=true, if solution flow input is used instead of parameter SolutionFlow
BooleanuseHydraulicPressureInputsfalse=true, if hydraulic pressure inputs is used
BooleanuseTemperatureInputsfalse=true, if temperature on both sides is used

Connectors

TypeNameDescription
input VolumeFlowRateInputsolutionFlow[m3/s]
OsmoticPort_aport_aInflowing ospomarity and positive filtrate flow rate (e.g. blood osmolarity and flux through capillary membrane from blood to interstitium)
OsmoticPort_bfiltrateOuter osmolarity and negative filtrate flow rate (e.g. interstitium osmolarity and flux through capillary membrane from interstitium to blood)
input PressureInputhydraulicPressureIn[Pa]
input PressureInputhydraulicPressureOut[Pa]
input TemperatureInputtemperature[K]

Modelica definition

model IdealOverflowFiltration "Semipermeable membrane filtration (e.g. flux through capillary membrane) of overflowing solution (e.g. blood microcirculation)" extends Icons.FlowFiltration; extends Hydraulic.Interfaces.ConditionalSolutionFlow; // "E.g. volumetric inflow to capilary net"; Interfaces.OsmoticPort_a port_a "Inflowing ospomarity and positive filtrate flow rate (e.g. blood osmolarity and flux through capillary membrane from blood to interstitium)"; Interfaces.OsmoticPort_b filtrate "Outer osmolarity and negative filtrate flow rate (e.g. interstitium osmolarity and flux through capillary membrane from interstitium to blood)"; parameter Boolean useHydraulicPressureInputs = false "=true, if hydraulic pressure inputs is used"; parameter Types.Pressure HydraulicPressureIn=0 "Hydraulic pressure inside of leaving overflow (e.g. blood pressure after capillary net) if useHydraulicPressureInputs=false"; parameter Types.Pressure HydraulicPressureOut=0 "Hydraulic pressure outside (e.g. interstitium hydraulic pressure) if useHydraulicPressureInputs=false"; Types.RealIO.PressureInput hydraulicPressureIn(start=HydraulicPressureIn)=pi if useHydraulicPressureInputs; Types.RealIO.PressureInput hydraulicPressureOut(start=HydraulicPressureOut)=po if useHydraulicPressureInputs; parameter Boolean useTemperatureInputs = false "=true, if temperature on both sides is used"; parameter Types.Temperature T=310.15 "Temperature on both membrane sides if useTemperatureInputs=false"; Types.RealIO.TemperatureInput temperature(start=T)=t if useTemperatureInputs; protected Types.Pressure pi,po; Types.Temperature t; Types.Osmolarity osmolarityO; equation if not useHydraulicPressureInputs then pi=HydraulicPressureIn; po=HydraulicPressureOut; end if; if not useTemperatureInputs then t=T; end if; port_a.q+filtrate.q=0; //flux through membrane pi - osmolarityO*Modelica.Constants.R*T = po - filtrate.o*Modelica.Constants.R*T; // venous and interstitium pressure is equilibrated port_a.o*q = osmolarityO*(q-port_a.q); //definition of venous osmolarity // port_a.o*q = (q-port_a.q)*filtrate.o; //equilibration without hydraulic part end IdealOverflowFiltration;

Physiolibrary.Osmotic.Components.Reabsorption Physiolibrary.Osmotic.Components.Reabsorption

Divide inflow to outflow and reabsorption

Physiolibrary.Osmotic.Components.Reabsorption

Information

Hydraulic Reabsorption

If useOutflowMin=false then the next schema is used.


If useOutflowMin=true then the extended schema is used:

Extends from Icons.Reabsorption.

Parameters

TypeNameDefaultDescription
VolumeFlowRateOutflowMin0Minimal outflow if useExternalOutflowMin=false [m3/s]
External inputs/outputs
BooleanuseExternalOutflowMinfalse=true, if minimal outflow is garanted

Connectors

TypeNameDescription
OsmoticPort_aInflow 
OsmoticPort_bOutflow 
OsmoticPort_bReabsorption 
input FractionInputFractReab[1]
input VolumeFlowRateInputoutflowMin[m3/s]

Modelica definition

model Reabsorption "Divide inflow to outflow and reabsorption" import Physiolibrary; extends Icons.Reabsorption; Interfaces.OsmoticPort_a Inflow; Interfaces.OsmoticPort_b Outflow; Interfaces.OsmoticPort_b Reabsorption; Types.RealIO.FractionInput FractReab; parameter Boolean useExternalOutflowMin = false "=true, if minimal outflow is garanted"; parameter Types.VolumeFlowRate OutflowMin = 0 "Minimal outflow if useExternalOutflowMin=false"; Types.RealIO.VolumeFlowRateInput outflowMin(start=OutflowMin) = om if useExternalOutflowMin; protected Types.VolumeFlowRate om; equation if not useExternalOutflowMin then om = OutflowMin; end if; Inflow.o = Outflow.o; 0 = Inflow.q + Outflow.q + Reabsorption.q; // assert(Inflow.q>=-Modelica.Constants.eps,"Only one directional flow is supported!"); Reabsorption.q = -max(0,FractReab*(Inflow.q-om)); end Reabsorption;

Automatically generated Tue Sep 15 22:56:39 2015.