Pulse adds COVID-19 Simulation Support
×

More...

#include <Gastrointestinal.h>

Inherits PulseGastrointestinalSystem.

Public Member Functions

virtual ~Gastrointestinal ()
 
void Clear ()
 
void Initialize ()
 Initializes system properties to valid homeostatic values. More...
 
void SetUp ()
 Initializes parameters for Gastrointestinal Class. More...
 
void AtSteadyState ()
 Do anything needed between stabilization. More...
 
void PreProcess ()
 Gastrointestinal Preprocess function. More...
 
void Process (bool solve_and_transport=true)
 Gastrointestinal Preprocess function. More...
 
void PostProcess (bool solve_and_transport=true)
 Gastrointestinal postprocess function. More...
 
- Public Member Functions inherited from PulseGastrointestinalSystem
 PulseGastrointestinalSystem (Logger *logger)
 
virtual ~PulseGastrointestinalSystem ()=default
 
virtual const SEScalarGetScalar (const std::string &name) override
 
- Public Member Functions inherited from SEGastrointestinalSystem
 SEGastrointestinalSystem (Logger *logger)
 
virtual ~SEGastrointestinalSystem ()
 
virtual bool HasWaterAbsorptionRate () const
 
virtual SEScalarVolumePerTimeGetWaterAbsorptionRate ()
 
virtual double GetWaterAbsorptionRate (const VolumePerTimeUnit &unit) const
 
virtual bool HasStomachContents () const
 
virtual SENutritionGetStomachContents ()
 
virtual const SENutritionGetStomachContents () const
 
virtual void RemoveStomachContents ()
 
- Public Member Functions inherited from SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
- Public Member Functions inherited from Loggable
 Loggable (Logger *logger=nullptr)
 
 Loggable (std::string const &logfile)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void SetLogger (Logger &logger)
 
virtual void Debug (std::string const &msg, std::string const &origin=empty) const
 
