More...

#include <Gastrointestinal.h>

Inherits SEGastrointestinalSystem, PulseGastrointestinalSystem, and PulseSystem.

Public Member Functions

virtual ~Gastrointestinal ()
 
void Clear ()
 
- Public Member Functions inherited from SEGastrointestinalSystem
 SEGastrointestinalSystem (Logger *logger)
 
virtual ~SEGastrointestinalSystem ()
 
virtual const SEScalarGetScalar (const std::string &name)
 
virtual bool HasChymeAbsorptionRate () const
 
virtual SEScalarVolumePerTimeGetChymeAbsorptionRate ()
 
virtual double GetChymeAbsorptionRate (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 ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
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
 

Protected Member Functions

 Gastrointestinal (PulseController &data)
 
void Initialize ()
 Initializes system properties to valid homeostatic values. More...
 
void SetUp ()
 
void AtSteadyState ()
 Do anything needed between stabilization. More...
 
void PreProcess ()
 Gastrointestinal Preprocess function. More...
 
void Process ()
 Gastrointestinal Preprocess function. More...
 
void PostProcess ()
 Gastrointestinal postprocess function. More...
 
void GastricSecretion (double duration_s)
 Absorb fluids from the tissues back into the stomach so it always has fluid in it. More...
 
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...
 
void AbsorbMeal (double duration_s)
 Absorb a meal over a specified lenth of time. More...
 
void AbsorbNutrients (double duration_s)
 Absorb substances from the gut into the vascular system via the small intestine. More...
 

Protected Attributes

PulseControllerm_data
 
SELiquidCompartmentm_SmallIntestineChyme
 
SELiquidSubstanceQuantitym_SmallIntestineChymeGlucose
 
SELiquidSubstanceQuantitym_SmallIntestineChymeTristearin
 
SELiquidSubstanceQuantitym_SmallIntestineChymeCalcium
 
SELiquidSubstanceQuantitym_SmallIntestineChymeSodium
 
SELiquidSubstanceQuantitym_SmallIntestineChymeUrea
 
SEFluidCircuitPathm_GItoCVPath
 
SEFluidCircuitPathm_GutT1ToGroundPath
 
SEScalarMassPerTimem_CalciumDigestionRate
 
SEScalarVolumePerTimem_WaterDigestionRate
 
std::map< SELiquidSubstanceQuantity *, double > m_InitialSubstanceMasses_ug
 
bool m_ConsumeRate
 
bool m_DecrementNutrients
 
double m_secretionRate_mL_Per_s
 
double m_dT_s
 
- Protected Attributes inherited from SEGastrointestinalSystem
SEScalarVolumePerTimem_ChymeAbsorptionRate
 
SENutritionm_StomachContents
 
- Protected Attributes inherited from SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Friends

class PBPulsePhysiology
 
class PulseController
 
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 ( PulseController data)
protected

◆ ~Gastrointestinal()

Gastrointestinal::~Gastrointestinal ( )
virtual

Member Function Documentation

◆ AbsorbMeal()

void Gastrointestinal::AbsorbMeal ( double  duration_min)
protected

Absorb a meal over a specified lenth of time.

This method supports the ConsumeMeal Condition, it will move the provied meal into the stomach Digest food for the specifed length of time and move it to the Gut, then calculate the amount of substance that would then have been absorbed from the Gut and distributes that mass throughout the body tissues

◆ AbsorbNutrients()

void Gastrointestinal::AbsorbNutrients ( double  duration_s)
protected

Absorb substances from the gut into the vascular system via the small intestine.

Move substances from the chyme system into the vascular system based on a rate that is a function of the sodium concentration in the body

◆ AtSteadyState()

void Gastrointestinal::AtSteadyState ( )
protectedvirtual

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

Reimplemented from PulseSystem.

◆ Clear()

void Gastrointestinal::Clear ( )
virtual

Reimplemented from SEGastrointestinalSystem.

◆ 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

◆ GastricSecretion()

void Gastrointestinal::GastricSecretion ( double  duration_s)
protected

Absorb fluids from the tissues back into the stomach so it always has fluid in it.

Fluid absorption is based on time step at a constant rate

◆ Initialize()

void Gastrointestinal::Initialize ( )
protectedvirtual

Initializes system properties to valid homeostatic values.

Reimplemented from PulseSystem.

◆ PostProcess()

void Gastrointestinal::PostProcess ( )
protectedvirtual

Gastrointestinal postprocess function.

The current Pulse implementation has no specific postprocess functionality.

Implements PulseSystem.

◆ PreProcess()

void Gastrointestinal::PreProcess ( )
protectedvirtual

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 ( )
protectedvirtual

Gastrointestinal Preprocess function.

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

Implements PulseSystem.

◆ SetUp()

void Gastrointestinal::SetUp ( )
protectedvirtual

Implements PulseSystem.

Friends And Related Function Documentation

◆ PBPulsePhysiology

friend class PBPulsePhysiology
friend

◆ PulseController

friend class PulseController
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

PulseController& Gastrointestinal::m_data
protected

◆ m_DecrementNutrients

bool Gastrointestinal::m_DecrementNutrients
protected

◆ m_dT_s

double Gastrointestinal::m_dT_s
protected

◆ m_GItoCVPath

SEFluidCircuitPath* Gastrointestinal::m_GItoCVPath
protected

◆ m_GutT1ToGroundPath

SEFluidCircuitPath* Gastrointestinal::m_GutT1ToGroundPath
protected

◆ m_InitialSubstanceMasses_ug

std::map<SELiquidSubstanceQuantity*, double> Gastrointestinal::m_InitialSubstanceMasses_ug
protected

◆ m_secretionRate_mL_Per_s

double Gastrointestinal::m_secretionRate_mL_Per_s
protected

◆ m_SmallIntestineChyme

SELiquidCompartment* Gastrointestinal::m_SmallIntestineChyme
protected

◆ m_SmallIntestineChymeCalcium

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineChymeCalcium
protected

◆ m_SmallIntestineChymeGlucose

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineChymeGlucose
protected

◆ m_SmallIntestineChymeSodium

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineChymeSodium
protected

◆ m_SmallIntestineChymeTristearin

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineChymeTristearin
protected

◆ m_SmallIntestineChymeUrea

SELiquidSubstanceQuantity* Gastrointestinal::m_SmallIntestineChymeUrea
protected

◆ m_WaterDigestionRate

SEScalarVolumePerTime* Gastrointestinal::m_WaterDigestionRate
protected