template<class TypeTag>
class Dumux::FV3dTransport2P2CAdaptive< TypeTag >
Compositional transport step in a finite volume discretization.
The finite volume model for the solution of the transport equation for compositional two-phase flow.
\[ \frac{\partial C^\kappa}{\partial t} = - \nabla \cdot \left( \sum_{\alpha} X^{\kappa}_{\alpha} \varrho_{alpha} \bf{v}_{\alpha}\right) + q^{\kappa}, \]
where \( \bf{v}_{\alpha} = - \lambda_{\alpha} \bf{K} \left(\nabla p_{\alpha} + \rho_{\alpha} \bf{g} \right) \). \( p_{\alpha} \) denotes the phase pressure, \( \bf{K} \) the absolute permeability, \( \lambda_{\alpha} \) the phase mobility, \( \rho_{\alpha} \) the phase density and \( \bf{g} \) the gravity constant and \( C^{\kappa} \) the total Component concentration.
- Template Parameters
-
|
virtual void | update (const Scalar t, Scalar &dt, TransportSolutionType &updateVec, bool impes=false) |
| Calculate the update vector and determine timestep size. More...
|
|
void | getMpfaFlux (Dune::FieldVector< Scalar, 2 > &, Dune::FieldVector< Scalar, 2 > &, const IntersectionIterator &, CellData &) |
| Compute flux over an irregular interface using a mpfa method. More...
|
|
| FV3dTransport2P2CAdaptive (Problem &problem) |
| Constructs a FV3dTransport2P2CAdaptive object. More...
|
|
virtual | ~FV3dTransport2P2CAdaptive () |
|
void | updateTransportedQuantity (TransportSolutionType &updateVector) |
| Updates the transported quantity once an update is calculated. More...
|
|
void | updateTransportedQuantity (TransportSolutionType &updateVector, Scalar dt) |
| Updates the transported quantity once an update is calculated. More...
|
|
void | updateConcentrations (TransportSolutionType &updateVector, Scalar dt) |
| Updates the concentrations once an update is calculated. More...
|
|
void | getFlux (ComponentVector &fluxEntries, EntryType ×tepFlux, const Intersection &intersection, CellData &cellDataI) |
| Get flux at an interface between two cells The flux through \( \gamma \) is calculated according to the underlying pressure field, calculated by the pressure model. More...
|
|
void | getFluxOnBoundary (ComponentVector &fluxEntries, EntryType ×tepFlux, const Intersection &intersection, const CellData &cellDataI) |
| Get flux on Boundary. More...
|
|
void | evalBoundary (GlobalPosition globalPosFace, const Intersection &intersection, FluidState &BCfluidState, PhaseVector &pressBound) |
| Evaluate the boundary conditions. More...
|
|
void | initialize () |
| Set the initial values before the first pressure equation This method is called before first pressure equation is solved from IMPET. More...
|
|
template<class MultiWriter > |
void | addOutputVtkFields (MultiWriter &writer) |
| Write transport variables into the output files. More...
|
|
void | serializeEntity (std::ostream &outstream, const Element &element) |
| Function needed for restart option of the transport model: Write out. More...
|
|
void | deserializeEntity (std::istream &instream, const Element &element) |
| Function needed for restart option of the transport model: Read in. More...
|
|
template<class TypeTag >
void Dumux::FVTransport2P2C< TypeTag >::getFlux |
( |
ComponentVector & |
fluxEntries, |
|
|
EntryType & |
timestepFlux, |
|
|
const Intersection & |
intersection, |
|
|
CellData & |
cellDataI |
|
) |
| |
|
inherited |
Get flux at an interface between two cells The flux through \( \gamma \) is calculated according to the underlying pressure field, calculated by the pressure model.
\[ - A_{\gamma} \mathbf{n}^T_{\gamma} \mathbf{K} \sum_{\alpha} \varrho_{\alpha} \lambda_{\alpha} \mathbf{d}_{ij} \left( \frac{p_{\alpha,j}^t - p^{t}_{\alpha,i}}{\Delta x} + \varrho_{\alpha} \mathbf{g}^T \mathbf{d}_{ij} \right) \sum_{\kappa} X^{\kappa}_{\alpha} \]
Here, \( \mathbf{d}_{ij} \) is the normalized vector connecting the cell centers, and \( \mathbf{n}_{\gamma} \) represents the normal of the face \( \gamma \). Due to the nature of the primay Variable, the (volume-)specific total mass concentration, this represents a mass flux per cell volume.
- Parameters
-
fluxEntries | The flux entries, mass influx from cell \(j\) to \(i\). |
timestepFlux | flow velocities for timestep estimation |
intersection | The intersection |
cellDataI | The cell data for cell \(i\) |
template<class TypeTag >
void Dumux::FVTransport2P2C< TypeTag >::getFluxOnBoundary |
( |
ComponentVector & |
fluxEntries, |
|
|
EntryType & |
timestepFlux, |
|
|
const Intersection & |
intersection, |
|
|
const CellData & |
cellDataI |
|
) |
| |
|
inherited |
Get flux on Boundary.
The flux through \( \gamma \) is calculated according to the underlying pressure field, calculated by the pressure model.
\[ - A_{\gamma} \mathbf{n}^T_{\gamma} \mathbf{K} \mathbf{d}_{i-Boundary} \sum_{\alpha} \varrho_{\alpha} \lambda_{\alpha} \sum_{\kappa} X^{\kappa}_{\alpha} \left( \frac{p_{\alpha,Boundary}^t - p^{t}_{\alpha,i}}{\Delta x} + \varrho_{\alpha}\mathbf{g}^T \mathbf{d}_{i-Boundary}\right) \]
Here, \( \mathbf{u} \) is the normalized vector connecting the cell centers, and \( \mathbf{n}_{\gamma_{ij}} \) represents the normal of the face \( \gamma{ij} \).
- Parameters
-
fluxEntries | The flux entries, mass influx from cell \(j\) to \(i\). |
timestepFlux | flow velocities for timestep estimation |
intersection | The intersection |
cellDataI | The cell data for cell \(i\) |
template<class TypeTag >
void Dumux::FV3dTransport2P2CAdaptive< TypeTag >::getMpfaFlux |
( |
Dune::FieldVector< Scalar, 2 > & |
fluxEntries, |
|
|
Dune::FieldVector< Scalar, 2 > & |
timestepFlux, |
|
|
const IntersectionIterator & |
isIt, |
|
|
CellData & |
cellDataI |
|
) |
| |
Compute flux over an irregular interface using a mpfa method.
A mpfa l-method is applied to calculate fluxes near hanging nodes, using:
\[ - \sum_{\alpha} \varrho_{\alpha} \lambda_{\alpha} \left( \sum_k \tau_{2k} p^t_{\alpha,k} + \varrho_{\alpha} \sum_k \tau_{2k} \mathbf{g}^T \mathbf{x}_{k} \right) \sum_{\kappa} X^{\kappa}_{\alpha} \]
All interaction regions that are stored are regarded.
- Parameters
-
fluxEntries | The flux entries, mass influx from cell \(j\) to \(i\). |
timestepFlux | flow velocities for timestep estimation |
isIt | Iterator of the intersection between cell I and J |
cellDataI | The cell data for cell \(i\) |
get geometrical Info, transmissibility matrix
Calculate the update vector and determine timestep size.
This method calculates the update vector \( u \) of the discretized equation
\[ C^{\kappa , new} = C^{\kappa , old} + u, \]
where \( u = \sum_{element faces} \boldsymbol{v}_{\alpha} * \varrho_{\alpha} * X^{\kappa}_{\alpha} * \boldsymbol{n} * A_{element face} \), \( \boldsymbol{n} \) is the face normal and \( A_{element face} \) is the face area.
In addition to the update vector, the recommended time step size dt is calculated employing a CFL condition. This method uses a standard Tpfa method for regular fluxes, and a MPFA can be used near hanging nodes. The lengths of the vectors are resized to agree with the current grid resolution.
- Parameters
-
| t | Current simulation time \(\mathrm{[s]}\) |
[out] | dt | Time step size \(\mathrm{[s]}\) |
[out] | updateVec | Update vector, or update estimate for secants, resp. Here in \(\mathrm{[kg/m^3]}\) |
| impet | Flag that determines if it is a real impet step or an update estimate for volume derivatives |
Reimplemented from Dumux::FVTransport2P2C< TypeTag >.