#include <Renal.h>
Classes | |
struct | ActiveTransport |
Static Public Member Functions | |
static size_t | TypeHash () |
static constexpr char const *const | TypeTag () |
Static Public Member Functions inherited from biogears::SERenalSystem | |
static size_t | TypeHash () |
static constexpr char const *const | TypeTag () |
Static Public Member Functions inherited from biogears::SESystem | |
static const SEScalar * | GetScalar (const char *name, std::vector< SESystem * > *systems) |
static const SEScalar * | GetScalar (const std::string &name, std::vector< SESystem * > *systems) |
Protected Member Functions | |
Renal (BioGears &bg) | |
virtual void | Unload (CDM::BioGearsRenalSystemData &data) const |
void | SetUp () override |
void | CalculateFilterability (SESubstance &sub) |
Determines filterability for a substance. More... | |
void | CalculateUltrafiltrationFeedback () |
Adjusts filtration rate of fluid. More... | |
void | CalculateColloidOsmoticPressure (SEScalarMassPerVolume &albuminConcentration, SEScalarPressure &osmoticPressure) |
Calculates and sets osmotic pressure. More... | |
void | CalculateReabsorptionFeedback () |
Calculates changes in fluid reabsorption. More... | |
void | CalculateOsmoreceptorFeedback () |
Modifies permeability of the tubules. More... | |
void | CalculateFluidPermeability () |
Modifies the tubule fluid permeability as a function of arterial pressure. More... | |
void | CalculateTubuloglomerularFeedback () |
Modifies the afferent resistance due to TGF. More... | |
void | UpdateBladderVolume () |
Manually increments/decrements bladder volume. More... | |
void | ProcessActions () |
Executes renal actions. More... | |
void | Urinate () |
Empties the bladder of fluid and substances. More... | |
void | CalculateActiveTransport () |
Calls the necessary transport methodology for each substance. More... | |
void | CalculateGlomerularTransport (SESubstance &sub) |
Determines filtered mass flow. More... | |
void | CalculateReabsorptionTransport (SESubstance &sub) |
Calculates reabsorption mass flow. More... | |
void | CalculateSecretion () |
Determines secretion of substance from peritubular capillaries to ureter. More... | |
void | CalculateExcretion (SESubstance &sub) |
Calculates mass excreted for a substance. More... | |
void | CalculateAutomaticClearance (SESubstance &sub) |
Clears substances from the body. More... | |
void | CalculateGluconeogenesis () |
Turns cleared lactate into glucose. More... | |
void | CalculateVitalSigns () |
Sets all of the system outputs calculated in the renal system. More... | |
void | ProcessOverride () |
determine override requirements from user defined inputs More... | |
void | OverrideControlLoop () |
Protected Member Functions inherited from biogears::SERenalSystem | |
void | Unload (CDM::RenalSystemData &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< Renal > |
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
|
protected |
|
overridevirtual |
Member Function Documentation
|
overridevirtual |
Calls any functions to be run after stabilization.
- Parameters
-
type Which version of stabilization has finished
After stabilization is completed, the renal system resets the bladder contents to clear out any errant values that may occur during stabilization. When the consume meal condition is available, the renal system will adjust blood contents as necessary via calculate substance state.
Reimplemented from biogears::BioGearsSystem.
|
protected |
Calls the necessary transport methodology for each substance.
BioGears has two types of renal substance handling, Regulation and Clearance. Clearance is generally used for drugs, but can be specified for any substance. It does not support calculating filtration, reabsorption and excretion, but rather determines how much mass should be excreted as urine based on preset parameters. Regulation is used to model filtration, reabsorption and excretion. This function also calculates average clearance rates for substances to be used in the consume meal condition.
- Error:
- Fatal: Unrecognized renal clearance type
|
protected |
Clears substances from the body.
This function calculates how much of each substance to remove via the kidneys. Drugs are removed from the tissue compartment in keeping with the PK methodology, while the remaining substances are cleared directly from the vascular compartments. The removed mass of the substance is then added to the bladder compartment and the total body mass of the substance is adjusted accordingly.
|
protected |
Calculates and sets osmotic pressure.
- Parameters
-
albuminConcentration The concentration of albumin (protein) in the fluid osmoticPressure The current osmotic pressure of the fluid
The Landis-Pappenheimer equation is used to determine and set the colloid osmotic pressure of a fluid.
|
protected |
Calculates mass excreted for a substance.
- Parameters
-
sub Substance to be calculated
This function calculates the mass flow from the tubules to the bladder for each substance. It also back calculates the renal clearance rate for the substance.
|
protected |
Determines filterability for a substance.
- Parameters
-
sub Substance to be calculated
This function calculates the filterability for a substance based on its molar mass and charge. the calculation for filterability derives from a curve fit set to curves in [375] .
|
protected |
Modifies the tubule fluid permeability as a function of arterial pressure.
A rise in arterial pressure results in an increase in fluid permeability of the tubules. As arterial pressure rises
|
protected |
Determines filtered mass flow.
- Parameters
-
sub Substance to be calculated
This function calculates how much mass of a substance makes it through the glomerular capillaries to the Bowman's space. It does this based on the fluid flow, the filterability of the substance and the fraction unbound in plasma.
|
protected |
Turns cleared lactate into glucose.
This function performs the renal contribution to gluconeogenesis. The lactate is converted at a 1 to 1 mass ratio into glucose. This will effectively remove all lactate from the urine up until the transport maximum. If the converted mass exceeds the transport maximum, it is capped at the max and the remainder continues to the urine.
|
protected |
Modifies permeability of the tubules.
This function modifies the permeability of the tubules based on plasma sodium. The plasma sodium is representative of the plasma osmolarity. As the concentration of sodium rises, the osmoreceptors attempt to reabsorb more fluid to offset the rising sodium. The inverse occurs when the sodium concentration is low.
- Todo:
- get the aorta osmolarity instead of sodium concentration
|
protected |
Calculates changes in fluid reabsorption.
This function determines the feedback on reabsorption from changes in oncotic pressure, permeability or the surface area of the renal tubules.
- Todo:
- turn on colloid osmotic pressure once substances have been handled properly (and GI)
|
protected |
Calculates reabsorption mass flow.
- Parameters
-
sub Substance to be calculated
This function determines how much of a substance is reabsorbed each time step. This is primarily determined through the fluid flow and reabsorption ratio set in the substance file. If the reabsorbed mass exceeds the transport maximum, the reabsorbed mass is capped at the max and the remainder continues to the bladder.
SEScalar & biogears::Renal::CalculateRenalSOFA | ( | ) |
|
protected |
Determines secretion of substance from peritubular capillaries to ureter.
- Parameters
-
sub Substance to be secreted
This function calculates how much of a substance is secreted into the distal tubules and collecting ducts from the peritubular capillaries in the Kidney. We allow this process to take place after reabsorption and place the substance directly into the ureter node as a means to simulate the distal and collecting ducts.
|
protected |
Modifies the afferent resistance due to TGF.
Updates the afferent resistance as a function of sodium delivery into the tubules node. This function drives the afferent resistance along the proper path as a response to increased or decreased sodium delivery.
|
protected |
Adjusts filtration rate of fluid.
This function adjusts the filtration resistance of the glomerular capillaries based on any changes in permeability or glomerular capillary surface area. CalculateColloidOsmoticPressure is then called to adjust the pressure gradient from the glomerular capillaries to the bowman's space.
- Todo:
- turn on colloid osmotic pressure once substances have been handled properly (and GI)
bool biogears::Renal::CalculateUrinalysis | ( | SEUrinalysis & | u | ) |
Calculates the urinalysis outputs.
- Parameters
-
u urinalysis assessment
- Returns
- returns true upon the successful calculation of the urinalysis outputs
This function calculates the outputs requested from the urinalysis assessment. Currently only color, glucose, ketones, specific gravity, blood and protein are supported. Specific gravity is pulled directly from the renal system data and color is derived from the osmolality system data. The others are true/false outputs that are set based on the urine concentrations of various substances.
[roxe1990urinalysis]
[roxe1990urinalysis]
[roxe1990urinalysis]
[roxe1990urinalysis]
|
protected |
Sets all of the system outputs calculated in the renal system.
This function calculates the Urine's volume, specific gravity, osmolarity, osmolality and production rate. It also calculates the creatinine clearance rate from the m_CreatinineMassCleared_ug member variable.
[175] 2.5 mL/min
- Event:
- Patient: Ends when the urine production rate falls below 1.0 mL/min (near normal urine production). [175]
[375] p. 116 urine osmolarity must be hyperosmotic relative to plasma and urine production rate must be less than 0.5 mL/min
- Event:
- Patient: Antidiuresis occurs when urine production rate is less than 0.5 mL/min and the urine osmolarity is hyperosmotic to the plasma [375]
- Event:
- Patient: Antidiuresis. Ends when urine production rate rises back above 0.55 mL/min or the urine osmolarity falls below that of the plasma [375]
[Zager1988HypoperfusionRate] Computing percent decrease as (1-1.6/11.2)*100 = 85 percent decrease or 15% total flow (using 20ml/s as "normal" value, below 3ml/s):
- Event:
- Patient: hypoperfusion occurs when renal blood flow decreases below 3 ml/s
- Event:
- Patient: hypoperfusion ends when blood flow recovers above 4 ml/s
[226] 1:6 ratio for sodium excretion in pressure natriuresis in rats, validation for sodium excretion = 2.4 mg/min
- Event:
- Patient: Natriuresis. Occurs when the sodium excretion rate rises above 14.4 mg/min [moss2013hormonal]
- Event:
- Patient: Ends when the sodium excretion rate falls below 14.0 mg/min [moss2013hormonal]
|
inlineoverridevirtual |
Reimplemented from biogears::SERenalSystem.
|
overridevirtual |
Reimplemented from biogears::SERenalSystem.
|
inlineoverridevirtual |
Reimplemented from biogears::SERenalSystem.
|
overridevirtual |
Initializes system properties to valid homeostatic values.
Reimplemented from biogears::BioGearsSystem.
|
virtual |
|
protected |
|
overridevirtual |
Conducts the post processing for the renal system.
The renal circuit post processing occurs with the cardiovascular system's post process. There is currently no other functionality needed for renal post process.
Implements biogears::BioGearsSystem.
|
overridevirtual |
The calculations to prepare the renal system for the circuit to be processed.
Renal preprocess prepares the circuit components and the clearance rates. The substance clearance rates are initialized to the values defined in BioGears.xlsx so all calculations are relative to the initial values. Then clearance rate adjustments occur for specific substances. The circuit is adjusted to adjust urine production rate and to maintain the glomerular pressure, and the urinate function is called in the case of an overfull bladder or a urinate action.
Implements biogears::BioGearsSystem.
|
overridevirtual |
Conducts the substance transport for renal.
The renal system must run its substance transport independently from the circuit calculations, which occur in Cardiovascular::Process. This series of functions clears all of the necessary substances to the bladder, restores bicarbonate if necessary and calculates the renal systemic outputs.
Implements biogears::BioGearsSystem.
|
protected |
Executes renal actions.
This function is called to run through all renal actions in the event that one has been called. Currently the only renal action is Urinate.
|
protected |
determine override requirements from user defined inputs
User specified override outputs that are specific to the cardiovascular system are implemented here. If overrides aren't present for this system then this function will not be called during preprocess.
|
overrideprotectedvirtual |
Implements biogears::BioGearsSystem.
|
inlinestatic |
|
inlinestatic |
|
overridevirtual |
Reimplemented from biogears::SERenalSystem.
|
protectedvirtual |
|
protected |
Manually increments/decrements bladder volume.
The current renal model does not use a compliance to represent the bladder. This function therefore sums the inflow and outflow to the bladder node each time step and updates the bladder volume accordingly.
- Todo:
- Eventually replace this entire thing with a compliance and model peristaltic flow
|
protected |
Empties the bladder of fluid and substances.
Urination empties the bladder.This can be called as an action or will automatically occur if the bladder volume exceeds the maximum volume. Currently the outflow portion is disabled due to a bug in the generic transporter. This has been replaced by setting the bladder volume and substance quantities to 1 mL & 0 ug respectively.
- Event:
- Patient: FunctionalIncontinence: The patient's bladder has reached a maximum
Friends And Related Function Documentation
|
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 |
|
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 |
|
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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |