Skip to content
Snippets Groups Projects
Commit c0a862b9 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'feature/instationary-channel-initial-condition' into 'master'

Change initial condition to block/parabolic profile

See merge request !1645
parents a017ba0d c353810d
No related branches found
No related tags found
1 merge request!1645Change initial condition to block/parabolic profile
...@@ -223,16 +223,14 @@ public: ...@@ -223,16 +223,14 @@ public:
if(isInlet_(globalPos)) if(isInlet_(globalPos))
{ {
if (useVelocityProfile_)
values[Indices::velocityXIdx] = parabolicProfile(globalPos[1], inletVelocity_);
else
values[Indices::velocityXIdx] = inletVelocity_;
#if NONISOTHERMAL #if NONISOTHERMAL
// give the system some time so that the pressure can equilibrate, then start the injection of the hot liquid // give the system some time so that the pressure can equilibrate, then start the injection of the hot liquid
if(time() >= 200.0) if(time() >= 200.0)
values[Indices::temperatureIdx] = 293.15; values[Indices::temperatureIdx] = 293.15;
#endif #endif
} }
else
values[Indices::velocityXIdx] = 0.0;
return values; return values;
} }
...@@ -310,13 +308,17 @@ public: ...@@ -310,13 +308,17 @@ public:
{ {
PrimaryVariables values; PrimaryVariables values;
values[Indices::pressureIdx] = outletPressure_; values[Indices::pressureIdx] = outletPressure_;
values[Indices::velocityXIdx] = 0.0;
values[Indices::velocityYIdx] = 0.0; values[Indices::velocityYIdx] = 0.0;
#if NONISOTHERMAL #if NONISOTHERMAL
values[Indices::temperatureIdx] = 283.15; values[Indices::temperatureIdx] = 283.15;
#endif #endif
if (useVelocityProfile_)
values[Indices::velocityXIdx] = parabolicProfile(globalPos[1], inletVelocity_);
else
values[Indices::velocityXIdx] = inletVelocity_;
return values; return values;
} }
......
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