Skip to content
Snippets Groups Projects
Commit 155ebb68 authored by Bernd Flemisch's avatar Bernd Flemisch Committed by Timo Koch
Browse files

[test][mpnc] simplify determination of maximum capillary pressure

Allows to eliminate the `FluidState` template parameter.
parent 9f733059
No related branches found
No related tags found
2 merge requests!1337WIP Fix/dirichlet caching v2,!1195Cleanup/interfacial areas
...@@ -122,9 +122,8 @@ struct SpatialParams<TypeTag, TTag::EvaporationAtmosphere> ...@@ -122,9 +122,8 @@ struct SpatialParams<TypeTag, TTag::EvaporationAtmosphere>
{ {
using FVGridGeometry = GetPropType<TypeTag, FVGridGeometry>; using FVGridGeometry = GetPropType<TypeTag, FVGridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluidState = GetPropType<TypeTag, Properties::FluidState>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using type = EvaporationAtmosphereSpatialParams<FVGridGeometry, Scalar, FluidState, FluidSystem>; using type = EvaporationAtmosphereSpatialParams<FVGridGeometry, Scalar, FluidSystem>;
}; };
// Set the interfacial area relation: wetting -- non-wetting // Set the interfacial area relation: wetting -- non-wetting
......
...@@ -47,16 +47,16 @@ namespace Dumux { ...@@ -47,16 +47,16 @@ namespace Dumux {
/** /**
* \brief Definition of the spatial parameters for the evaporation atmosphere Problem (using a "poor man's coupling") * \brief Definition of the spatial parameters for the evaporation atmosphere Problem (using a "poor man's coupling")
*/ */
template<class FVGridGeometry, class Scalar, class FluidState, class FluidSystem> template<class FVGridGeometry, class Scalar, class FluidSystem>
class EvaporationAtmosphereSpatialParams class EvaporationAtmosphereSpatialParams
: public FVNonEquilibriumSpatialParams<FVGridGeometry, Scalar, : public FVNonEquilibriumSpatialParams<FVGridGeometry, Scalar,
EvaporationAtmosphereSpatialParams<FVGridGeometry, Scalar, FluidState, FluidSystem>> EvaporationAtmosphereSpatialParams<FVGridGeometry, Scalar, FluidSystem>>
{ {
using GridView = typename FVGridGeometry::GridView; using GridView = typename FVGridGeometry::GridView;
using FVElementGeometry = typename FVGridGeometry::LocalView; using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using Element = typename GridView::template Codim<0>::Entity; using Element = typename GridView::template Codim<0>::Entity;
using ThisType = EvaporationAtmosphereSpatialParams<FVGridGeometry, Scalar, FluidState, FluidSystem>; using ThisType = EvaporationAtmosphereSpatialParams<FVGridGeometry, Scalar, FluidSystem>;
using ParentType = FVNonEquilibriumSpatialParams<FVGridGeometry, Scalar, ThisType>; using ParentType = FVNonEquilibriumSpatialParams<FVGridGeometry, Scalar, ThisType>;
using GlobalPosition = Dune::FieldVector<Scalar, GridView::dimension>; using GlobalPosition = Dune::FieldVector<Scalar, GridView::dimension>;
...@@ -130,28 +130,10 @@ public: ...@@ -130,28 +130,10 @@ public:
materialParamsFF_.setLambda(42.); materialParamsFF_.setLambda(42.);
materialParamsFF_.setPe(0.); materialParamsFF_.setPe(0.);
{//scope it // determine maximum capillary pressure for wetting-nonwetting surface
// capillary pressure parameters using TwoPLaw = EffToAbsLaw<RegularizedBrooksCorey<Scalar>>;
FluidState fluidState ; pcMax_ = TwoPLaw::pc(materialParamsPM_, /*sw = */0.0);
Scalar S[numPhases] ; aWettingNonWettingSurfaceParams_.setPcMax(pcMax_);
Scalar capPress[numPhases];
//set saturation to inital values, this needs to be done in order for the fluidState to tell me pc
for (int phaseIdx = 0; phaseIdx < numPhases ; ++phaseIdx) {
// set saturation to zero for getting pcmax
S[phaseIdx] = 0. ;
Scalar TInitial = getParam<Scalar>("InitialConditions.TInitial");
fluidState.setSaturation(phaseIdx, S[phaseIdx]);
fluidState.setTemperature(phaseIdx,TInitial);
}
//obtain pc according to saturation
MaterialLaw::capillaryPressures(capPress, materialParamsPM_, fluidState);
using std::abs;
pcMax_ = abs(capPress[0]);
// set pressures from capillary pressures
aWettingNonWettingSurfaceParams_.setPcMax(pcMax_);
}
// wetting-non wetting: surface which goes to zero on the edges, but is a polynomial // wetting-non wetting: surface which goes to zero on the edges, but is a polynomial
aWettingNonWettingSurfaceParams_.setA1(aWettingNonWettingA1_); aWettingNonWettingSurfaceParams_.setA1(aWettingNonWettingA1_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment