24#ifndef DUMUX_ELEMENTDATA2P2C_MULTYPHYSICS_HH
25#define DUMUX_ELEMENTDATA2P2C_MULTYPHYSICS_HH
43template<
class TypeTag>
56 wPhaseIdx = Indices::wPhaseIdx, nPhaseIdx = Indices::nPhaseIdx
60 complex = 0, simple = 1
65 std::shared_ptr<SimpleFluidState> simpleFluidState_;
72 subdomain_(2), fluidStateType_(complex)
81 if(fluidStateType_ == simple)
83 return simpleFluidState_->pressure(phaseIdx);
91 if(fluidStateType_ == simple)
93 return simpleFluidState_->pressure(phaseIdx);
101 if(fluidStateType_ == simple)
140 fluidStateType_ = complex;
142 fluidStateType_ = simple;
150 if(fluidStateType_ == simple)
164 if(fluidStateType_ == simple)
166 return simpleFluidState_->saturation(phaseIdx);
175 if(fluidStateType_ == simple)
177 assert(phaseIdx == simpleFluidState_->presentPhaseIdx());
186 if(fluidStateType_ == simple)
188 if(phaseIdx != simpleFluidState_->presentPhaseIdx())
190 return simpleFluidState_->viscosity(phaseIdx);
200 if(fluidStateType_ == simple)
201 return simpleFluidState_->pressure(nPhaseIdx) - simpleFluidState_->pressure(wPhaseIdx);
209 if(fluidStateType_ == simple)
211 return simpleFluidState_->density(phaseIdx);
220 if(fluidStateType_ == simple)
222 return simpleFluidState_->massFraction(phaseIdx, compIdx);
225 return this->
fluidState_->massFraction(phaseIdx, compIdx);
231 if(fluidStateType_ == simple)
233 return simpleFluidState_->moleFraction(phaseIdx, compIdx);
236 return this->
fluidState_->moleFraction(phaseIdx, compIdx);
241 if(fluidStateType_ == simple)
243 return simpleFluidState_->temperature(phaseIdx);
252 if(fluidStateType_ == simple)
254 if(phaseIdx == simpleFluidState_->presentPhaseIdx())
260 return this->
fluidState_->phaseMassFraction(phaseIdx);
266 assert(simpleFluidState_);
267 return *simpleFluidState_;
283 fluidStateType_ = simple;
289 fluidStateType_ = simple;
295 if(!simpleFluidState_)
296 simpleFluidState_ = std::make_shared<SimpleFluidState>();
297 return *simpleFluidState_;
309 fluidStateType_ = complex;
310 if(simpleFluidState_)
312 simpleFluidState_.template reset<SimpleFluidState>(0);
317 this->
fluidState_ = std::make_shared<FluidState>();
328 {
return fluidStateType_;}
Calculates phase state for a single phase but two-component state.
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Container for compositional variables in a 1p2c situation.
Definition: pseudo1p2c.hh:44
void setPresentPhaseIdx(int phaseIdx)
Sets the phase Index that is present in this fluidState.
Definition: pseudo1p2c.hh:257
void setPressure(int phaseIdx, Scalar value)
Sets the phase pressure .
Definition: pseudo1p2c.hh:282
void setViscosity(int phaseIdx, Scalar value)
Sets the viscosity of a phase .
Definition: pseudo1p2c.hh:203
Storage container for discretized data of the constitutive relations for one element.
Definition: 2p2c/sequential/celldata.hh:44
std::shared_ptr< FluidState > fluidState_
Definition: 2p2c/sequential/celldata.hh:80
Storage container for discretized data for multiphysics models.
Definition: celldatamultiphysics.hh:45
const Scalar massFraction(int phaseIdx, int compIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:218
const Scalar moleFraction(int phaseIdx, int compIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:229
Scalar pressure(int phaseIdx)
DOC ME!
Definition: celldatamultiphysics.hh:79
const int & subdomain() const
Return subdomain information.
Definition: celldatamultiphysics.hh:128
void setPressure(int phaseIdx, Scalar value)
DOC ME!
Definition: celldatamultiphysics.hh:99
const Scalar density(int phaseIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:207
const Scalar saturation(int phaseIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:162
const Scalar phaseMassFraction(int phaseIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:250
const Scalar viscosity(int phaseIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:184
void setViscosity(int phaseIdx, Scalar value)
DOC ME!
Definition: celldatamultiphysics.hh:173
void setSaturation(int phaseIdx, Scalar value)
DOC ME!
Definition: celldatamultiphysics.hh:148
int & subdomain()
Return subdomain information.
Definition: celldatamultiphysics.hh:118
const Scalar capillaryPressure() const
DOC ME!
Definition: celldatamultiphysics.hh:198
void setSubdomainAndFluidStateType(int index)
Specify subdomain information and fluidStateType.
Definition: celldatamultiphysics.hh:136
const Scalar temperature(int phaseIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:239
SimpleFluidState & manipulateSimpleFluidState()
Manipulates a simple fluidstate for a cell in the simple domain.
Definition: celldatamultiphysics.hh:287
const Scalar pressure(int phaseIdx) const
DOC ME!
Definition: celldatamultiphysics.hh:89
CellData2P2CMultiPhysics()
Constructor for a local storage object.
Definition: celldatamultiphysics.hh:71
FluidState & manipulateFluidState()
Allows manipulation of the complex fluid state.
Definition: celldatamultiphysics.hh:307
void setSimpleFluidState(SimpleFluidState &simpleFluidState)
Set a simple fluidstate for a cell in the simple domain Uses a simplified fluidstate with less storag...
Definition: celldatamultiphysics.hh:280
bool fluidStateType() const
Returns the type of the fluidState.
Definition: celldatamultiphysics.hh:327
const SimpleFluidState & simpleFluidState() const
Returns a reference to the cells simple fluid state.
Definition: celldatamultiphysics.hh:264
Base file for properties related to sequential models.
Storage container for discretized data of the constitutive relations for one element.