virtual void Debug (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Debug (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Info (std::string const &msg, std::string const &origin=empty) const
 
virtual void Info (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (const std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::string const &msg, std::string const &origin=empty) const
 
virtual void Warning (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Error (std::string const &msg, std::string const &origin=empty) const
 
virtual void Error (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Error (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::string const &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::ostream &msg, std::string const &origin=empty) const
 
std::string to_string (int i)
 
std::string to_string (unsigned int i)
 
std::string to_string (size_t t)
 
std::string to_string (float f)
 
std::string to_string (double d)
 

Protected Member Functions

 Gastrointestinal (PulseData &data)
 
void ComputeExposedModelParameters () override
 
void DefaultNutritionRates (SENutrition &n)
 If no substance rates are provided on meals (Action or Condition) use a default from configuration. More...
 
void DigestStomachNutrients (double duration_s)
 Digest substances based on our time step and transfer them to the Gut. More...
 
double DigestNutrient (SEUnitScalar &totalAmt, SEUnitScalar &rate, bool mass, double duration_s)
 Generic code for removal of an amout of a substance from the stomach based on rate and duration. More...
 

Protected Attributes

PulseDatam_data
 
SEFluidCircuitPathm_GItoCVPath
 
SEScalarMassPerTimem_CalciumDigestionRate
 
SEScalarVolumePerTimem_WaterDigestionRate
 
SELiquidCompartmentm_SmallIntestine
 
SELiquidSubstanceQuantitym_SmallIntestineGlucose
 
SELiquidSubstanceQuantitym_SmallIntestineTristearin
 
SELiquidSubstanceQuantitym_SmallIntestineCalcium
 
SELiquidSubstanceQuantitym_SmallIntestineSodium
 
SELiquidSubstanceQuantitym_SmallIntestineUrea
 
SELiquidCompartmentm_SmallIntestineChyme
 
bool m_ConsumeRate
 
double m_dT_s
 
- Protected Attributes inherited from SEGastrointestinalSystem
SEScalarVolumePerTimem_WaterAbsorptionRate
 
SENutritionm_StomachContents
 
- Protected Attributes inherited from SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Friends

class PulseData
 
class PBPulsePhysiology
 
class PulseEngineTest
 

Additional Inherited Members

- Static Public Member Functions inherited from SESystem
static const SEScalarGetScalar (const std::string &name, std::vector< SESystem *> *systems)
 
- Static Public Attributes inherited from Loggable
static const std::string empty
 

Detailed Description

Constructor & Destructor Documentation

◆ Gastrointestinal()

Gastrointestinal::Gastrointestinal ( PulseData data)
protected

◆ ~Gastrointestinal()

Gastrointestinal::~Gastrointestinal ( )
virtual

Member Function Documentation

◆ AtSteadyState()

void Gastrointestinal::AtSteadyState ( )
virtual

Do anything needed between stabilization.

At the end of resting stabilization we apply a ConsumeMeal condition to modify the body state if no condition is present we reset the body state substance levels to their original level

Implements PulseSystem.

◆ Clear()

void Gastrointestinal::Clear ( )
virtual

Reimplemented from SEGastrointestinalSystem.

◆ ComputeExposedModelParameters()

void Gastrointestinal::ComputeExposedModelParameters ( )
overrideprotectedvirtual

◆ DefaultNutritionRates()

void Gastrointestinal::DefaultNutritionRates ( SENutrition n)
protected

If no substance rates are provided on meals (Action or Condition) use a default from configuration.

◆ DigestNutrient()

double Gastrointestinal::DigestNutrient ( SEUnitScalar totalAmt,
SEUnitScalar rate,
bool  mass,
double  duration_s 
)
protected

Generic code for removal of an amout of a substance from the stomach based on rate and duration.

◆ DigestStomachNutrients()

void Gastrointestinal::DigestStomachNutrients ( double  duration_s)
protected

Digest substances based on our time step and transfer them to the Gut.

Each substance can provide a digestion rate, if none is provided a default will be used A portion of each substance is removed from the stomach based on time step and digestion rate The substance is then incremented into the Gut. Each substance can have it's own movement logic Water is also transfered to the Gut based on a constant rate

Todo:
Remove tuning factor and adjust protein to urea fraction following investigation

◆ Initialize()

void Gastrointestinal::Initialize ( )
virtual

Initializes system properties to valid homeostatic values.

For stabilization only! Called AFTER Setup when stabilizing a new patient

Reimplemented from PulseSystem.

◆ PostProcess()

void Gastrointestinal::PostProcess ( bool  solve_and_transport = true)
virtual

Gastrointestinal postprocess function.

The current Pulse implementation has no specific postprocess functionality.

Implements PulseSystem.

◆ PreProcess()

void Gastrointestinal::PreProcess ( )
virtual

Gastrointestinal Preprocess function.

Apply any meal consumtion actions Absorb fluids from the tissues back into the stomach so it always has fluid in it Digest substances based on our time step and transfer them to the Gut Absorb substances from the gut into the vascular system via the small intestine

Error:
Unable to read consume meal action file

Implements PulseSystem.

◆ Process()

void Gastrointestinal::Process ( bool  solve_and_transport = true)
virtual

Gastrointestinal Preprocess function.

The current Pulse implementation has no functionality in the process function for Gastrointestinal.

Implements PulseSystem.

◆ SetUp()

void Gastrointestinal::SetUp ( )
virtual

Initializes parameters for Gastrointestinal Class.

Called during both State loading and Patient Stabilization Pull and setup up our data (can be from other systems) Initialize will be called after this and can overwrite any of this data (only if stabilizing)

Implements PulseSystem.

Friends And Related Function Documentation

◆ PBPulsePhysiology

friend class PBPulsePhysiology
friend

◆ PulseData

friend class PulseData
friend

◆ PulseEngineTest

friend class PulseEngineTest
friend

Member Data Documentation

◆ m_CalciumDigestionRate

SEScalarMassPerTime* Gastrointestinal::m_CalciumDigestionRate
protected

◆ m_ConsumeRate

bool Gastrointestinal::m_ConsumeRate
protected

◆ m_data

PulseData& Gastrointestinal::m_data
protected

◆ m_dT_s

double Gastrointestinal::m_dT_s
protected

◆ m_GItoCVPath

SEFluidCircuitPath* Gastrointestinal::m_GItoCVPath
protected

◆ m_SmallIntestine

SELiquidCompartment* Gastrointestinal::m_SmallIntestine
protected

◆ m_SmallIntestineCalcium

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineCalcium
protected

◆ m_SmallIntestineChyme

SELiquidCompartment* Gastrointestinal::m_SmallIntestineChyme
protected

◆ m_SmallIntestineGlucose

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineGlucose
protected

◆ m_SmallIntestineSodium

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineSodium
protected

◆ m_SmallIntestineTristearin

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineTristearin
protected

◆ m_SmallIntestineUrea

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineUrea
protected

◆ m_WaterDigestionRate

SEScalarVolumePerTime* Gastrointestinal::m_WaterDigestionRate
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.