|
static void | CalculateConcentration (const SEScalarMass &mass, const SEScalarVolume &volume, SEScalarMassPerVolume &concentration, Logger *logger=nullptr) |
| Calculates the concentration of a substance given mass and volume. concentration = mass / volume. More...
|
|
static void | CalculateMass (const SEScalarVolume &volume, const SEScalarMassPerVolume &concentration, SEScalarMass &mass, Logger *logger=nullptr) |
| Calculates the mass of a substance given concentration and volume. mass = concentration * volume. More...
|
|
static void | CalculateHenrysLawConcentration (const SESubstance &substance, const SEScalarPressure &partialPressure, SEScalarMassPerVolume &concentration, Logger *logger=nullptr) |
| Calculates the mass of a substance given concentration and volume. mass = concentration * volume. More...
|
|
static void | CalculatePartialPressureInGas (const SEScalarFraction &volumeFraction, const SEScalarPressure &pressure, SEScalarPressure &partialPressure, Logger *logger=nullptr) |
| Calculates the partial pressure of a substance in gas based on the volumeFraction * pressure. More...
|
|
static void | CalculatePartialPressureInLiquid (const SESubstance &substance, const SEScalarMassPerVolume &concentration, SEScalarPressure &partialPressure, Logger *logger=nullptr) |
| Calculates the partial pressure of a substance in liquid using (density and solubility coefficient) and the concentration. More...
|
|
static void | CalculateOsmolarity (const SEScalarAmountPerVolume &sodiumMolarity, const SEScalarAmountPerVolume &potassiumMolarity, const SEScalarAmountPerVolume &glucoseMolarity, const SEScalarAmountPerVolume &ureaMolarity, SEScalarOsmolarity &fluidOsmolarity) |
| [Bhagat1984CalculatedOsmolality] More...
|
|
static void | CalculateOsmolality (const SEScalarAmountPerVolume &sodiumMolarity, const SEScalarAmountPerVolume &potassiumMolarity, const SEScalarAmountPerVolume &glucoseMolarity, const SEScalarAmountPerVolume &ureaMolarity, const SEScalar &specificGravity, SEScalarOsmolality &fluidOsmolality) |
| [Bhagat1984CalculatedOsmolality] More...
|
|
static void | CalculateSpecificGravity (const SEScalarMass &mass, const SEScalarVolume &volume, SEScalar &specificGravity, Logger *logger=nullptr) |
|
static void | CalculateWaterDensity (const SEScalarTemperature &temp, SEScalarMassPerVolume &density) |
|
static void | Combinations (::std::vector< int > maxValues,::std::vector<::std::vector< int >> &permutations) |
|
static double | AntoineEquation (double dTemperature_C) |
|
static double | LinearInterpolator (double x1, double x2, double y1, double y2, double xPrime) |
| Performs linear interpolation between two points. More...
|
|
static double | PercentDifference (double expected, double calculated) |
|
static double | PercentTolerance (double expected, double calculated, double epsilon=1e-20) |
|
static double | ResistanceFunction (double dbase, double dmin, double dmax, double dx) |
| Returns y value for the specified exponential function given a normalized x value (0.0 to 1.0). More...
|
|
static double | LogisticFunction (double a, double x50, double k, double x) |
| A logistic function. More...
|
|
static double | CalculateNernstPotential (SELiquidCompartment &extra, SELiquidCompartment &intra, SESubstance *ion, double &coreTemp_K) |
| Calculates Nernst Potential. More...
|
|
static double | HillActivation (double x, double n, double h) |
|
static double | HillInhibition (double x, double n, double h) |
|
static double | VectorSum (std::vector< double > &vec) |
|
double biogears::GeneralMath::ResistanceFunction |
( |
double |
dbase, |
|
|
double |
dmin, |
|
|
double |
dmax, |
|
|
double |
dx |
|
) |
| |
|
static |
Returns y value for the specified exponential function given a normalized x value (0.0 to 1.0).
y = dbase ^ [(Log10(dmin/dmax) * x) + Log10(dmax)]
- Parameters
-
dbase | base value |
dmin | minimum |
dmax | maximum |
x | normalized x, 0.0 to 1.0 |
- Returns
- y
Exponential function used to model airflow resistance. Requires a base value for the function, a minimum y value (x = 0), and maximum y value (x = 1). Return the y value that maps to x.
Limitations:
- dmin > 0
- dmax > 0
- 0.0 <= dx <= 1.0
If any of the input variables fall outside the above bounds, the function returns NaN