Commit 975ec87f authored by Aaron Bray's avatar Aaron Bray
Browse files

Disable CSF by default for now

parent edb2cea2
......@@ -121,7 +121,7 @@ PulseConfiguration::PulseConfiguration(Logger* logger) : SEEngineConfiguration(l
m_WaterDigestionRate = nullptr;
// Nervous
m_CerebrospinalFluidEnabled = eSwitch::On;
m_CerebrospinalFluidEnabled = eSwitch::Off;
m_BaroreceptorFeedback = eSwitch::On;
m_ChemoreceptorFeedback = eSwitch::On;
m_HeartElastanceDistributedTimeDelay = nullptr;
......@@ -255,7 +255,7 @@ void PulseConfiguration::Clear()
SAFE_DELETE(m_WaterDigestionRate);
// Nervous
m_CerebrospinalFluidEnabled = eSwitch::On;
m_CerebrospinalFluidEnabled = eSwitch::Off;
m_BaroreceptorFeedback = eSwitch::On;
m_ChemoreceptorFeedback = eSwitch::On;
SAFE_DELETE(m_HeartElastanceDistributedTimeDelay);
......@@ -412,7 +412,7 @@ void PulseConfiguration::Initialize(const std::string& dataDir, SESubstanceManag
GetWaterDigestionRate().SetValue(0.417, VolumePerTimeUnit::mL_Per_s);// Peronnet2012Pharmacokinetic, Estimated from 300mL H20 being absorbed in 9.5-12m
// Nervous
m_CerebrospinalFluidEnabled = eSwitch::On;
m_CerebrospinalFluidEnabled = eSwitch::Off;
m_BaroreceptorFeedback = eSwitch::On;
m_ChemoreceptorFeedback = eSwitch::On;
GetHeartElastanceDistributedTimeDelay().SetValue(20.0, TimeUnit::s);
......
......@@ -240,6 +240,8 @@ void PBPulseConfiguration::Serialize(const PULSE_BIND::ConfigurationData& src, P
if (src.has_nervousconfiguration())
{
const PULSE_BIND::ConfigurationData_NervousConfigurationData& config = src.nervousconfiguration();
if (config.enablecerebrospinalfluid() != CDM_BIND::eSwitch::NullSwitch)
dst.EnableCerebrospinalFluid((eSwitch)config.enablecerebrospinalfluid());
if (config.baroreceptorfeedback() != CDM_BIND::eSwitch::NullSwitch)
dst.SetBaroreceptorFeedback((eSwitch)config.baroreceptorfeedback());
if (config.chemoreceptorfeedback() != CDM_BIND::eSwitch::NullSwitch)
......@@ -492,6 +494,7 @@ void PBPulseConfiguration::Serialize(const PulseConfiguration& src, PULSE_BIND::
// Nervous
PULSE_BIND::ConfigurationData_NervousConfigurationData* n = dst.mutable_nervousconfiguration();
n->set_enablecerebrospinalfluid((CDM_BIND::eSwitch)src.m_CerebrospinalFluidEnabled);
n->set_baroreceptorfeedback((CDM_BIND::eSwitch)src.m_BaroreceptorFeedback);
n->set_chemoreceptorfeedback((CDM_BIND::eSwitch)src.m_ChemoreceptorFeedback);
if (src.HasHeartElastanceDistributedTimeDelay())
......
......@@ -49,6 +49,7 @@ Nervous::~Nervous()
void Nervous::Clear()
{
SENervousSystem::Clear();
m_CSFProductAbsorptionPath = nullptr;
}
//--------------------------------------------------------------------------------------------------
......@@ -114,8 +115,8 @@ void Nervous::SetUp()
m_NormalizedAlphaResistance = m_data.GetConfiguration().GetNormalizedResistanceSympatheticSlope();
m_NormalizedBetaHeartRate = m_data.GetConfiguration().GetNormalizedHeartRateParasympatheticSlope();
m_CSFProductAbsorptionPath = m_data.GetCircuits().GetActiveCardiovascularCircuit().GetPath(pulse::CerebrospinalFluidPath::GroundToIntracranialSpace1);
if(m_data.GetConfiguration().IsCerebrospinalFluidEnabled())
m_CSFProductAbsorptionPath = m_data.GetCircuits().GetActiveCardiovascularCircuit().GetPath(pulse::CerebrospinalFluidPath::GroundToIntracranialSpace1);
}
void Nervous::AtSteadyState()
......@@ -223,6 +224,8 @@ void Nervous::PostProcess(bool solve_and_transport)
//--------------------------------------------------------------------------------------------------
void Nervous::CerebralSpinalFluidUpdates()
{
if (!m_data.GetConfiguration().IsCerebrospinalFluidEnabled())
return;
//Update CSF Production and Absorption Rates
m_CSFProductAbsorptionPath->GetNextFlowSource().SetValue(m_CSFProductionRate_mlPermin - m_CSFAbsorptionRate_mLPermin, VolumePerTimeUnit::mL_Per_min);
}
......
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