The SaturationCalculator class holds the blood gas distribution model. More...
#include <Saturation.h>

Public Member Functions | |
virtual | ~SaturationCalculator () |
void | Initialize (SESubstanceManager &substances) |
void | SetBodyState (const SEScalarMassPerVolume &AlbuminConcentration, const SEScalarFraction &Hematocrit, const SEScalarTemperature &Temperature, const SEScalarAmountPerVolume &StrongIonDifference, const SEScalarAmountPerVolume &Phosphate) |
void | CalculateBloodGasDistribution (SELiquidCompartment &cmpt) |
Determines species distribution of oxygen and carbon dioxide in a vascular compartment. More... | |
void | CalculateCarbonMonoxideSpeciesDistribution (SELiquidCompartment &cmpt) |
Determines the carbon monoxide (CO) species distribution in a compartment and sets the CO saturation. More... | |
![]() | |
Loggable () | |
Loggable (Logger *log) | |
virtual | ~Loggable () |
virtual Logger * | GetLogger () const |
Protected Member Functions | |
SaturationCalculator (BioGears &bg) | |
void | CalculateHemoglobinSaturations (double O2PartialPressureGuess_mmHg, double CO2PartialPressureGuess_mmHg, double pH, double temperature_C, double hematocrit, double &OxygenSaturation, double &CarbonDioxideSaturation, double CO2_scaling_factor) |
Computes the percent saturation of hemoglobin by oxygen and carbon dioxide. More... | |
bool | DistributeHemoglobinBySaturation () |
Distributes hemoglobin species for a given pair of oxygen and carbon dioxide saturation fractions. More... | |
![]() | |
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 |
Static Protected Member Functions | |
static auto | make_unique (BioGears &bg) -> std::unique_ptr< SaturationCalculator > |
Protected Attributes | |
BioGears & | m_data |
SESubstance * | m_O2 |
SESubstance * | m_Hb |
SESubstance * | m_HbO2 |
SESubstance * | m_HbO2CO2 |
SESubstance * | m_CO2 |
SESubstance * | m_CO |
SESubstance * | m_HbCO |
SESubstance * | m_HCO3 |
SESubstance * | m_HbCO2 |
double | m_O2_g_Per_mol |
double | m_CO2_g_Per_mol |
double | m_HCO3_g_Per_mol |
double | m_Hb_g_Per_mol |
double | m_HbO2_g_Per_mol |
double | m_HbCO2_g_Per_mol |
double | m_HbO2CO2_g_Per_mol |
SELiquidCompartment * | m_cmpt |
SELiquidSubstanceQuantity * | m_subO2Q |
SELiquidSubstanceQuantity * | m_subCO2Q |
SELiquidSubstanceQuantity * | m_subCOQ |
SELiquidSubstanceQuantity * | m_subHbCOQ |
SELiquidSubstanceQuantity * | m_subHCO3Q |
SELiquidSubstanceQuantity * | m_subHbQ |
SELiquidSubstanceQuantity * | m_subHbO2Q |
SELiquidSubstanceQuantity * | m_subHbCO2Q |
SELiquidSubstanceQuantity * | m_subHbO2CO2Q |
double | m_albumin_g_per_L |
double | m_hematocrit |
double | m_temperature_C |
double | m_StrongIonDifference_mmol_Per_L |
double | m_Phosphate_mmol_Per_L |
![]() | |
Logger * | m_Logger |
Friends | |
struct | error_functor |
class | BioGears |
class | BioGearsEngineTest |
Additional Inherited Members | |
![]() | |
static const std::string | empty |
static const char * | empty_cStr |
Detailed Description
The SaturationCalculator class holds the blood gas distribution model.
Constructor & Destructor Documentation
|
protected |
|
virtual |
Member Function Documentation
void biogears::SaturationCalculator::CalculateBloodGasDistribution | ( | SELiquidCompartment & | cmpt | ) |
Determines species distribution of oxygen and carbon dioxide in a vascular compartment.
This method computes the distribution of dissolved and hemoglobin-bound oxygen and carbon dioxide in the blood and also the fraction of total carbon dioxide that is in bicarbonate form. The method uses the Eigen HybridNonLinearSolver to solve the system of equations described in bloodchemistry-approach.
void biogears::SaturationCalculator::CalculateCarbonMonoxideSpeciesDistribution | ( | SELiquidCompartment & | cmpt | ) |
Determines the carbon monoxide (CO) species distribution in a compartment and sets the CO saturation.
This method computes the fraction of hemoglobin that is bound with carbon monoxide (CO). Conservation of mass and the Haldane relationship described in [39] are used to compute the distribution of carbon monoxide species in a compartment. The hemoglobin available for oxygen binding is then decremented with the assumption that CO binds first to deoxyhemoglobin, then to oxyhemoglobin, then to oxycarbaminohemoglobin, and finally to carbaminohemoglobin. In binding to the relative hemoglobin species, CO converts the species to carboxyhemoglobin. Currently, the small mass of gas bound to the non-deoxy species is lost. This is a known limitation that does not affect the resultant steady-state gas distribution.
|
protected |
Computes the percent saturation of hemoglobin by oxygen and carbon dioxide.
This code is adapted directly from the model described in [58].
|
protected |
Distributes hemoglobin species for a given pair of oxygen and carbon dioxide saturation fractions.
Because oxycarbaminohemoglobin includes both oxygen and carbon dioxide, the species distribution of hemoglobins at a given fraction of O2 and CO2 saturation is an under-constrained problem. The method first attempts an assumed solution. If the assumed solution requires more hemoglobin than is available, the method steps towards a solution that minimizes total hemoglobin use.
void biogears::SaturationCalculator::Initialize | ( | SESubstanceManager & | substances | ) |
|
staticprotected |
void biogears::SaturationCalculator::SetBodyState | ( | const SEScalarMassPerVolume & | AlbuminConcentration, |
const SEScalarFraction & | Hematocrit, | ||
const SEScalarTemperature & | Temperature, | ||
const SEScalarAmountPerVolume & | StrongIonDifference, | ||
const SEScalarAmountPerVolume & | Phosphate | ||
) |
Friends And Related Function Documentation
|
friend |
|
friend |
|
friend |
Member Data Documentation
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |