Skip to content
Snippets Groups Projects
Commit 0df6aa8f authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[material] Introduce set functionality for setting the regularization thresholds

enables to:
* use different regularization methods for different soils
* change regularization threshold at runtime
parent c6cd9c3b
No related branches found
No related tags found
1 merge request!230[material] Introduce set functionality for setting the regularization thresholds
......@@ -46,32 +46,38 @@ public:
RegularizedBrooksCoreyParams()
: BrooksCoreyParams()
{
setThresholdSw(0.01);
}
RegularizedBrooksCoreyParams(Scalar pe, Scalar lambda)
: BrooksCoreyParams(pe, lambda)
{
setThresholdSw(0.01);
}
/*!
* \brief Threshold saturation below which the capillary pressure
* \brief Set the threshold saturation below which the capillary pressure
* is regularized.
*
* This is just 1%. If you need a different value, overload this
* class.
* Most problems are very sensitive to this value (e.g. making it smaller
* might result in negative pressures).
*/
void setThresholdSw(Scalar thresholdSw)
{
thresholdSw_ = thresholdSw;
}
/*!
* \brief Threshold saturation below which the capillary pressure
* is regularized.
*/
Scalar thresholdSw() const
{
// Most problems are very sensitive to this value
// (e.g. making it smaller might result in negative
// pressures)
//
// If you want to use a different regularization threshold,
// overload this class and supply the new class as second
// template parameter for the RegularizedVanGenuchten law!
return 1e-2;
return thresholdSw_;
}
private:
Scalar thresholdSw_;
};
} // namespace Dumux
......
......@@ -43,28 +43,50 @@ public:
typedef ScalarT Scalar;
RegularizedLinearMaterialParams()
{}
{
setKrLowS(0.05);
setKrHighS(0.95);
}
/*!
* \brief Set the threshold saturation respective phase below
* which the relative permeability gets regularized.
*/
void setKrLowS(Scalar krLowS)
{
krLowS_ = krLowS;
}
/*!
* \brief Return the threshold saturation respective phase below
* which the relative permeability gets regularized.
*
* This is just 5%. If you need a different value, write your own
* parameter class.
*/
Scalar krLowS() const
{ return 0.05; }
{
return krLowS_;
}
/*!
* \brief Set the threshold saturation of the respective phase
* above which the relative permeability gets regularized.
*/
void setKrHighS(Scalar krHighS)
{
krHighS_ = krHighS;
}
/*!
* \brief Return the threshold saturation of the respective phase
* above which the relative permeability gets regularized.
*
* This is just 95%. If you need a different value, write your own
* parameter class.
*/
Scalar krHighS() const
{ return 0.95; }
{
return krHighS_;
}
private:
Scalar krLowS_;
Scalar krHighS_;
};
} // namespace Dumux
......
......@@ -46,71 +46,106 @@ public:
typedef VanGenuchtenParams<Scalar> Parent;
RegularizedVanGenuchtenParams()
{}
{
initialize();
}
RegularizedVanGenuchtenParams(Scalar vgAlpha,
Scalar vgN)
RegularizedVanGenuchtenParams(Scalar vgAlpha, Scalar vgN)
: Parent(vgAlpha, vgN)
{}
{
initialize();
}
/*!
* \brief Sets some default regularization thresholds
*/
void initialize()
{
setPcLowSw(0.01);
setPcHighSw(0.99);
setKrnLowSw(0.1);
setKrwHighSw(0.9);
}
/*!
* \brief Threshold saturation below which the capillary pressure
* is regularized.
* \brief Set the threshold saturation below which the capillary pressure is regularized.
*
* This is just 1%. If you need a different value, overload this
* class.
* Most problems are very sensitive to this value (e.g. making it smaller might
* result in very high capillary pressures)
*/
void setPcLowSw(Scalar pcLowSw)
{
pcLowSw_ = pcLowSw;
}
/*!
* \brief Threshold saturation below which the capillary pressure is regularized.
*/
Scalar pcLowSw() const
{
// Most problems are very sensitive to this value
// (e.g. making it smaller might result in negative
// pressures)
//
// If you want to use a different regularization threshold,
// overload this class and supply the new class as second
// template parameter for the RegularizedVanGenuchten law!
return 1e-2;
return pcLowSw_;
}
/*!
* \brief Set the threshold saturation above which the capillary pressure is regularized.
*/
void setPcHighSw(Scalar pcHighSw)
{
pcHighSw_ = pcHighSw;
}
/*!
* \brief Threshold saturation above which the capillary pressure
* is regularized.
* \brief Threshold saturation above which the capillary pressure is regularized.
*
* This is just 99%. If you need a different value, overload this
* class.
* Most problems are very sensitive to this value (e.g. making it smaller might
* result in negative capillary pressures).
*/
Scalar pcHighSw() const
{
// Most problems are very sensitive to this value
// (e.g. making it smaller might result in negative
// pressures)
//
// If you want to use a different regularization threshold,
// overload this class and supply the new class as second
// template parameter for the RegularizedVanGenuchten law!
return 99e-2;
return pcHighSw_;
}
/*!
* \brief Set the threshold saturation below which the relative
* permeability of the non-wetting phase gets regularized.
*/
void setKrnLowSw(Scalar krnLowSw)
{
krnLowSw_ = krnLowSw;
}
/*!
* \brief Threshold saturation below which the relative
* permeability of the non-wetting phase gets regularized.
*
* This is just 10%. If you need a different value, overload this
* class.
*/
Scalar krnLowSw() const
{ return 0.10; }
{
return krnLowSw_;
}
/*!
* \brief Set the threshold saturation above which the relative
* permeability of the wetting phase gets regularized.
*/
void setKrwHighSw(Scalar krwHighSw)
{
krwHighSw_ = krwHighSw;
}
/*!
* \brief Threshold saturation above which the relative
* permeability of the wetting phase gets regularized.
*
* This is just 90%. If you need a different value, overload this
* class.
*/
Scalar krwHighSw() const
{ return 0.90; }
{
return krwHighSw_;
}
private:
Scalar pcLowSw_;
Scalar pcHighSw_;
Scalar krnLowSw_;
Scalar krwHighSw_;
};
} // namespace Dumux
......
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