Implementation of Discretizer for the internal energy form of the energy equation.
More...
#include <internalenergy.hpp>
|
| InternalEnergyDiscretizer (const arma::uword nGridPoints) |
| Constructor. Calls Discretizer constructor with nEquations = 3. More...
|
|
virtual void | discretize (const arma::uword dt, const Pipeline ¤tState, const Pipeline &newState) override |
| Discretize implementation. Calculates the coefficients of the discretized governing equations, with the internal energy form of the energy equation. More...
|
|
void | discretizeFromPrimitives (const arma::uword dt, const arma::vec &diameter, const arma::vec &height, const arma::vec &gridPoints, const arma::vec ¤tSpecificGasConstant, const arma::vec ¤tMassFlow, const arma::vec ¤tPressure, const arma::vec ¤tTemperature, const arma::vec &guessMassFlow, const arma::vec &guessPressure, const arma::vec &guessTemperature, const arma::vec &guessFriction, const arma::vec &guessHeatCapacityConstantVolume, const arma::vec &guessHeatFlux, const arma::vec &guessDensity, const arma::vec &guessCompressibilityFactor, const arma::vec &guess_dZdT_p, const arma::vec &guess_dZdp, const arma::vec &guess_dZdT_rho) |
| Calculates the coefficients of the discretized governing equations, with the internal energy form of the energy equation, and stores the result in Discretizer::m_term_i, Discretizer::m_term_ipp and Discretizer::m_boundaryTerm. More...
|
|
virtual | ~Discretizer () |
|
| Discretizer (const arma::uword nGridPoints, const arma::uword nEquationsAndVariables) |
| Construct from number of grid points and number of equations and variables. More...
|
|
const arma::cube & | term_i () const |
| Get coefficients of \(y_i\).
|
|
const arma::cube & | term_ipp () const |
| Get coefficients of \(y_{i+1}\).
|
|
const arma::mat & | boundaryTerms () const |
| Get constant terms.
|
|
|
arma::cube | m_term_i |
| The coefficients of \(y_i\) in the discretized governing equations. More...
|
|
arma::cube | m_term_ipp |
| The coefficients of \(y_i\) in the discretized governing equations. More...
|
|
arma::mat | m_boundaryTerm |
| The constant/known terms in the discretized governing equations. More...
|
|
double | m_gravity = 9.81 |
| Gravity.
|
|
Implementation of Discretizer for the internal energy form of the energy equation.
◆ InternalEnergyDiscretizer()
InternalEnergyDiscretizer::InternalEnergyDiscretizer |
( |
const arma::uword |
nGridPoints | ) |
|
|
explicit |
Constructor. Calls Discretizer constructor with nEquations = 3.
- Parameters
-
nGridPoints | Number of grid points |
◆ discretize()
virtual void InternalEnergyDiscretizer::discretize |
( |
const arma::uword |
dt, |
|
|
const Pipeline & |
currentState, |
|
|
const Pipeline & |
newState |
|
) |
| |
|
overridevirtual |
Discretize implementation. Calculates the coefficients of the discretized governing equations, with the internal energy form of the energy equation.
This is just a wrapper around discretizeFromPrimitives().
- Parameters
-
dt | Time step [s] |
currentState | Current pipeline state |
newState | New/guess pipeline state |
Implements Discretizer.
◆ discretizeFromPrimitives()
void InternalEnergyDiscretizer::discretizeFromPrimitives |
( |
const arma::uword |
dt, |
|
|
const arma::vec & |
diameter, |
|
|
const arma::vec & |
height, |
|
|
const arma::vec & |
gridPoints, |
|
|
const arma::vec & |
currentSpecificGasConstant, |
|
|
const arma::vec & |
currentMassFlow, |
|
|
const arma::vec & |
currentPressure, |
|
|
const arma::vec & |
currentTemperature, |
|
|
const arma::vec & |
guessMassFlow, |
|
|
const arma::vec & |
guessPressure, |
|
|
const arma::vec & |
guessTemperature, |
|
|
const arma::vec & |
guessFriction, |
|
|
const arma::vec & |
guessHeatCapacityConstantVolume, |
|
|
const arma::vec & |
guessHeatFlux, |
|
|
const arma::vec & |
guessDensity, |
|
|
const arma::vec & |
guessCompressibilityFactor, |
|
|
const arma::vec & |
guess_dZdT_p, |
|
|
const arma::vec & |
guess_dZdp, |
|
|
const arma::vec & |
guess_dZdT_rho |
|
) |
| |
Calculates the coefficients of the discretized governing equations, with the internal energy form of the energy equation, and stores the result in Discretizer::m_term_i, Discretizer::m_term_ipp and Discretizer::m_boundaryTerm.
- Parameters
-
dt | Time step [s] |
diameter | Inner diameter [m] |
height | Height profile [m] |
gridPoints | Grid points [m] |
currentSpecificGasConstant | Current specific gas constant \(R_{\rm specific}\) [J/(kg K)] |
currentMassFlow | Current mass flow [kg/s] |
currentPressure | Current pressure [Pa] |
currentTemperature | Temperature [K] |
guessMassFlow | New mass flow [kg/s] |
guessPressure | New pressure [Pa] |
guessTemperature | New temperature [K] |
guessFriction | New friction factor [-] |
guessHeatCapacityConstantVolume | New heat capacity \(c_v\) [J/(kg K)] |
guessHeatFlux | New heat flux [W/m2] |
guessDensity | New gas density [kg/m3] |
guessCompressibilityFactor | New gas compressibility factor \(Z\) [-] |
guess_dZdT_p | New partial derivative \(\frac{\partial Z}{\partial T}|_p\) [-] |
guess_dZdp | New partial derivative \(\frac{\partial Z}{\partial p}|_T\) [-] |
guess_dZdT_rho | New partial derivative \(\frac{\partial Z}{\partial T}|_\rho\) [-] |
The documentation for this class was generated from the following file: