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

3p: remove unnecessary specializations, correct naming

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11266 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent da99fa62
......@@ -100,58 +100,6 @@ class ThreePModel: public GET_PROP_TYPE(TypeTag, BaseModel)
enum { dofCodim = isBox ? dim : 0 };
public:
/*!
* \brief Initialize the static data with the initial solution.
*
* \param problem The problem to be solved
*/
void init(Problem &problem)
{
ParentType::init(problem);
if (isBox)
{
VertexIterator vIt = this->gridView_().template begin<dim> ();
const VertexIterator &vEndIt = this->gridView_().template end<dim> ();
for (; vIt != vEndIt; ++vIt)
{
int globalIdx = this->dofMapper().map(*vIt);
const GlobalPosition &globalPos = vIt->geometry().corner(0);
}
}
else
{
ElementIterator eIt = this->gridView_().template begin<0> ();
const ElementIterator &eEndIt = this->gridView_().template end<0> ();
for (; eIt != eEndIt; ++eIt)
{
int globalIdx = this->dofMapper().map(*eIt);
const GlobalPosition &globalPos = eIt->geometry().center();
}
}
}
/*!
* \brief Called by the update() method if applying the newton
* method was unsuccessful.
*/
void updateFailed()
{
ParentType::updateFailed();
};
/*!
* \brief Called by the problem if a time integration was
* successful, post processing of the solution is done and the
* result has been written to disk.
*
* This should prepare the model for the next time integration.
*/
void advanceTimeLevel()
{
ParentType::advanceTimeLevel();
}
/*!
* \brief Append all quantities of interest which can be derived
* from the solution of the current time step to the VTK
......
......@@ -108,8 +108,6 @@ public:
const MaterialLawParams &materialParams =
problem.spatialParams().materialLawParams(element, fvGeometry, scvIdx);
int globalIdx = problem.model().dofMapper().map(element, scvIdx, dofCodim);
Scalar temp = Implementation::temperature_(priVars, problem, element, fvGeometry, scvIdx);
fluidState_.setTemperature(temp);
......
......@@ -232,30 +232,26 @@ public:
Scalar y = globalPos[1];
Scalar x = globalPos[0];
Scalar Sw, Swr=0.12, Sgr=0.03;
Scalar sw, swr=0.12, sgr=0.03;
if(y >(-1.E-3*x+5) )
{
Scalar pc = 9.81 * 1000.0 * (y - (-5E-4*x+5));
if (pc < 0.0) pc = 0.0;
Sw = invertPCGW_(pc,
sw = invertPcgw_(pc,
this->spatialParams().materialLawParams());
if (Sw < Swr) Sw = Swr;
if (Sw > 1.-Sgr) Sw = 1.-Sgr;
if (sw < swr) sw = swr;
if (sw > 1.-sgr) sw = 1.-sgr;
values[pressureIdx] = 1e5 ;
values[swIdx] = Sw;
values[swIdx] = sw;
values[snIdx] = 0.;
}else {
values[pressureIdx] = 1e5 + 9.81 * 1000.0 * ((-5E-4*x+5) - y);
values[swIdx] = 1.-Sgr;
values[swIdx] = 1.-sgr;
values[snIdx] = 0.;
}
//initial_(values, globalPos, element);
//const MaterialLawParams& materialParams = this->spatialParams().materialLawParams();;
//MaterialLaw::pCGW(materialParams, 1.0);
}
/*!
......@@ -338,53 +334,53 @@ private:
{
Scalar y = globalPos[1];
Scalar x = globalPos[0];
Scalar Sw, Swr=0.12, Sgr=0.03;
Scalar sw, swr=0.12, sgr=0.03;
if(y >(-1.E-3*x+5) )
{
Scalar pc = 9.81 * 1000.0 * (y - (-5E-4*x+5));
if (pc < 0.0) pc = 0.0;
Sw = invertPCGW_(pc,
sw = invertPcgw_(pc,
this->spatialParams().materialLawParams());
if (Sw < Swr) Sw = Swr;
if (Sw > 1.-Sgr) Sw = 1.-Sgr;
if (sw < swr) sw = swr;
if (sw > 1.-sgr) sw = 1.-sgr;
values[pressureIdx] = 1e5 ;
values[swIdx] = Sw;
values[swIdx] = sw;
values[snIdx] = 0.;
}else {
values[pressureIdx] = 1e5 + 9.81 * 1000.0 * ((-5E-4*x+5) - y);
values[swIdx] = 1.-Sgr;
values[swIdx] = 1.-sgr;
values[snIdx] = 0.;
}
}
static Scalar invertPCGW_(Scalar pcIn, const MaterialLawParams &pcParams)
static Scalar invertPcgw_(Scalar pcIn, const MaterialLawParams &pcParams)
{
Scalar lower,upper;
int k;
int maxIt = 50;
Scalar bisLimit = 1.;
Scalar Sw, pcGW;
Scalar sw, pcgw;
lower=0.0; upper=1.0;
for (k=1; k<=25; k++)
{
Sw = 0.5*(upper+lower);
pcGW = MaterialLaw::pCGW(pcParams, Sw);
Scalar delta = pcGW-pcIn;
sw = 0.5*(upper+lower);
pcgw = MaterialLaw::pcgw(pcParams, sw);
Scalar delta = pcgw-pcIn;
if (delta<0.) delta*=-1.;
if (delta<bisLimit)
{
return(Sw);
return(sw);
}
if (k==maxIt) {
return(Sw);
return(sw);
}
if (pcGW>pcIn) lower=Sw;
else upper=Sw;
if (pcgw>pcIn) lower=sw;
else upper=sw;
}
return(Sw);
return(sw);
}
Scalar temperature_;
......
......@@ -116,22 +116,22 @@ public:
coarseK_ = GET_RUNTIME_PARAM(TypeTag, Scalar, permeability);
// porosities
Porosity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, porosity);
porosity_ = GET_RUNTIME_PARAM(TypeTag, Scalar, porosity);
// residual saturations
MaterialParams_.setSwr(0.12);
MaterialParams_.setSwrx(0.12);
MaterialParams_.setSnr(0.07);
MaterialParams_.setSgr(0.03);
materialParams_.setSwr(0.12);
materialParams_.setSwrx(0.12);
materialParams_.setSnr(0.07);
materialParams_.setSgr(0.03);
// parameters for the 3phase van Genuchten law
MaterialParams_.setVgAlpha(GET_RUNTIME_PARAM(TypeTag, Scalar, vanGenuchtenAlpha));
MaterialParams_.setVgN(GET_RUNTIME_PARAM(TypeTag, Scalar, vanGenuchtenN));
MaterialParams_.setkrRegardsSnr(false);
materialParams_.setVgAlpha(GET_RUNTIME_PARAM(TypeTag, Scalar, vanGenuchtenAlpha));
materialParams_.setVgn(GET_RUNTIME_PARAM(TypeTag, Scalar, vanGenuchtenN));
materialParams_.setKrRegardsSnr(false);
// parameters for adsorption
MaterialParams_.setKdNAPL(0.);
MaterialParams_.setRhoBulk(1500.);
materialParams_.setKdNAPL(0.);
materialParams_.setRhoBulk(1500.);
}
~InfiltrationSpatialParams()
......@@ -178,12 +178,7 @@ public:
const FVElementGeometry &fvElemGeom,
int scvIdx) const
{
//const GlobalPosition &pos = fvElemGeom.subContVol[scvIdx].global;
// if (isFineMaterial_(pos))
// return finePorosity_;
// else
// return coarsePorosity_;
return Porosity_;
return porosity_;
}
......@@ -198,12 +193,7 @@ public:
const FVElementGeometry &fvElemGeom,
int scvIdx) const
{
//const GlobalPosition &pos = fvElemGeom.subContVol[scvIdx].global;
//if (isFineMaterial_(pos))
//return fineMaterialParams_;
//else
//return coarseMaterialParams_;
return MaterialParams_;
return materialParams_;
}
/*!
......@@ -273,7 +263,7 @@ public:
const MaterialLawParams& materialLawParams() const
{
return MaterialParams_;
return materialParams_;
}
private:
bool isFineMaterial_(const GlobalPosition &pos) const
......@@ -285,9 +275,9 @@ private:
Scalar fineK_;
Scalar coarseK_;
Scalar Porosity_;
Scalar porosity_;
MaterialLawParams MaterialParams_;
MaterialLawParams materialParams_;
};
}
......
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