Skip to content
Snippets Groups Projects
Commit 0e6f7a14 authored by Timo Koch's avatar Timo Koch
Browse files

[test][ff][pipe] Test for non-zero initial pressure

parent 6a1fa49a
No related branches found
No related tags found
1 merge request!2435[bugfix][navierstokes][radsym] Fix rotational symmetric Navier-Stokes with pressure normalization
...@@ -9,8 +9,7 @@ Grading1 = 1 ...@@ -9,8 +9,7 @@ Grading1 = 1
[Problem] [Problem]
Name = test_ff_stokes_channel_pipe Name = test_ff_stokes_channel_pipe
MeanInletVelocity = 0.1 # [m/s] MeanInletVelocity = 0.1 # [m/s]
InitialPressure = 1.0e5 # [Pa]
[Problem]
EnableGravity = false EnableGravity = false
EnableInertiaTerms = false EnableInertiaTerms = false
......
...@@ -52,6 +52,7 @@ public: ...@@ -52,6 +52,7 @@ public:
{ {
name_ = getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name"); name_ = getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
meanInletVelocity_ = getParamFromGroup<Scalar>(this->paramGroup(), "Problem.MeanInletVelocity"); meanInletVelocity_ = getParamFromGroup<Scalar>(this->paramGroup(), "Problem.MeanInletVelocity");
initialPressure_ = getParamFromGroup<Scalar>(this->paramGroup(), "Problem.InitialPressure");
mu_ = getParam<Scalar>("Component.LiquidKinematicViscosity")*getParam<Scalar>("Component.LiquidDensity"); mu_ = getParam<Scalar>("Component.LiquidKinematicViscosity")*getParam<Scalar>("Component.LiquidDensity");
pipeRadius_ = this->gridGeometry().bBoxMax()[0] - this->gridGeometry().bBoxMin()[0]; pipeRadius_ = this->gridGeometry().bBoxMax()[0] - this->gridGeometry().bBoxMin()[0];
...@@ -109,7 +110,11 @@ public: ...@@ -109,7 +110,11 @@ public:
{ return analyticalSolution(globalPos); } { return analyticalSolution(globalPos); }
PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const
{ return PrimaryVariables(0.0); } {
PrimaryVariables values(0.0);
values[Indices::pressureIdx] = initialPressure_;
return values;
}
PrimaryVariables analyticalSolution(const GlobalPosition& globalPos) const PrimaryVariables analyticalSolution(const GlobalPosition& globalPos) const
{ {
...@@ -139,6 +144,7 @@ private: ...@@ -139,6 +144,7 @@ private:
{ return globalPos[1] > this->gridGeometry().bBoxMax()[1] - eps_; } { return globalPos[1] > this->gridGeometry().bBoxMax()[1] - eps_; }
std::string name_; std::string name_;
Scalar initialPressure_;
Scalar meanInletVelocity_; Scalar meanInletVelocity_;
Scalar mu_; Scalar mu_;
Scalar pipeRadius_, pipeLength_; Scalar pipeRadius_, pipeLength_;
......
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