Encapsulates the cfs_tpfa (= compressible flow solver two-point flux approximation) solver modules. More...
#include <TpfaCompressibleAssembler.hpp>
Classes | |
struct | LinearSystem |
Encapsulate a sparse linear system in CSR format. More... | |
Public Types | |
enum | FlowBCTypes { FBC_UNSET = BC_NOFLOW, FBC_PRESSURE = BC_PRESSURE, FBC_FLUX = BC_FLUX_TOTVOL } |
Boundary condition types. | |
Public Member Functions | |
TpfaCompressibleAssembler () | |
Default constructor, does nothing. More... | |
~TpfaCompressibleAssembler () | |
Destructor. More... | |
template<class Grid , class Wells > | |
void | init (const Grid &grid, const Wells &wells, const double *perm, const double *porosity, const typename Grid::Vector &gravity) |
Initialize the solver's structures for a given grid, for well setup also call initWells(). More... | |
template<class Grid > | |
void | init (const Grid &grid, const double *perm, const double *porosity, const typename Grid::Vector &gravity) |
Initialize the solver's structures for a given grid, for well setup also call initWells(). More... | |
void | assemble (const double *sources, const FlowBCTypes *bctypes, const double *bcvalues, const double dt, const double *totcompr, const double *voldiscr, const double *cellA, const double *faceA, const double *wellperfA, const double *phasemobf, const double *phasemobwellperf, const double *cell_pressure, const double *gravcapf, const double *wellperf_gpot, const double *) |
Assemble the sparse system. More... | |
void | linearSystem (LinearSystem &s) |
Access the linear system assembled. More... | |
void | computePressuresAndFluxes (std::vector< double > &cell_pressures, std::vector< double > &face_pressures, std::vector< double > &face_fluxes, std::vector< double > &well_pressures, std::vector< double > &well_fluxes) |
Compute cell pressures and face fluxes. More... | |
double | explicitTimestepLimit (const double *faceA, const double *phasemobf, const double *phasemobf_deriv, const double *surf_dens) |
Explicit IMPES time step limit. More... | |
void | explicitTransport (const double dt, double *cell_surfvols) |
Explicit IMPES transport. More... | |
void | faceFluxToCellFlux (const std::vector< double > &face_fluxes, std::vector< double > &cell_fluxes) |
Compute cell fluxes from face fluxes. More... | |
const std::vector< int > & | numCellFaces () const |
Access the number of connections (faces) per cell. More... | |
const std::vector< double > & | faceTransmissibilities () const |
Encapsulates the cfs_tpfa (= compressible flow solver two-point flux approximation) solver modules.
|
inline |
Default constructor, does nothing.
|
inline |
Destructor.
|
inline |
Assemble the sparse system.
You must call init() prior to calling assemble().
sources | Source terms, one per cell. Positive numbers are sources, negative are sinks. |
total_mobilities | Scalar total mobilities, one per cell. |
omegas | Gravity term, one per cell. In a multi-phase flow setting this is equal to
![]() ![]() ![]() |
|
inline |
Compute cell pressures and face fluxes.
You must call assemble() (and solve the linear system accessed by calling linearSystem()) prior to calling computePressuresAndFluxes().
[out] | cell_pressures | Cell pressure values. |
[out] | face_areas | Face flux values. |
|
inline |
Explicit IMPES time step limit.
|
inline |
Explicit IMPES transport.
|
inline |
Compute cell fluxes from face fluxes.
You must call assemble() (and solve the linear system accessed by calling linearSystem()) prior to calling faceFluxToCellFlux().
face_fluxes | ||
face_areas | Face flux values (usually output from computePressuresAndFluxes()). | |
[out] | cell_fluxes | Cell-wise flux values. They are given in cell order, and for each cell there is one value for each adjacent face (in the same order as the cell-face topology of the grid). Positive values represent fluxes out of the cell. |
|
inline |
Initialize the solver's structures for a given grid, for well setup also call initWells().
Grid | This must conform to the SimpleGrid concept. |
Wells | This must conform to the SimpleWells concept. |
grid | The grid object. |
wells | Well specifications. |
perm | Permeability. It should contain dim*dim entries (a full tensor) for each cell. |
perm | Porosity by cell. |
gravity | Array containing gravity acceleration vector. It should contain dim entries. |
|
inline |
Initialize the solver's structures for a given grid, for well setup also call initWells().
Grid | This must conform to the SimpleGrid concept. |
grid | The grid object. |
perm | Permeability. It should contain dim*dim entries (a full tensor) for each cell. |
gravity | Array containing gravity acceleration vector. It should contain dim entries. |
|
inline |
Access the linear system assembled.
You must call assemble() prior to calling linearSystem().
[out] | s | The linear system encapsulation to modify. After this call, s will point to linear system structures that are owned and allocated internally. |
|
inline |
Access the number of connections (faces) per cell.
Deprecated, will be removed.