Commit bac763ac authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

Partially implements FS#180 - Inconsistent naming - special status of

saturation. In particular, it deals with the capitalized "C" in the
capillary-pressure-saturation relationships:
entryPC -> entryPc
maxPC -> maxPc
pC -> pc
pCAlpha -> pcalpha
pCGW -> pcgw
pCNW -> pcnw
pCGN -> pcgn
pCHighSw -> pcHighSw
pCLowSw -> pcLowSw
setEntryPC -> setEntryPc
setMaxPC -> setMaxPc

Reviewed by Christoph.


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10758 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4568962d
......@@ -821,7 +821,7 @@ const Intersection& intersection, const CellData& cellData, const bool first)
Scalar pressBound = boundValues[pressureIdx];
//calculate consitutive relations depending on the kind of saturation used
Scalar pcBound = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*element), satW);
Scalar pcBound = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element), satW);
//determine phase pressures from primary pressure variable
Scalar pressW = 0;
......@@ -1006,7 +1006,7 @@ void FVPressure2P<TypeTag>::updateMaterialLaws()
Scalar satW = cellData.saturation(wPhaseIdx);
Scalar pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt), satW);
Scalar pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt), satW);
//determine phase pressures from primary pressure variable
Scalar pressW = 0;
......
......@@ -525,7 +525,7 @@ void FVVelocity2P<TypeTag>::calculateVelocityOnBoundary(const Intersection& inte
}
Scalar pressBound = boundValues[pressureIdx];
Scalar pcBound = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*element), satW);
Scalar pcBound = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element), satW);
//determine phase pressures from primary pressure variable
Scalar pressWBound = 0;
......
......@@ -1838,7 +1838,7 @@ void FVMPFAL2PFABoundPressure2P<TypeTag>::assemble()
}
Scalar pcBound = MaterialLaw::pC(
Scalar pcBound = MaterialLaw::pc(
problem_.spatialParams().materialLawParams(*elementPointer), satWBound);
Scalar gravityDiffBound = (problem_.bboxMax() - globalPosFace) * gravity_
......@@ -2327,7 +2327,7 @@ void FVMPFAL2PFABoundPressure2P<TypeTag>::updateMaterialLaws()
Scalar satW = cellData.saturation(wPhaseIdx);
Scalar pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt), satW);
Scalar pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt), satW);
cellData.setCapillaryPressure(pc);
......
......@@ -2652,7 +2652,7 @@ void FVMPFAL2PFABoundPressure2PAdaptive<TypeTag>::assemble()
}
Scalar pcBound = MaterialLaw::pC(
Scalar pcBound = MaterialLaw::pc(
problem_.spatialParams().materialLawParams(*elementPointer), satWBound);
Scalar gravityDiffBound = (problem_.bboxMax() - globalPosFace) * gravity_
......@@ -3372,7 +3372,7 @@ void FVMPFAL2PFABoundPressure2PAdaptive<TypeTag>::updateMaterialLaws()
Scalar satW = cellData.saturation(wPhaseIdx);
Scalar pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt), satW);
Scalar pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt), satW);
cellData.setCapillaryPressure(pc);
......
......@@ -793,7 +793,7 @@ void FVMPFAL2PFABoundVelocity2P<TypeTag>::calculateVelocity()
}
Scalar pcBound = MaterialLaw::pC(
Scalar pcBound = MaterialLaw::pc(
problem_.spatialParams().materialLawParams(*elementPointer), satWBound);
Scalar gravityDiffBound = (problem_.bboxMax() - globalPosFace) * problem_.gravity()
......
......@@ -1136,7 +1136,7 @@ void FVMPFAL2PFABoundVelocity2PAdaptive<TypeTag>::calculateVelocity()
}
Scalar pcBound = MaterialLaw::pC(
Scalar pcBound = MaterialLaw::pc(
problem_.spatialParams().materialLawParams(*elementPointer), satWBound);
Scalar gravityDiffBound = (problem_.bboxMax() - globalPosFace) * problem_.gravity()
......
......@@ -1912,7 +1912,7 @@ void FVMPFAO2PFABoundPressure2P<TypeTag>::assemble()
}
Scalar pcBound = MaterialLaw::pC(
Scalar pcBound = MaterialLaw::pc(
problem_.spatialParams().materialLawParams(*elementPointer), satWBound);
Scalar gravityDiffBound = (problem_.bboxMax() - globalPosFace) * gravity_
......@@ -2090,7 +2090,7 @@ void FVMPFAO2PFABoundPressure2P<TypeTag>::updateMaterialLaws()
Scalar satW = cellData.saturation(wPhaseIdx);
Scalar pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt), satW);
Scalar pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt), satW);
cellData.setCapillaryPressure(pc);
......
......@@ -673,7 +673,7 @@ void FVMPFAO2PFABoundVelocity2P<TypeTag>::calculateVelocity()
}
Scalar pcBound = MaterialLaw::pC(
Scalar pcBound = MaterialLaw::pc(
problem_.spatialParams().materialLawParams(*elementPointer), satWBound);
Scalar gravityDiffBound = (problem_.bboxMax() - globalPosFace) * gravity_
......
......@@ -2448,7 +2448,7 @@ void FVMPFAOPressure2P<TypeTag>::updateMaterialLaws()
Scalar satW = cellData.saturation(wPhaseIdx);
Scalar satNW = cellData.saturation(nPhaseIdx);
Scalar pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt), satW);
Scalar pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt), satW);
cellData.setSaturation(wPhaseIdx, satW);
cellData.setSaturation(nPhaseIdx, satNW);
......
......@@ -348,7 +348,7 @@ void MimeticPressure2P<TypeTag>::updateMaterialLaws()
//determine phase saturations from primary saturation variable
Scalar satW = cellData.saturation(wPhaseIdx);
Scalar pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt), satW);
Scalar pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt), satW);
cellData.setCapillaryPressure(pc);
......
......@@ -550,12 +550,12 @@ void EvalCflFluxCoats<TypeTag>::addCoatsFlux(Scalar& lambdaW, Scalar& lambdaNW,
case pw:
{
potWBound = bcValues[eqIdxPress] + density_[wPhaseIdx] * gdeltaZ;
potNWBound = bcValues[eqIdxPress] + MaterialLaw::pC(problem_.spatialParams().materialLawParams(*element), satWBound) + density_[nPhaseIdx] * gdeltaZ;
potNWBound = bcValues[eqIdxPress] + MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element), satWBound) + density_[nPhaseIdx] * gdeltaZ;
break;
}
case pn:
{
potWBound = bcValues[eqIdxPress] - MaterialLaw::pC(problem_.spatialParams().materialLawParams(*element), satWBound) + density_[wPhaseIdx] * gdeltaZ;
potWBound = bcValues[eqIdxPress] - MaterialLaw::pc(problem_.spatialParams().materialLawParams(*element), satWBound) + density_[wPhaseIdx] * gdeltaZ;
potNWBound = bcValues[eqIdxPress] + density_[nPhaseIdx] * gdeltaZ;
break;
}
......
......@@ -750,7 +750,7 @@ void FVSaturation2P<TypeTag>::getFluxOnBoundary(Scalar& update, const Intersecti
}
}
Scalar pcBound = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*elementI), satWBound);
Scalar pcBound = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*elementI), satWBound);
Scalar lambdaW = 0;
Scalar lambdaNW = 0;
......@@ -1129,7 +1129,7 @@ void FVSaturation2P<TypeTag>::updateMaterialLaws()
Scalar satW = cellData.saturation(wPhaseIdx);
Scalar satNW = cellData.saturation(nPhaseIdx);
Scalar pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt), satW);
Scalar pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt), satW);
cellData.setSaturation(wPhaseIdx, satW);
cellData.setSaturation(nPhaseIdx, satNW);
......
......@@ -988,7 +988,7 @@ void FVPressure2P2C<TypeTag>::updateMaterialLawsInElement(const Element& element
Scalar pc(0.), oldPc(0.);
if(GET_PROP_VALUE(TypeTag, EnableCapillarity))
{
pc = MaterialLaw::pC(problem().spatialParams().materialLawParams(elementI),
pc = MaterialLaw::pc(problem().spatialParams().materialLawParams(elementI),
fluidState.saturation(wPhaseIdx));
int maxiter = 5; int iterout = -1;
//start iteration loop
......@@ -1016,7 +1016,7 @@ void FVPressure2P2C<TypeTag>::updateMaterialLawsInElement(const Element& element
//update with better pressures
flashSolver.concentrationFlash2p2c(fluidState, Z1, pressure,
problem().spatialParams().porosity(elementI), problem().temperatureAtPos(globalPos));
pc = MaterialLaw::pC(problem().spatialParams().materialLawParams(elementI),
pc = MaterialLaw::pc(problem().spatialParams().materialLawParams(elementI),
fluidState.saturation(wPhaseIdx));
// TODO: get right criterion, do output for evaluation
//converge criterion
......
......@@ -881,7 +881,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::update1pMaterialLawsInElement(const El
PhaseVector pressure(0.);
Scalar pc = 0;
if(GET_PROP_VALUE(TypeTag, EnableCapillarity))
pc = MaterialLaw::pC(problem().spatialParams().materialLawParams(elementI),
pc = MaterialLaw::pc(problem().spatialParams().materialLawParams(elementI),
((presentPhaseIdx == wPhaseIdx) ? 1. : 0.)); // assign Sw = 1 if wPhase present, else 0
if(pressureType == wPhaseIdx)
{
......
......@@ -532,7 +532,7 @@ void FVPressureCompositional<TypeTag>::initialMaterialLaws(bool compositional)
Scalar pc=0.;
if(GET_PROP_VALUE(TypeTag, EnableCapillarity))
{
pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt),
pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt),
sat_0);
}
else
......@@ -595,14 +595,14 @@ void FVPressureCompositional<TypeTag>::initialMaterialLaws(bool compositional)
//update with better pressures
flashSolver.concentrationFlash2p2c(fluidState, Z1_0, pressure,
problem_.spatialParams().porosity(*eIt), problem_.temperatureAtPos(globalPos));
pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt),
pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt),
fluidState.saturation(wPhaseIdx));
// TODO: get right criterion, do output for evaluation
//converge criterion
if (abs(oldPc-pc)<10)
iter = maxiter;
pc = MaterialLaw::pC(problem_.spatialParams().materialLawParams(*eIt),
pc = MaterialLaw::pc(problem_.spatialParams().materialLawParams(*eIt),
fluidState.saturation(wPhaseIdx));
}
}
......
......@@ -860,7 +860,7 @@ void FVTransport2P2C<TypeTag>::evalBoundary(GlobalPosition globalPosFace,
Scalar satBound = primaryVariablesOnBoundary[contiWEqIdx];
if(GET_PROP_VALUE(TypeTag, EnableCapillarity))
{
Scalar pcBound = MaterialLaw::pC(problem().spatialParams().materialLawParams(*eIt),
Scalar pcBound = MaterialLaw::pc(problem().spatialParams().materialLawParams(*eIt),
satBound);
switch (pressureType)
{
......@@ -894,7 +894,7 @@ void FVTransport2P2C<TypeTag>::evalBoundary(GlobalPosition globalPosFace,
if(GET_PROP_VALUE(TypeTag, EnableCapillarity))
{
Scalar pcBound = MaterialLaw::pC(problem().spatialParams().materialLawParams(*eIt),
Scalar pcBound = MaterialLaw::pc(problem().spatialParams().materialLawParams(*eIt),
BCfluidState.saturation(wPhaseIdx));
int maxiter = 3;
//start iteration loop
......@@ -924,7 +924,7 @@ void FVTransport2P2C<TypeTag>::evalBoundary(GlobalPosition globalPosFace,
//update with better pressures
flashSolver.concentrationFlash2p2c(BCfluidState, Z1Bound, pressBound,
problem().spatialParams().porosity(*eIt), problem().temperatureAtPos(globalPosFace));
pcBound = MaterialLaw::pC(problem().spatialParams().materialLawParams(*eIt),
pcBound = MaterialLaw::pc(problem().spatialParams().materialLawParams(*eIt),
BCfluidState.saturation(wPhaseIdx));
// TODO: get right criterion, do output for evaluation
//converge criterion
......
......@@ -137,7 +137,7 @@ public:
Scalar pW = priVars[pressureIdx];
fluidState.setPressure(wPhaseIdx, pW);
fluidState.setPressure(nPhaseIdx,
pW + MaterialLaw::pC(materialParams, 1 - Sn));
pW + MaterialLaw::pc(materialParams, 1 - Sn));
}
else if (int(formulation) == pnSw) {
Scalar Sw = priVars[saturationIdx];
......@@ -147,7 +147,7 @@ public:
Scalar pN = priVars[pressureIdx];
fluidState.setPressure(nPhaseIdx, pN);
fluidState.setPressure(wPhaseIdx,
pN - MaterialLaw::pC(materialParams, Sw));
pN - MaterialLaw::pc(materialParams, Sw));
}
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
......
......@@ -216,7 +216,7 @@ public:
// calculate capillary pressure
const MaterialLawParams &materialParams =
problem.spatialParams().materialLawParams(element, fvGeometry, scvIdx);
Scalar pC = MaterialLaw::pC(materialParams, 1 - Sn);
Scalar pC = MaterialLaw::pc(materialParams, 1 - Sn);
if (formulation == pwSn) {
fluidState.setPressure(wPhaseIdx, priVars[pressureIdx]);
......
......@@ -144,7 +144,7 @@ public:
satN_ = satNMatrix_;
satW_ = satWMatrix_;
pCMatrix_ = MaterialLaw::pC(materialParamsMatrix, satWMatrix_);
pCMatrix_ = MaterialLaw::pc(materialParamsMatrix, satWMatrix_);
pC_ = pCMatrix_;
//pressures
pMatrix[wPhaseIdx] = priVars[pressureIdx];
......@@ -169,10 +169,10 @@ public:
satNFracture_ = priVars[saturationIdx];
satWFracture_ = 1 - satNFracture_;
pCFracture_ = MaterialLaw::pC(materialParamsFracture, satWFracture_);
pCFracture_ = MaterialLaw::pc(materialParamsFracture, satWFracture_);
pFract[wPhaseIdx] = priVars[pressureIdx];
pFract[nPhaseIdx] = pFract[wPhaseIdx] + pCFracture_;
pEntryMatrix_ = MaterialLaw::pC(materialParamsMatrix, 1);
pEntryMatrix_ = MaterialLaw::pc(materialParamsMatrix, 1);
//use interface condition - extended capillary pressure inteface condition
if (problem.useInterfaceCondition())
......
......@@ -186,15 +186,15 @@ public:
pg_ = priVars[pressureIdx];
// calculate capillary pressures
Scalar pCGW = MaterialLaw::pCGW(materialParams, Sw_);
Scalar pCNW = MaterialLaw::pCNW(materialParams, Sw_);
Scalar pCGN = MaterialLaw::pCGN(materialParams, Sw_ + Sn_);
Scalar pcgw = MaterialLaw::pcgw(materialParams, Sw_);
Scalar pcnw = MaterialLaw::pcnw(materialParams, Sw_);
Scalar pcgn = MaterialLaw::pcgn(materialParams, Sw_ + Sn_);
Scalar pcAlpha = MaterialLaw::pCAlpha(materialParams, Sn_);
Scalar pcAlpha = MaterialLaw::pcalpha(materialParams, Sn_);
Scalar pcNW1 = 0.0; // TODO: this should be possible to assign in the problem file
pn_ = pg_- pcAlpha * pCGN - (1.-pcAlpha)*(pCGW - pcNW1);
pw_ = pn_ - pcAlpha * pCNW - (1.-pcAlpha)*pcNW1;
pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
fluidState_.setPressure(wPhaseIdx, pw_);
fluidState_.setPressure(gPhaseIdx, pg_);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment