TransFlow  0.1.0
A transient pipeline flow simulation library
BatchTracking Class Reference

A class for calculating the time development of the gas composition from the gas velocity. More...

#include <batchtracking.hpp>

Public Member Functions

 ~BatchTracking ()
 Declared to avoid the inline compiler-generated default destructor.
 

Static Public Member Functions

static BatchTrackingState advect (const BatchTrackingState &state, const arma::uword dt, const Pipeline &pipeline, const BoundaryConditions &boundaryConditions)
 A wrapper around BatchTracking::advect(const BatchTrackingState&, const double, const arma::mat&, const arma::vec&) More...
 
static BatchTrackingState advect (const BatchTrackingState &state, const arma::uword dt, const arma::mat &inletAndOutletConcentration, const arma::vec &velocity)
 Calculate new Batch positions from gas velocity. More...
 

Detailed Description

A class for calculating the time development of the gas composition from the gas velocity.

This class implements "batch tracking", which is a method for calculating the time development of the gas composition. This is done by setting up "batches" of gas with a given composition, and advancing each batch according to the gas velocity around each batch.

The batch tracking procedure is documented in Gas composition tracking in transient pipeline flow (Chaczykowski et. al., Journal of Natural Gas Science and Engineering 2018).

Member Function Documentation

◆ advect() [1/2]

static BatchTrackingState BatchTracking::advect ( const BatchTrackingState state,
const arma::uword  dt,
const arma::mat &  inletAndOutletConcentration,
const arma::vec &  velocity 
)
static

Calculate new Batch positions from gas velocity.

This is the main advection function, which performs the calculations (all other advect functions are just wrappers around this one).

Advection is performed by translating each Batch according to the velocity of the gas around each Batch.

The batch tracking procedure is documented in Gas composition tracking in transient pipeline flow (Chaczykowski et. al., Journal of Natural Gas Science and Engineering 2018).

Parameters
stateThe current state, the positions and concentrations of all batches.
dtTime step [s].
inletAndOutletConcentrationInlet and outlet concentration as column vectors.
velocityThe velocity in the pipeline.
Returns
A copy of state with updated batch positions.

◆ advect() [2/2]

static BatchTrackingState BatchTracking::advect ( const BatchTrackingState state,
const arma::uword  dt,
const Pipeline pipeline,
const BoundaryConditions boundaryConditions 
)
static

A wrapper around BatchTracking::advect(const BatchTrackingState&, const double, const arma::mat&, const arma::vec&)

See also
BatchTracking::advect(const BatchTrackingState&, const double, const arma::mat&, const arma::vec&)
Parameters
dtTime step [s].
stateBatchTrackingState to advect
pipelineInstance of Pipeline containing the current Pipeline state. Will get velocity from this.
boundaryConditionsBoundary conditions.
Returns
A copy of state with updated batch positions.

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