More...

#include <Hepatic.h>

Inheritance diagram for biogears::Hepatic:

Public Member Functions

virtual ~Hepatic () override
 
const char * classname () const override
 
size_t hash_code () const override
 
void Clear () override
 
void Initialize () override
 Initializes system properties to valid homeostatic values. More...
 
virtual bool Load (const CDM::BioGearsHepaticSystemData &in)
 
virtual CDM::BioGearsHepaticSystemDataUnload () const override
 
SEScalarCalculateLiverSOFA ()
 
void AtSteadyState () override
 Determines if the engine is stable. More...
 
void PreProcess () override
 Preprocess function. More...
 
void Process () override
 Process function. More...
 
void PostProcess () override
 PostProcess function. More...
 
- Public Member Functions inherited from biogears::SEHepaticSystem
 SEHepaticSystem (Logger *logger)
 
 ~SEHepaticSystem () override
 
const SEScalarGetScalar (const char *name) override
 
const SEScalarGetScalar (const std::string &name) override
 
bool Load (const CDM::HepaticSystemData &in)
 
Tree< const char * > GetPhysiologyRequestGraph () const override
 
bool HasKetoneProductionRate () const
 
SEScalarAmountPerTimeGetKetoneProductionRate ()
 
double GetKetoneProductionRate (const AmountPerTimeUnit &unit) const
 
bool HasHepaticGluconeogenesisRate () const
 
SEScalarMassPerTimeGetHepaticGluconeogenesisRate ()
 
double GetHepaticGluconeogenesisRate (const MassPerTimeUnit &unit) const
 
- Public Member Functions inherited from biogears::SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
bool Load (const CDM::SystemData &in)
 
- Public Member Functions inherited from biogears::Loggable
 Loggable ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 

Static Public Member Functions

static size_t TypeHash ()
 
static constexpr char const *const TypeTag ()
 
static double CalculateRelativeHormoneChange (double insulinSetPoint_pmol_Per_L, double glucagonSetPoint_pg_Per_mL, SELiquidSubstanceQuantity *currentInsulin, SELiquidSubstanceQuantity *currentGlucagon, BioGears &m_data)
 Calculates the relative change in insulin to glucagon to determine direction of nutrient flow. More...
 
- Static Public Member Functions inherited from biogears::SEHepaticSystem
static size_t TypeHash ()
 
static constexpr char const *const TypeTag ()
 
- Static Public Member Functions inherited from biogears::SESystem
static const SEScalarGetScalar (const char *name, std::vector< SESystem * > *systems)
 
static const SEScalarGetScalar (const std::string &name, std::vector< SESystem * > *systems)
 

Protected Member Functions

 Hepatic (BioGears &bg)
 
virtual void Unload (CDM::BioGearsHepaticSystemData &data) const
 
void SetUp () override
 Initializes parameters for the Hepatic Class. More...
 
void ProduceAlbumin (double duration_s)
 Flat Rate production of albumin in the liver. More...
 
void Glycogenesis ()
 Removes excess glucose from blood to store as glycogen. More...
 
void Glycogenolysis ()
 Removes glucose from storage as glycogen and puts into blood. More...
 
void Lipogenesis ()
 Generation of new TAG from AA and glucose in times of excess. More...
 
void Gluconeogenesis ()
 The liver's process of generating new glucose from lactate, AA, and TAG. More...
 
- Protected Member Functions inherited from biogears::SEHepaticSystem
void Unload (CDM::HepaticSystemData &data) const
 
- Protected Member Functions inherited from biogears::SESystem
void Unload (CDM::SystemData &data) const
 
- Protected Member Functions inherited from biogears::Loggable
virtual void Debug (const char *msg, const char *origin="") const
 
virtual void Debug (const std::string &msg, const std::string &origin=empty) const
 
