Commit 2078c6bb authored by Jeff Webb's avatar Jeff Webb
Browse files

Fixed abdominal compliance setting to work properly when internal hemorrhages...

Fixed abdominal compliance setting to work properly when internal hemorrhages are turned off (i.e., rate = 0).
parent fc575a48
......@@ -1162,22 +1162,6 @@ void Cardiovascular::Hemorrhage()
internal_rate_mL_Per_s += hemorrhage->GetNextFlowSource().GetValue(VolumePerTimeUnit::mL_Per_s);
}
m_pGndToAbdominalCavity->GetNextFlowSource().SetValue(internal_rate_mL_Per_s, VolumePerTimeUnit::mL_Per_s);
double abdominalBloodVolume = m_AbdominalCavity->GetVolume().GetValue(VolumeUnit::mL);
double compliance_mL_Per_mmHg = 0;
double complianceSlopeParameter = 0.4;
double complianceCurveParameter = 0.55;
//Variable compliance calculation
if (internal_rate_mL_Per_s < 0.0001)
{
compliance_mL_Per_mmHg = m_pAbdominalCavityToGnd->GetNextCompliance().GetValue(FlowComplianceUnit::mL_Per_mmHg);
}
else
{
compliance_mL_Per_mmHg = complianceSlopeParameter / complianceCurveParameter * abdominalBloodVolume;
}
m_pAbdominalCavityToGnd->GetNextCompliance().SetValue(compliance_mL_Per_mmHg, FlowComplianceUnit::mL_Per_mmHg);
}
// Remove any invalid hemorrhages
......@@ -1204,6 +1188,15 @@ void Cardiovascular::Hemorrhage()
hIter++;
}
//Update abdominal cavity compliance
double abdominalBloodVolume = m_AbdominalCavity->GetVolume().GetValue(VolumeUnit::mL);
double compliance_mL_Per_mmHg = 0;
double complianceSlopeParameter = 0.4;
double complianceCurveParameter = 0.55;
//Variable compliance calculation
compliance_mL_Per_mmHg = complianceSlopeParameter / complianceCurveParameter * abdominalBloodVolume;
m_pAbdominalCavityToGnd->GetComplianceBaseline().SetValue(compliance_mL_Per_mmHg, FlowComplianceUnit::mL_Per_mmHg);
//Effect the Aorta with internal hemorrhages
InternalHemorrhagePressureApplication();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment