Skip to content

Commit

Permalink
add: minimal collapsing pressure for elastic vessel compartment
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekMatejak committed Oct 7, 2014
1 parent 95265ad commit e79ab45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Physiolibrary/Hydraulic.mo
Expand Up @@ -425,6 +425,7 @@ package Hydraulic "Domain with Pressure and Volumetric Flow"
"External pressure. Set zero if internal pressure is relative to external. Valid only if useExternalPressureInput=false."
annotation (Dialog(enable=not useExternalPressureInput));

parameter Types.Pressure MinimalCollapsingPressure = -101325;
Types.RealIO.PressureInput externalPressure(start=ExternalPressure) = ep if useExternalPressureInput
annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
Expand All @@ -440,6 +441,7 @@ package Hydraulic "Domain with Pressure and Volumetric Flow"
Types.Volume zpv;
Types.HydraulicCompliance c;
Types.Pressure ep;
parameter Types.Pressure a=MinimalCollapsingPressure/log(Modelica.Constants.eps);

equation
if not useV0Input then
Expand All @@ -458,7 +460,7 @@ package Hydraulic "Domain with Pressure and Volumetric Flow"
then
excessVolume/c + ep
else
log(max(Modelica.Constants.eps,volume/CollapsingPressureVolume)));
a*log(max(Modelica.Constants.eps,volume/CollapsingPressureVolume)));
//then: normal physiological state
//else: abnormal collapsing state

Expand Down

0 comments on commit e79ab45

Please sign in to comment.