Commit 71aee7a6 authored by Aaron Bray's avatar Aaron Bray
Browse files

Updates for getting unit tests running again

FYI - RespiratoryDriver test is not working at this point
parent bb172182
......@@ -49,7 +49,7 @@ void SEGasCompartment::Balance(BalanceGasBy by)
else
{
subQ->GetVolumeFraction().SetValue(subQ->GetVolume(VolumeUnit::mL) / totalVolume_mL);
subQ->GetVolume().SetValue(subQ->GetVolumeFraction().GetValue() * GetVolume(VolumeUnit::mL), VolumeUnit::mL);
subQ->GetVolume().SetValue(subQ->GetVolumeFraction().GetValue() * GetVolume(VolumeUnit::mL), VolumeUnit::mL);
if(HasPressure())
GeneralMath::CalculatePartialPressureInGas(subQ->GetVolumeFraction(), GetPressure(), subQ->GetPartialPressure(), m_Logger);
}
......
......@@ -48,8 +48,18 @@ void SEGasSubstanceQuantity::Clear()
void SEGasSubstanceQuantity::SetToZero()
{
GetPartialPressure().SetValue(0, PressureUnit::mmHg);
GetVolume().SetValue(0, VolumeUnit::mL);
auto pp = GetPartialPressure();
if (pp.HasUnit())
pp.SetValue(0, *pp.GetUnit());
else
pp.SetValue(0, PressureUnit::mmHg);
auto vol = GetVolume();
if (vol.HasUnit())
vol.SetValue(0, *vol.GetUnit());
else
vol.SetValue(0, VolumeUnit::mL);
GetVolumeFraction().SetValue(0);
}
......
......@@ -85,16 +85,53 @@ void SELiquidSubstanceQuantity::Clear()
void SELiquidSubstanceQuantity::SetToZero()
{
GetConcentration().SetValue(0, MassPerVolumeUnit::mg_Per_mL);
GetMass().SetValue(0, MassUnit::mg);
GetMolarity().SetValue(0, AmountPerVolumeUnit::mmol_Per_mL);
auto c = GetConcentration();
if (c.HasUnit())
c.SetValue(0, *c.GetUnit());
else
c.SetValue(0, MassPerVolumeUnit::mg_Per_mL);
auto m = GetMass();
if (m.HasUnit())
m.SetValue(0, *m.GetUnit());
else
m.SetValue(0, MassUnit::mg);
auto mol = GetMolarity();
if (mol.HasUnit())
mol.SetValue(0, *mol.GetUnit());
else
mol.SetValue(0, AmountPerVolumeUnit::mmol_Per_mL);
if (m_Substance.GetState() == eSubstance_State::Gas)
GetPartialPressure().SetValue(0, PressureUnit::mmHg);
{
auto pp = GetPartialPressure();
if (pp.HasUnit())
pp.SetValue(0, *pp.GetUnit());
else
pp.SetValue(0, PressureUnit::mmHg);
}
if (m_isO2 || m_isCO || m_isCO2)
GetSaturation().SetValue(0);
GetMassCleared().SetValue(0, MassUnit::mg);
GetMassDeposited().SetValue(0, MassUnit::mg);
GetMassExcreted().SetValue(0, MassUnit::mg);
auto mc = GetMassCleared();
if (mc.HasUnit())
mc.SetValue(0, *mc.GetUnit());
else
mc.SetValue(0, MassUnit::mg);
auto md = GetMassDeposited();
if (md.HasUnit())
md.SetValue(0, *md.GetUnit());
else
md.SetValue(0, MassUnit::mg);
auto me = GetMassExcreted();
if (me.HasUnit())
me.SetValue(0, *me.GetUnit());
else
me.SetValue(0, MassUnit::mg);
}
const SEScalar* SELiquidSubstanceQuantity::GetScalar(const std::string& name)
......
......@@ -15,6 +15,10 @@ bool VolumePerPressureUnit::IsValidUnit(const std::string& unit)
return true;
if (L_Per_cmH2O.GetString().compare(unit) == 0)
return true;
if (m3_Per_Pa.GetString().compare(unit) == 0)
return true;
if (mL_Per_mmHg.GetString().compare(unit) == 0)
return true;
return false;
}
......@@ -24,6 +28,10 @@ const VolumePerPressureUnit& VolumePerPressureUnit::GetCompoundUnit(const std::s
return L_Per_Pa;
if (L_Per_cmH2O.GetString().compare(unit) == 0)
return L_Per_cmH2O;
if (m3_Per_Pa.GetString().compare(unit) == 0)
return m3_Per_Pa;
if (mL_Per_mmHg.GetString().compare(unit) == 0)
return mL_Per_mmHg;
std::stringstream err;
err << unit << " is not a valid VolumePerPressure unit";
throw CommonDataModelException(err.str());
......
......@@ -361,6 +361,9 @@ void DataTrack::Track(const std::string& name, double time, double value)
// Initialize any empty slots to NaN
for(unsigned int i=0; i<m_Time.size(); i++)
v->push_back(std::numeric_limits<double>::quiet_NaN());
// This output helps to see if something is added to the csv after initialization, who it is, to figure out why
//std::cout << "Adding vector for " << name << std::endl;
}
if(v->size()==0)
......@@ -542,6 +545,7 @@ void DataTrack::Track(double time_s, const SEThermalCircuit& c)
}
}
}
void DataTrack::Track(double time_s, const SEGasCompartmentGraph& graph, std::vector<SESubstance*>* substances)
{
for (SEGasCompartment* cmpt : graph.GetCompartments())
......@@ -580,6 +584,7 @@ void DataTrack::Track(double time_s, const SEGasCompartmentGraph& graph, std::ve
}
for (SEGasCompartmentLink* link : graph.GetLinks())
{
if (link->HasFlow())
{
auto unit = link->GetFlow().GetUnit();
......
......@@ -286,7 +286,7 @@ public class CSVContents
row=aLine2.split(",");
if(!this.headers.isEmpty()&&this.headers.size()!=row.length)
{
Log.error(this.resultsFile+" did not find the expected number of results on line, there is headers "+this.headers.size()+" and "+row.length+" on this row");
Log.error(this.resultsFile+" did not find the expected number of results on line, there are "+this.headers.size()+" headers and "+row.length+" data columns on this row");
}
return row;
}
......
......@@ -910,7 +910,6 @@ namespace pulse {
DEFINE_STATIC_STRING(Scrubber);
DEFINE_STATIC_STRING(Selector);
DEFINE_STATIC_STRING(Ventilator);
DEFINE_STATIC_STRING(VentilatorConnection);
DEFINE_STATIC_STRING(YPiece);
static const std::vector<std::string>& GetValues()
......@@ -927,7 +926,6 @@ namespace pulse {
_values.push_back(Scrubber);
_values.push_back(Selector);
_values.push_back(Ventilator);
_values.push_back(VentilatorConnection);
_values.push_back(YPiece);
}
return _values;
......@@ -939,11 +937,11 @@ namespace pulse {
class AnesthesiaMachineLink
{
public:
DEFINE_STATIC_STRING(EnvironmentToReliefValve);
DEFINE_STATIC_STRING(VentilatorToSelector);
DEFINE_STATIC_STRING(SelectorToReliefValve);
DEFINE_STATIC_STRING(SelectorToScrubber);
DEFINE_STATIC_STRING(ScrubberToGasInlet);
DEFINE_STATIC_STRING(Exhaust);
DEFINE_STATIC_STRING(GasSourceToGasInlet);
DEFINE_STATIC_STRING(GasInletToInspiratoryLimb);
DEFINE_STATIC_STRING(InspiratoryLimbToYPiece);
......@@ -951,18 +949,18 @@ namespace pulse {
DEFINE_STATIC_STRING(ExpiratoryLimbToSelector);
DEFINE_STATIC_STRING(YPieceToAnesthesiaConnection);
DEFINE_STATIC_STRING(AnesthesiaConnectionLeak);
DEFINE_STATIC_STRING(Mask);
DEFINE_STATIC_STRING(AnesthesiaConnectionToMouth);
static const std::vector<std::string>& GetValues()
{
ScopedMutex lock;
if (_values.empty())
{
_values.push_back(EnvironmentToReliefValve);
_values.push_back(VentilatorToSelector);
_values.push_back(SelectorToReliefValve);
_values.push_back(SelectorToScrubber);
_values.push_back(ScrubberToGasInlet);
_values.push_back(Exhaust);
_values.push_back(GasSourceToGasInlet);
_values.push_back(GasInletToInspiratoryLimb);
_values.push_back(InspiratoryLimbToYPiece);
......@@ -970,7 +968,7 @@ namespace pulse {
_values.push_back(ExpiratoryLimbToSelector);
_values.push_back(YPieceToAnesthesiaConnection);
_values.push_back(AnesthesiaConnectionLeak);
_values.push_back(Mask);
_values.push_back(AnesthesiaConnectionToMouth);
}
return _values;
}
......
......@@ -224,7 +224,6 @@ namespace pulse {
DEFINE_STATIC_STRING(ExpiratoryLimbToSelector);
DEFINE_STATIC_STRING(YPieceToAnesthesiaConnection);
DEFINE_STATIC_STRING(AnesthesiaConnectionToEnvironment);
DEFINE_STATIC_STRING(SelectorToEnvironment);
};
class CombinedAnesthesiaMachinePath
......
......@@ -4060,7 +4060,7 @@ void PulseController::SetupAnesthesiaMachine()
double dLowResistance = 0.01;
SEFluidCircuit& cAnesthesia = m_Circuits->GetAnesthesiaMachineCircuit();
SEFluidCircuitNode* Ambient = m_Circuits->GetFluidNode(pulse::EnvironmentNode::Ambient);
SEFluidCircuitNode* Ambient = m_Circuits->GetFluidNode(pulse::EnvironmentNode::Ambient);
cAnesthesia.AddNode(*Ambient);
////////////////
......@@ -4069,46 +4069,46 @@ void PulseController::SetupAnesthesiaMachine()
Ventilator.GetVolumeBaseline().SetValue(ventilatorVolume_L, VolumeUnit::L);
Ventilator.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
/////////////////
// ReliefValve //
// ReliefValve //
SEFluidCircuitNode& ReliefValve = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::ReliefValve);
ReliefValve.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
//////////////
// Selector //
// Selector //
SEFluidCircuitNode& Selector = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::Selector);
Selector.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
Selector.GetVolumeBaseline().SetValue(0.1, VolumeUnit::L);
//////////////
// Scrubber //
// Scrubber //
SEFluidCircuitNode& Scrubber = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::Scrubber);
Scrubber.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
Scrubber.GetVolumeBaseline().SetValue(0.1, VolumeUnit::L);
////////////
// YPiece //
// YPiece //
SEFluidCircuitNode& Ypiece = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::YPiece);
Ypiece.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
Ypiece.GetVolumeBaseline().SetValue(0.01, VolumeUnit::L);
//////////////
// GasInlet //
// GasInlet //
SEFluidCircuitNode& GasInlet = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::GasInlet);
GasInlet.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
GasInlet.GetVolumeBaseline().SetValue(0.1, VolumeUnit::L);
///////////////
// GasSource //
// GasSource //
SEFluidCircuitNode& GasSource = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::GasSource);
GasSource.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
GasSource.GetVolumeBaseline().SetValue(std::numeric_limits<double>::infinity(), VolumeUnit::mL);
//////////////////////////
// AnesthesiaConnection //
// AnesthesiaConnection //
SEFluidCircuitNode& AnesthesiaConnection = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::AnesthesiaConnection);
AnesthesiaConnection.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
AnesthesiaConnection.GetVolumeBaseline().SetValue(0.01, VolumeUnit::L);
/////////////////////
// InspiratoryLimb //
// InspiratoryLimb //
SEFluidCircuitNode& InspiratoryLimb = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::InspiratoryLimb);
InspiratoryLimb.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
InspiratoryLimb.GetVolumeBaseline().SetValue(0.1, VolumeUnit::L);
////////////////////
// ExpiratoryLimb //
// ExpiratoryLimb //
SEFluidCircuitNode& ExpiratoryLimb = cAnesthesia.CreateNode(pulse::AnesthesiaMachineNode::ExpiratoryLimb);
ExpiratoryLimb.GetPressure().SetValue(AmbientPresure, PressureUnit::cmH2O);
ExpiratoryLimb.GetVolumeBaseline().SetValue(0.1, VolumeUnit::L);
......@@ -4180,7 +4180,7 @@ void PulseController::SetupAnesthesiaMachine()
cCombinedAnesthesia.AddCircuit(cRespiratory);
cCombinedAnesthesia.AddCircuit(cAnesthesia);
SEFluidCircuitNode& Mouth = *cCombinedAnesthesia.GetNode(pulse::RespiratoryNode::Mouth);
SEFluidCircuitPath& AnesthesiaConnectionToMouth = cCombinedAnesthesia.CreatePath(AnesthesiaConnection, Mouth, "AnesthesiaConnectionToMouth");
SEFluidCircuitPath& AnesthesiaConnectionToMouth = cCombinedAnesthesia.CreatePath(AnesthesiaConnection, Mouth, pulse::CombinedAnesthesiaMachinePath::AnesthesiaConnectionToMouth);
cCombinedAnesthesia.RemovePath(pulse::RespiratoryPath::EnvironmentToMouth);
cCombinedAnesthesia.SetNextAndCurrentFromBaselines();
cCombinedAnesthesia.StateChange();
......@@ -4210,6 +4210,8 @@ void PulseController::SetupAnesthesiaMachine()
aYPiece.MapNode(Ypiece);
// Setup Links //
SEGasCompartmentLink& aEnvironmentToReliefValve = m_Compartments->CreateGasLink(*eEnvironment, aReliefValve, pulse::AnesthesiaMachineLink::EnvironmentToReliefValve);
aEnvironmentToReliefValve.MapPath(EnvironmentToReliefValve);
SEGasCompartmentLink& aVentilatorToSelector = m_Compartments->CreateGasLink(aVentilator, aSelector, pulse::AnesthesiaMachineLink::VentilatorToSelector);
aVentilatorToSelector.MapPath(VentilatorConnectionToSelector);
SEGasCompartmentLink& aSelectorToReliefValve = m_Compartments->CreateGasLink(aSelector, aReliefValve, pulse::AnesthesiaMachineLink::SelectorToReliefValve);
......@@ -4245,6 +4247,7 @@ void PulseController::SetupAnesthesiaMachine()
gAnesthesia.AddCompartment(aSelector);
gAnesthesia.AddCompartment(aVentilator);
gAnesthesia.AddCompartment(aYPiece);
gAnesthesia.AddLink(aEnvironmentToReliefValve);
gAnesthesia.AddLink(aVentilatorToSelector);
gAnesthesia.AddLink(aSelectorToReliefValve);
gAnesthesia.AddLink(aSelectorToScrubber);
......@@ -4261,14 +4264,14 @@ void PulseController::SetupAnesthesiaMachine()
//Now do the combined transport setup
// Grab the mouth from pulmonary
SEGasCompartment* pMouth = m_Compartments->GetGasCompartment(pulse::PulmonaryCompartment::Mouth);
SEGasCompartmentLink& aMask = m_Compartments->CreateGasLink(aAnesthesiaConnection, *pMouth, pulse::AnesthesiaMachineLink::Mask);
aMask.MapPath(AnesthesiaConnectionToMouth);
SEGasCompartmentLink& aAnesthesiaConnectionToMouth = m_Compartments->CreateGasLink(aAnesthesiaConnection, *pMouth, pulse::AnesthesiaMachineLink::AnesthesiaConnectionToMouth);
aAnesthesiaConnectionToMouth.MapPath(AnesthesiaConnectionToMouth);
SEGasCompartmentGraph& gCombinedRespiratoryAnesthesia = m_Compartments->GetRespiratoryAndAnesthesiaMachineGraph();
gCombinedRespiratoryAnesthesia.AddGraph(gRespiratory);
gCombinedRespiratoryAnesthesia.AddGraph(gAnesthesia);
gCombinedRespiratoryAnesthesia.RemoveLink(pulse::PulmonaryLink::EnvironmentToMouth);
gCombinedRespiratoryAnesthesia.AddLink(aMask);
gCombinedRespiratoryAnesthesia.AddLink(aAnesthesiaConnectionToMouth);
gCombinedRespiratoryAnesthesia.StateChange();
}
......
......@@ -78,7 +78,6 @@ void AnesthesiaMachine::Clear()
m_pInspiratoryLimbToYPiece = nullptr;
m_pSelectorToReliefValve = nullptr;
m_pEnvironmentToReliefValve = nullptr;
m_pSelectorToEnvironment = nullptr;
m_pEnvironmentToVentilator = nullptr;
m_pEnvironmentToGasSource = nullptr;
m_pVentilatorToSelector = nullptr;
......@@ -155,7 +154,6 @@ void AnesthesiaMachine::SetUp()
m_pInspiratoryLimbToYPiece = m_data.GetCircuits().GetAnesthesiaMachineCircuit().GetPath(pulse::AnesthesiaMachinePath::InspiratoryLimbToYPiece);
m_pSelectorToReliefValve = m_data.GetCircuits().GetAnesthesiaMachineCircuit().GetPath(pulse::AnesthesiaMachinePath::SelectorToReliefValve);
m_pEnvironmentToReliefValve = m_data.GetCircuits().GetAnesthesiaMachineCircuit().GetPath(pulse::AnesthesiaMachinePath::EnvironmentToReliefValve);
m_pSelectorToEnvironment = m_data.GetCircuits().GetAnesthesiaMachineCircuit().GetPath(pulse::AnesthesiaMachinePath::SelectorToEnvironment);
m_pEnvironmentToVentilator = m_data.GetCircuits().GetAnesthesiaMachineCircuit().GetPath(pulse::AnesthesiaMachinePath::EnvironmentToVentilator);
m_pExpiratoryLimbToSelector = m_data.GetCircuits().GetAnesthesiaMachineCircuit().GetPath(pulse::AnesthesiaMachinePath::ExpiratoryLimbToSelector);
m_pSelectorToScrubber = m_data.GetCircuits().GetAnesthesiaMachineCircuit().GetPath(pulse::AnesthesiaMachinePath::SelectorToScrubber);
......@@ -303,7 +301,7 @@ void AnesthesiaMachine::PreProcess()
CalculateVentilatorPressure();
CalculateGasSourceSubstances();
CalculateGasSourceResistance();
CheckReliefValve();
CheckReliefValve();
}
//--------------------------------------------------------------------------------------------------
......@@ -700,7 +698,7 @@ void AnesthesiaMachine::CalculateVentilatorPressure()
double severity = m_actions->GetVentilatorPressureLoss()->GetSeverity().GetValue();
dDriverPressure *= (1 - severity);
}
m_pEnvironmentToVentilator->GetNextPressureSource().SetValue(dDriverPressure, PressureUnit::cmH2O);
m_pEnvironmentToVentilator->GetNextPressureSource().SetValue(dDriverPressure, PressureUnit::cmH2O);
}
//--------------------------------------------------------------------------------------------------
......
......@@ -88,7 +88,6 @@ public:
SEFluidCircuitPath* m_pInspiratoryLimbToYPiece;
SEFluidCircuitPath* m_pSelectorToReliefValve;
SEFluidCircuitPath* m_pEnvironmentToReliefValve;
SEFluidCircuitPath* m_pSelectorToEnvironment;
SEFluidCircuitPath* m_pEnvironmentToVentilator;
SEFluidCircuitPath* m_pExpiratoryLimbToSelector;
SEFluidCircuitPath* m_pSelectorToScrubber;
......
......@@ -31,4 +31,6 @@ Macro EngineUnitTest=EngineUnitTestDriver FastPlot Baseline=unit_tests/pulse/ Co
Macro EngineUnitTestFull=EngineUnitTestDriver FullPlot Baseline=unit_tests/pulse/ Computed=./test_results/unit_tests/pulse
Macro ScenarioTest=ScenarioTestDriver FastPlot Baseline=scenarios/ Computed=./test_results/scenarios
patient/BasicStandard.json = ScenarioTest
#patient/BasicStandard.json = ScenarioTest
RespiratoryDriver = EngineUnitTest Results=RespiratoryDriverOutput
......@@ -44,9 +44,9 @@ int main(int argc, char* argv[])
//peTest.RenalUrinateTest(peDir);
//peTest.RespiratoryCircuitAndTransportTest(peDir);
//peTest.RespiratoryDriverTest(peDir);
peTest.RespiratoryDriverTest(peDir);
//peTest.AnesthesiaMachineCircuitAndTransportTest(peDir);
//peTest.RespiratoryWithAnesthesiaMachineCircuitAndTransportTest(peDir);
//peTest.RespiratoryWithAnesthesiaMachineCircuitAndTransportTest(peDir);
//peTest.RespiratoryWithInhalerCircuitAndTransportTest(peDir);
//peTest.RespiratoryWithMechanicalVentilatorCircuitAndTransportTest(peDir);
......@@ -135,7 +135,7 @@ int main(int argc, char* argv[])
//cdmTest.PreChargeComplianceNonZeroVolume(cdmDir);
//cdmTest.ComplianceVolumeChange(cdmDir);
//cdmTest.CircuitLockingTest(cdmDir);
cdmTest.ComplianceVolumeChange(cdmDir);
//cdmTest.ComplianceVolumeChange(cdmDir);
// Basic Circuit Tests
//cdmTest.BasicCircuitTest(cdmDir);
......
......@@ -115,12 +115,11 @@ void PulseEngineTest::AnesthesiaMachineCircuitAndTransportTest(RespiratoryConfig
SEFluidCircuitPath* EnvironmentToVentilatorPath = amCircuit->GetPath(pulse::AnesthesiaMachinePath::EnvironmentToVentilator);
SEFluidCircuitPath* EnvironmentToReliefValve = amCircuit->GetPath(pulse::AnesthesiaMachinePath::EnvironmentToReliefValve);
SEFluidCircuitPath* GasSourceToGasInlet = amCircuit->GetPath(pulse::AnesthesiaMachinePath::GasSourceToGasInlet);
SEFluidCircuitPath* SelectorToEnvironment = amCircuit->GetPath(pulse::AnesthesiaMachinePath::SelectorToEnvironment);
SEFluidCircuitPath* EnvironmentToGasSource = amCircuit->GetPath(pulse::AnesthesiaMachinePath::EnvironmentToGasSource);
SEGasTransporter txpt(VolumePerTimeUnit::L_Per_s, VolumeUnit::L, VolumeUnit::L, pc.GetLogger());
SEFluidCircuitCalculator calc(VolumePerPressureUnit::L_Per_cmH2O, VolumePerTimeUnit::L_Per_s, PressureTimeSquaredPerVolumeUnit::cmH2O_s2_Per_L, PressureUnit::cmH2O, VolumeUnit::L, PressureTimePerVolumeUnit::cmH2O_s_Per_L, pc.GetLogger());
//Execution parameters
double time = 0;
double deltaT_s = 1.0 / 90.0;
......@@ -138,12 +137,11 @@ void PulseEngineTest::AnesthesiaMachineCircuitAndTransportTest(RespiratoryConfig
//Set some constant elements - they're inside the loop to overwrite any baselines
EnvironmentToReliefValve->GetNextPressureSource().SetValue(100.0, PressureUnit::cmH2O);
GasSourceToGasInlet->GetNextFlowSource().SetValue(5.0, VolumePerTimeUnit::L_Per_min);
SelectorToEnvironment->GetNextFlowSource().SetValue(5.0, VolumePerTimeUnit::L_Per_min);
//Set the driver pressure
driverPressure_cmH2O = yOffset + amplitude_cmH2O * sin(alpha * time); //compute new pressure
EnvironmentToVentilatorPath->GetNextPressureSource().SetValue(driverPressure_cmH2O, PressureUnit::cmH2O);
//Process - Execute the circuit
calc.Process(*amCircuit, deltaT_s);
//Execute the substance transport function
......@@ -160,6 +158,7 @@ void PulseEngineTest::AnesthesiaMachineCircuitAndTransportTest(RespiratoryConfig
outTrkCircuit.CreateFile(std::string(sTestDirectory + sCircuitFileName).c_str(), fileCircuit);
outTrkGraph.CreateFile(std::string(sTestDirectory + sTransportFileName).c_str(), fileGraph);
}
outTrkCircuit.StreamTrackToFile(fileCircuit);
outTrkGraph.StreamTrackToFile(fileGraph);
}
......
Markdown is supported
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