Class including the data of a grid cell needed if an adaptive grid is used. More...
#include <dumux/porousmediumflow/2p2c/sequential/celldataadaptive.hh>
Class including the data of a grid cell needed if an adaptive grid is used.
The class provides model-specific functions needed to adapt the stored cell data to a new (adapted) grid. Additionally, it provides the storage-infrastructure for explicit front tracking.
TypeTag | The Type Tag |
Classes | |
struct | AdaptedValues |
A container for all necessary variables to map an old solution to a new grid If the primary variables (pressure, total concentrations) are mapped to a new grid, the secondary variables can be calulated. For the mapping between sons and father, it is in addition necessary to know about how many sons live in each father ("count"). While only one phase pressure is PV, the method updateMaterialLaws() that recalculates the secondary variables needs both phase pressures (initiated via the capillary pressure of the last time step) to start the iteration to determine appropriate phase composition and pc. Hence, both phase pressures are mapped to the new solution. More... | |
Public Member Functions | |
CellData2P2CAdaptive () | |
Constructs an adaptive CellData object. More... | |
void | storeAdaptionValues (AdaptedValues &adaptedValues, const Element &element) |
Stores leaf cell primary variables to transfer to new indexing Stores values to be adapted from the current CellData objects into the adaptation container in order to be mapped on a new grid. More... | |
void | setAdaptionValues (AdaptedValues &adaptedValues, const Element &element) |
Set adapted values in CellData This methods stores reconstructed values into the cellData object, by this setting a newly mapped solution to the storage container of the sequential models. In new cells, update estimate does not give meaningful results. We therefore copy volume derivatives from old time step, and indicate that those are already availabe. More... | |
FluxData & | fluxData () |
Acess to flux data, representing information living on the intersections. More... | |
const FluxData & | fluxData () const |
Constant acess to flux data, representing information living on the intersections. More... | |
Acess to primary variables | |
Scalar | pressure (int phaseIdx) |
DOC ME! More... | |
const Scalar | pressure (int phaseIdx) const |
DOC ME! More... | |
void | setPressure (int phaseIdx, Scalar value) |
Modify the phase pressure. More... | |
int & | subdomain () |
Return subdomain information. More... | |
const int & | subdomain () const |
Return subdomain information. More... | |
void | setSubdomainAndFluidStateType (int index) |
Specify subdomain information and fluidStateType. More... | |
Acess to secondary variables | |
void | setSaturation (int phaseIdx, Scalar value) |
DOC ME! More... | |
const Scalar | saturation (int phaseIdx) const |
DOC ME! More... | |
void | setViscosity (int phaseIdx, Scalar value) |
DOC ME! More... | |
const Scalar | viscosity (int phaseIdx) const |
DOC ME! More... | |
const Scalar | capillaryPressure () const |
DOC ME! More... | |
const Scalar | density (int phaseIdx) const |
DOC ME! More... | |
const Scalar | massFraction (int phaseIdx, int compIdx) const |
DOC ME! More... | |
const Scalar | moleFraction (int phaseIdx, int compIdx) const |
DOC ME! More... | |
const Scalar | temperature (int phaseIdx) const |
DOC ME! More... | |
const Scalar | phaseMassFraction (int phaseIdx) const |
DOC ME! More... | |
const SimpleFluidState & | simpleFluidState () const |
Returns a reference to the cells simple fluid state. More... | |
void | setSimpleFluidState (SimpleFluidState &simpleFluidState) |
Set a simple fluidstate for a cell in the simple domain Uses a simplified fluidstate with less storage capacity and functionality. Makes shure the fluidStateType_ flag is set appropriately in this cell. More... | |
SimpleFluidState & | manipulateSimpleFluidState () |
Manipulates a simple fluidstate for a cell in the simple domain. More... | |
FluidState & | manipulateFluidState () |
Allows manipulation of the complex fluid state. More... | |
bool | fluidStateType () const |
Returns the type of the fluidState. More... | |
Acess to primary variables | |
const Scalar | totalConcentration (int compIdx) const |
Returns the total mass concentration of a component \(\mathrm{[kg/m^3]}\). More... | |
const Scalar | massConcentration (int compIdx) const |
Returns the total mass concentration of a component \(\mathrm{[kg/m^3]}\). More... | |
void | setTotalConcentration (int compIdx, Scalar value) |
Sets the total mass concentration of a component \(\mathrm{[kg/m^3]}\). More... | |
void | setMassConcentration (int compIdx, Scalar value) |
Sets the total mass concentration of a component \(\mathrm{[kg/m^3]}\). More... | |
void | calculateMassConcentration (Scalar porosity) |
Calculate the total mass concentration of a component \(\mathrm{[kg/m^3]}\) for a given porosity (within the initialization procedure). More... | |
Acess to secondary variables | |
const Scalar & | mobility (int phaseIdx) const |
Return phase mobilities. More... | |
void | setMobility (int phaseIdx, Scalar value) |
Set phase mobilities. More... | |
Scalar & | volumeError () |
Return the volume error [-]. This quantity stands for the deviation of real fluid volume to available pore space. \( \epsilon = v_{real} - \phi\). More... | |
const Scalar & | volumeError () const |
Return the volume error [-]. More... | |
Scalar & | errorCorrection () |
Return the error Correction This quantifies the damped error that actually entered the pressure equation: Damped Error from last time-step times last time step size. More... | |
const Scalar & | errorCorrection () const |
Return the error Correction. More... | |
Scalar & | dv_dp () |
Return the derivative of specific volume w.r.t. pressure For details, see description of FVPressureCompositional<TypeTag>::volumeDerivatives() More... | |
const Scalar & | dv_dp () const |
Return the derivative of specific volume w.r.t. pressure. More... | |
Scalar & | dv (int compIdx) |
Return the derivative of spec. volume w.r.t. change of mass For details, see description of FVPressureCompositional<TypeTag>::volumeDerivatives() More... | |
const Scalar & | dv (int compIdx) const |
Return the derivative of spec. volume w.r.t. change of mass For details, see description of FVPressureCompositional<TypeTag>::volumeDerivatives() More... | |
Scalar & | perimeter () |
Return cell perimeter (as weithing function) The cell perimeter is used in combination with the face Area as a weighting of the volume integral in the pressure equation. More... | |
const Scalar & | perimeter () const |
Return cell perimeter (as weithing function) More... | |
const FluidState & | fluidState () const |
Returns a reference to the cells fluid state. More... | |
int & | globalIdx () |
stores this cell datas index, only for debugging purposes!! More... | |
bool | hasVolumeDerivatives () const |
Indicates if volume derivatives are computed and available. More... | |
void | confirmVolumeDerivatives () |
Specifies that volume derivatives are computed and available. More... | |
void | volumeDerivativesAvailable (bool value) |
Specifies if volume derivatives are computed and available. More... | |
void | reset () |
Resets the cell data after a timestep was completed: No volume derivatives yet available. More... | |
bool & | wasRefined () |
Indicates if current cell was refined at this time step. More... | |
const bool & | wasRefined () const |
Indicates if current cell was refined at this time step. More... | |
const bool & | isUpwindCell (int indexInInside, int phaseIdx) const |
Indicates if current cell is the upwind cell for a given interface. More... | |
void | setUpwindCell (int indexInInside, int phaseIdx, bool value) |
Specifies if current cell is the upwind cell for a given interface. More... | |
Static Public Member Functions | |
static void | storeAdaptionValues (AdaptedValues &adaptedValues, AdaptedValues &adaptedValuesFather, const Element &fatherElement) |
Adds cell information to father element for possible averaging / coarsening Sum up the adaptedValues (sons values) into father element. We store from leaf upwards, so sons are stored first, then cells on the next leaf (=fathers) can be averaged. More... | |
static void | reconstructAdaptionValues (Dune::PersistentContainer< Grid, AdaptedValues > &adaptationMap, const Element &father, const Element &son, const Problem &problem) |
Reconstructs sons entries from data of father cell Reconstructs an new solution from a father cell into for a newly generated son cell. The new cell is stored into the global adaptationMap. More... | |
Protected Attributes | |
Scalar | massConcentration_ [numComponents] |
Scalar | mobility_ [numPhases] |
Scalar | volumeError_ |
Scalar | errorCorrection_ |
Scalar | dv_dp_ |
Scalar | dv_ [numComponents] |
bool | volumeDerivativesAvailable_ |
bool | wasRefined_ |
int | globalIdx_ |
Scalar | perimeter_ |
std::shared_ptr< FluidState > | fluidState_ |
FluxData | fluxData_ |
|
inline |
Constructs an adaptive CellData object.
|
inlineinherited |
Calculate the total mass concentration of a component \(\mathrm{[kg/m^3]}\) for a given porosity (within the initialization procedure).
porosity | Porosity |
|
inlineinherited |
DOC ME!
|
inlineinherited |
Specifies that volume derivatives are computed and available.
|
inlineinherited |
DOC ME!
|
inlineinherited |
Return the derivative of spec. volume w.r.t. change of mass For details, see description of FVPressureCompositional<TypeTag>::volumeDerivatives()
compIdx | index of the Component |
|
inlineinherited |
Return the derivative of spec. volume w.r.t. change of mass For details, see description of FVPressureCompositional<TypeTag>::volumeDerivatives()
compIdx | index of the Component |
|
inlineinherited |
Return the derivative of specific volume w.r.t. pressure For details, see description of FVPressureCompositional<TypeTag>::volumeDerivatives()
|
inlineinherited |
Return the derivative of specific volume w.r.t. pressure.
|
inlineinherited |
Return the error Correction This quantifies the damped error that actually entered the pressure equation: Damped Error from last time-step times last time step size.
|
inlineinherited |
Return the error Correction.
|
inlineinherited |
Returns a reference to the cells fluid state.
|
inlineinherited |
Returns the type of the fluidState.
|
inlineinherited |
Acess to flux data, representing information living on the intersections.
|
inlineinherited |
Constant acess to flux data, representing information living on the intersections.
|
inlineinherited |
stores this cell datas index, only for debugging purposes!!
|
inlineinherited |
Indicates if volume derivatives are computed and available.
|
inlineinherited |
Indicates if current cell is the upwind cell for a given interface.
indexInInside | Local face index seen from current cell |
phaseIdx | The index of the phase |
|
inlineinherited |
Allows manipulation of the complex fluid state.
Fluidstate is stored as a pointer, initialized as a null-pointer. Enshure that if no FluidState is present, a new one is created. Also enshure that we are in the complex subdomain.
|
inlineinherited |
Manipulates a simple fluidstate for a cell in the simple domain.
|
inlineinherited |
Returns the total mass concentration of a component \(\mathrm{[kg/m^3]}\).
This is equivalent to the sum of the component concentrations for all phases multiplied with the phase density.
compIdx | the index of the component |
|
inlineinherited |
DOC ME!
|
inlineinherited |
Return phase mobilities.
phaseIdx | index of the Phase |
|
inlineinherited |
DOC ME!
|
inlineinherited |
Return cell perimeter (as weithing function) The cell perimeter is used in combination with the face Area as a weighting of the volume integral in the pressure equation.
|
inlineinherited |
Return cell perimeter (as weithing function)
|
inlineinherited |
DOC ME!
|
inlineinherited |
DOC ME!
|
inlineinherited |
DOC ME!
|
inlinestatic |
Reconstructs sons entries from data of father cell Reconstructs an new solution from a father cell into for a newly generated son cell. The new cell is stored into the global adaptationMap.
adaptationMap | Global map storing all values to be adapted |
father | Entity Pointer to the father cell |
son | Entity Pointer to the newly created son cell |
problem | The problem |
|
inlineinherited |
Resets the cell data after a timestep was completed: No volume derivatives yet available.
|
inlineinherited |
DOC ME!
|
inline |
Set adapted values in CellData This methods stores reconstructed values into the cellData object, by this setting a newly mapped solution to the storage container of the sequential models. In new cells, update estimate does not give meaningful results. We therefore copy volume derivatives from old time step, and indicate that those are already availabe.
adaptedValues | Container for model-specific values to be adapted |
element | The element where things are stored. |
|
inlineinherited |
Sets the total mass concentration of a component \(\mathrm{[kg/m^3]}\).
compIdx | index of the Component |
value | Value to be stored |
|
inlineinherited |
Set phase mobilities.
phaseIdx | index of the Phase |
value | Value to be stored |
|
inlineinherited |
Modify the phase pressure.
phaseIdx | index of the Phase |
value | Value to be stored |
|
inlineinherited |
DOC ME!
|
inlineinherited |
Set a simple fluidstate for a cell in the simple domain Uses a simplified fluidstate with less storage capacity and functionality. Makes shure the fluidStateType_ flag is set appropriately in this cell.
simpleFluidState | A fluidstate storing a 1p2c mixture |
|
inlineinherited |
Specify subdomain information and fluidStateType.
|
inlineinherited |
Sets the total mass concentration of a component \(\mathrm{[kg/m^3]}\).
compIdx | index of the Component |
value | Value to be stored |
|
inlineinherited |
Specifies if current cell is the upwind cell for a given interface.
indexInInside | Local face index seen from current cell |
phaseIdx | The index of the phase |
value | Value: true (->outflow) or false (-> inflow) |
|
inlineinherited |
DOC ME!
|
inlineinherited |
Returns a reference to the cells simple fluid state.
|
inlinestatic |
Adds cell information to father element for possible averaging / coarsening Sum up the adaptedValues (sons values) into father element. We store from leaf upwards, so sons are stored first, then cells on the next leaf (=fathers) can be averaged.
adaptedValues | Container for model-specific values to be adapted |
adaptedValuesFather | Values to be adapted of father cell |
fatherElement | The element of the father |
|
inline |
Stores leaf cell primary variables to transfer to new indexing Stores values to be adapted from the current CellData objects into the adaptation container in order to be mapped on a new grid.
adaptedValues | Container for model-specific values to be adapted |
element | The element to be stored |
|
inlineinherited |
Return subdomain information.
Acess function to store subdomain information
|
inlineinherited |
Return subdomain information.
Acess function to get subdomain information
|
inlineinherited |
DOC ME!
|
inlineinherited |
Returns the total mass concentration of a component \(\mathrm{[kg/m^3]}\).
This is equivalent to the sum of the component concentrations for all phases multiplied with the phase density.
compIdx | the index of the component |
|
inlineinherited |
DOC ME!
|
inlineinherited |
Specifies if volume derivatives are computed and available.
|
inlineinherited |
Return the volume error [-]. This quantity stands for the deviation of real fluid volume to available pore space. \( \epsilon = v_{real} - \phi\).
|
inlineinherited |
Return the volume error [-].
|
inlineinherited |
Indicates if current cell was refined at this time step.
|
inlineinherited |
Indicates if current cell was refined at this time step.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |