TransFlow  0.1.0
A transient pipeline flow simulation library
Physics Class Reference

The Physics class combines EquationOfState and HeatTransfer to calculate the new state of a pipeline given a new pressure, temperature and flow. More...

#include <physics.hpp>

Public Member Functions

virtual ~Physics ()
 Declared to avoid the inline compiler-generated default destructor.
 
 Physics (const Pipeline &state, const Config &config)
 Construct from Config and Pipeline. More...
 
 Physics (const Pipeline &state, const std::string &eos="BWRS", const std::string &heat="SteadyState")
 Construct from Pipeline and strings to select the equation of state and heat transfer type to use. More...
 
void updateDerivedProperties (Pipeline &state) const
 Updates all derived properties, but does not evaluate the heat transfer. More...
 
void initializeHeatTransferState (Pipeline &state) const
 Initialize heat transfer of a Pipeline. More...
 
void thermalizeHeatTransfer (Pipeline &state) const
 Thermalize the heat transfer of a Pipeline. More...
 
arma::uword size () const
 Get the size (number of grid points)
 
const EquationOfStateequationOfState () const
 Get (const ref) EquationOfState.
 
const HeatTransferheatTransfer () const
 Get (const ref) HeatTransfer.
 

Private Attributes

std::unique_ptr< EquationOfStatem_eos
 Equation of state.
 
std::unique_ptr< HeatTransferm_heat
 Heat transfer.
 

Detailed Description

The Physics class combines EquationOfState and HeatTransfer to calculate the new state of a pipeline given a new pressure, temperature and flow.

This class operates on a Pipeline instance, and returns a new Pipeline instance with updated properties (heat flow, Reynolds number etc.)

Constructor & Destructor Documentation

◆ Physics() [1/2]

Physics::Physics ( const Pipeline state,
const Config config 
)

Construct from Config and Pipeline.

Parameters
statePipeline instance
configConfig instance

◆ Physics() [2/2]

Physics::Physics ( const Pipeline state,
const std::string &  eos = "BWRS",
const std::string &  heat = "SteadyState" 
)
explicit

Construct from Pipeline and strings to select the equation of state and heat transfer type to use.

Parameters
statePipeline description
eosEquation of state type ("BWRS", "GERG04" or "IdealGas")
heatHeat transfer type ("SteadyState", "Unsteady", "FixedUValue" or "FixedQValue")

Member Function Documentation

◆ initializeHeatTransferState()

void Physics::initializeHeatTransferState ( Pipeline state) const

Initialize heat transfer of a Pipeline.

Parameters
statePipeline state to initializing heat transfer of

◆ thermalizeHeatTransfer()

void Physics::thermalizeHeatTransfer ( Pipeline state) const

Thermalize the heat transfer of a Pipeline.

Parameters
statePipeline state to thermalize

◆ updateDerivedProperties()

void Physics::updateDerivedProperties ( Pipeline state) const

Updates all derived properties, but does not evaluate the heat transfer.

Parameters
statePipeline state to update

The documentation for this class was generated from the following file: