Commit 3fc9cf31 authored by Melanie Lipp's avatar Melanie Lipp Committed by Ned Coltman
Browse files

[test][freeflow] Add possibility to vary the density to 2d channel test.

parent 6a74d8bc
......@@ -127,7 +127,7 @@ public:
: ParentType(gridGeometry)
{
inletVelocity_ = getParam<Scalar>("Problem.InletVelocity");
kinematicViscosity_ = getParam<Scalar>("Component.LiquidKinematicViscosity", 1.0);
dynamicViscosity_ = getParam<Scalar>("Component.LiquidKinematicViscosity", 1.0) * getParam<Scalar>("Component.LiquidDensity", 1.0);
const auto tmp = getParam<std::string>("Problem.OutletCondition", "Outflow");
if (tmp == "Outflow")
......@@ -328,7 +328,7 @@ public:
const Scalar yMax = this->gridGeometry().bBoxMax()[1];
Scalar velocityQuadraticCoefficient = - inletVelocity_ / (0.25*(yMax - yMin)*(yMax - yMin));
Scalar pressureLinearCoefficient = 2.0 * velocityQuadraticCoefficient * kinematicViscosity_;
Scalar pressureLinearCoefficient = 2.0 * velocityQuadraticCoefficient * dynamicViscosity_;
Scalar pressureConstant = -pressureLinearCoefficient * this->gridGeometry().bBoxMax()[0] + outletPressure_;
PrimaryVariables values;
......@@ -464,7 +464,7 @@ private:
static constexpr Scalar eps_=1e-6;
bool printL2Error_;
Scalar inletVelocity_;
Scalar kinematicViscosity_;
Scalar dynamicViscosity_;
Scalar outletPressure_;
OutletCondition outletCondition_;
bool useVelocityProfile_;
......
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