virtual void Debug (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Info (const char *msg, const char *origin="") const
 
virtual void Info (const std::string &msg, const std::string &origin=empty) const
 
virtual void Info (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Warning (const char *msg, const char *origin="") const
 
virtual void Warning (const std::string &msg, const std::string &origin=empty) const
 
virtual void Warning (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Error (const char *msg, const char *origin="") const
 
virtual void Error (const std::string msg, const std::string origin=empty) const
 
virtual void Error (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Fatal (const char *msg, const char *origin="") const
 
virtual void Fatal (const std::string &msg, const std::string &origin=empty) const
 
virtual void Fatal (std::ostream &msg, const std::string &origin=empty) const
 
- Protected Member Functions inherited from biogears::BioGearsSystem
virtual void LoadState ()
 

Static Protected Member Functions

static auto make_unique (BioGears &bg) -> std::unique_ptr< Hepatic >
 

Protected Attributes

BioGearsm_data
 
std::stringstream m_ss
 
double m_dt_s
 
double m_maxLiverGlycogen_g
 
double m_maxMuscleGlycogen_g
 
double m_AlbuminProdutionRate_g_Per_s
 
SELiquidSubstanceQuantitym_liverInsulin = nullptr
 
SELiquidSubstanceQuantitym_liverGlucagon = nullptr
 
SELiquidSubstanceQuantitym_liverVascularGlucose = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularGlucose = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularAA = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularTAG = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularUrea = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularLactate = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularO2 = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularCO2 = nullptr
 
SELiquidSubstanceQuantitym_liverExtracellularKetones = nullptr
 
SELiquidSubstanceQuantitym_muscleInsulin = nullptr
 
SELiquidSubstanceQuantitym_muscleGlucagon = nullptr
 
SELiquidSubstanceQuantitym_muscleVascularGlucose = nullptr
 
SELiquidSubstanceQuantitym_LiverTissueAlbumin = nullptr
 
SESubstancem_Glucagon
 
SESubstancem_Insulin
 
SESubstancem_Glucose
 
SESubstancem_AminoAcids
 
SESubstancem_Triacylglycerol
 
SESubstancem_Urea
 
SESubstancem_Lactate
 
SESubstancem_O2
 
SESubstancem_CO2
 
SESubstancem_Ketones
 
SESubstancem_Albumin
 
SETissueSystemm_tsu
 
SEEnergySystemm_energy
 
SEPatientm_Patient
 
- Protected Attributes inherited from biogears::SEHepaticSystem
SEScalarAmountPerTimem_KetoneProductionRate
 
SEScalarMassPerTimem_HepaticGluconeogenesisRate
 
- Protected Attributes inherited from biogears::SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from biogears::Loggable
Loggerm_Logger
 

Friends

class BioGears
 
class BioGearsEngineTest
 

Additional Inherited Members

- Static Public Attributes inherited from biogears::Loggable
static const std::string empty
 
static const char * empty_cStr
 

Detailed Description

Constructor & Destructor Documentation

biogears::Hepatic::Hepatic ( BioGears bg)
protected
biogears::Hepatic::~Hepatic ( )
overridevirtual

Member Function Documentation

void biogears::Hepatic::AtSteadyState ( )
overridevirtual

Determines if the engine is stable.

When the engine is stable, the CDM makes this call to update the member variable.

Reimplemented from biogears::BioGearsSystem.

SEScalar & biogears::Hepatic::CalculateLiverSOFA ( )
double biogears::Hepatic::CalculateRelativeHormoneChange ( double  insulinSetPoint_pmol_Per_L,
double  glucagonSetPoint_pg_Per_mL,
SELiquidSubstanceQuantity currentInsulin,
SELiquidSubstanceQuantity currentGlucagon,
BioGears m_data 
)
static

Calculates the relative change in insulin to glucagon to determine direction of nutrient flow.

Calculate a percent deviation from given insulin and glucagon set points, then return the relative deviation in insulin. So, if a positive number is returned, insulin increased more than glucagon did, and vice versa. A zero value means insulin and glucagon didn't change or stayed the same relative to each other.

const char* biogears::Hepatic::classname ( ) const
inlineoverridevirtual

Reimplemented from biogears::SEHepaticSystem.

void biogears::Hepatic::Clear ( )
overridevirtual

Reimplemented from biogears::SEHepaticSystem.

void biogears::Hepatic::Gluconeogenesis ( )
protected

The liver's process of generating new glucose from lactate, AA, and TAG.

During times of low insulin vs. glucagon, the liver recombines lactate into glucose, deaminates and combines AA to make glucose, and splits TAG to make the glycogen backbone into glucose. Fat breakdown results in ketones. These are energy and O2 consuming processes.

void biogears::Hepatic::Glycogenesis ( )
protected

Removes excess glucose from blood to store as glycogen.

Uses relative changes in insulin and glucagon to determine if new glycogen should be generated from blood glucose. There is no glycogen substance, so store off glucose in a Hepatic member variable.

void biogears::Hepatic::Glycogenolysis ( )
protected

Removes glucose from storage as glycogen and puts into blood.

Uses relative changes in insulin and glucagon to determine if glycogen should be broken down to glucose and moved to bloodstream.

size_t biogears::Hepatic::hash_code ( ) const
inlineoverridevirtual

Reimplemented from biogears::SEHepaticSystem.

void biogears::Hepatic::Initialize ( )
overridevirtual

Initializes system properties to valid homeostatic values.

[90]

[30]

Reimplemented from biogears::BioGearsSystem.

void biogears::Hepatic::Lipogenesis ( )
protected

Generation of new TAG from AA and glucose in times of excess.

Triacylglycerol is generated from excess glucose or amino acids. The amounts of each substance that are converted to TAG depend on the relative concentrations of those substances in the liver. Lipogenesis is an ATP-consuming process, but we assume that energy consumption is rolled into BMR.

bool biogears::Hepatic::Load ( const CDM::BioGearsHepaticSystemData in)
virtual
auto biogears::Hepatic::make_unique ( BioGears bg) -> std::unique_ptr<Hepatic>
staticprotected
void biogears::Hepatic::PostProcess ( )
overridevirtual

PostProcess function.

Implements biogears::BioGearsSystem.

void biogears::Hepatic::PreProcess ( )
overridevirtual

Preprocess function.

Implements biogears::BioGearsSystem.

void biogears::Hepatic::Process ( )
overridevirtual

Process function.

Implements biogears::BioGearsSystem.

void biogears::Hepatic::ProduceAlbumin ( double  duration_s)
protected

Flat Rate production of albumin in the liver.

Parameters
duration_sTime period for production of albumin in seconds.

The mass of albumin to produce is calculated from a flat rate production value and the time passed. This mass is added to the liver. The rate is currently specified as .15 mg/s as found in [153]

void biogears::Hepatic::SetUp ( )
overrideprotectedvirtual

Initializes parameters for the Hepatic Class.

Initializes member variables and system level values on the common data model.

[153]

Implements biogears::BioGearsSystem.

static size_t biogears::Hepatic::TypeHash ( )
inlinestatic
static constexpr char const* const biogears::Hepatic::TypeTag ( )
inlinestatic
CDM::BioGearsHepaticSystemData * biogears::Hepatic::Unload ( ) const
overridevirtual

Reimplemented from biogears::SEHepaticSystem.

void biogears::Hepatic::Unload ( CDM::BioGearsHepaticSystemData data) const
protectedvirtual

Friends And Related Function Documentation

friend class BioGears
friend
friend class BioGearsEngineTest
friend

Member Data Documentation

SESubstance* biogears::Hepatic::m_Albumin
protected
double biogears::Hepatic::m_AlbuminProdutionRate_g_Per_s
protected
SESubstance* biogears::Hepatic::m_AminoAcids
protected
SESubstance* biogears::Hepatic::m_CO2
protected
BioGears& biogears::Hepatic::m_data
protected
double biogears::Hepatic::m_dt_s
protected
SEEnergySystem* biogears::Hepatic::m_energy
protected
SESubstance* biogears::Hepatic::m_Glucagon
protected
SESubstance* biogears::Hepatic::m_Glucose
protected
SESubstance* biogears::Hepatic::m_Insulin
protected
SESubstance* biogears::Hepatic::m_Ketones
protected
SESubstance* biogears::Hepatic::m_Lactate
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularAA = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularCO2 = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularGlucose = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularKetones = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularLactate = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularO2 = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularTAG = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverExtracellularUrea = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverGlucagon = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverInsulin = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_LiverTissueAlbumin = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_liverVascularGlucose = nullptr
protected
double biogears::Hepatic::m_maxLiverGlycogen_g
protected
double biogears::Hepatic::m_maxMuscleGlycogen_g
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_muscleGlucagon = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_muscleInsulin = nullptr
protected
SELiquidSubstanceQuantity* biogears::Hepatic::m_muscleVascularGlucose = nullptr
protected
SESubstance* biogears::Hepatic::m_O2
protected
SEPatient* biogears::Hepatic::m_Patient
protected
std::stringstream biogears::Hepatic::m_ss
protected
SESubstance* biogears::Hepatic::m_Triacylglycerol
protected
SETissueSystem* biogears::Hepatic::m_tsu
protected
SESubstance* biogears::Hepatic::m_Urea
protected