Skip to content
Snippets Groups Projects
Commit ae9343da authored by Ned Coltman's avatar Ned Coltman Committed by Martin Schneider
Browse files

[ex][ffpm] set the boundary condtions for SST more clearly

parent bd258aa9
No related branches found
No related tags found
1 merge request!213Feature/updates ff pm
Pipeline #30849 waiting for manual action
......@@ -382,11 +382,14 @@ freeflowProblem->updateDynamicWallProperties(freeflowSol);
In addition to designating the locations of walls,
additional boundary conditions and initial conditions need to be set for the two new primary variables $k$ and $\omega$.
In the `boundaryTypes` function, set both variables on all walls to be dirichlet, except for the right boundary, which should have outflow conditions.
For the initial conditions, Reynolds number specific base conditions should be applied everywhere.
In the problem constructor, uncomment the code calculating these terms,
then apply the `turbulentKineticEnergy_`and `dissipation_` variables to their primary variables in all locations,
except for the wall boundaries, where these values can be set to zero.
In addition, dirichlet constraints for the dissipation or $\omega$ variable will be set for all wall adjacent cells.
then apply the `turbulentKineticEnergy_`and `dissipation_` variables to their primary variables in all locations.
Within the dirichlet function for cell faces (`dirichlet(element, scvf)`),
we also need to specify that these variables should be fixed to 0 at the wall.
In addition, dirichlet cell constraints for the dissipation or $\omega$ variable will be set for all wall adjacent cells.
This is done in the `isDirichletCell` function, as well as the `dirichlet` function already, and requires no further changes.
Compile and run your new coupled problem and take a look at the results in Paraview.
......@@ -405,7 +408,7 @@ you can use symmetric boundary conditions at the top boundary of your free flow
values.setAllSymmetry();
```
In addition, you have to remove the condition `onUpperBoundary_(globalPos)` from the `initialAtPos(globalPos)` method.
In addition, you have to remove the condition `onUpperBoundary_(globalPos)` from the `initialAtPos(globalPos)` method and the `dirichlet(element, scvf)` method.
__Task C__:
......
......@@ -181,6 +181,18 @@ public:
{
const auto globalPos = scvf.ipGlobal();
PrimaryVariables values(initialAtPos(globalPos));
// TODO: dumux-course-task 3.A
// Add dirichlet conditions setting TKE and Dissipation to zero on the upper and lower walls.
// TODO: dumux-course-task 3.B
// Remove the condition `onUpperBoundary_(globalPos)` here.
// if (onUpperBoundary_(globalPos) || onLowerBoundary_(globalPos))
// {
// values[Indices::turbulentKineticEnergyIdx] = 0.0;
// values[Indices::dissipationIdx] = 0.0;
// }
}
return values;
}
......
......@@ -216,6 +216,20 @@ public:
{
const auto globalPos = scvf.ipGlobal();
PrimaryVariables values(initialAtPos(globalPos));
#if EXNUMBER == 1
if (onUpperBoundary_(globalPos) || onLowerBoundary_(globalPos))
{
values[Indices::turbulentKineticEnergyIdx] = 0.0;
values[Indices::dissipationIdx] = 0.0;
}
#elif EXNUMBER >= 2
if (onLowerBoundary_(globalPos))
{
values[Indices::turbulentKineticEnergyIdx] = 0.0;
values[Indices::dissipationIdx] = 0.0;
}
#endif
return values;
}
......@@ -327,20 +341,6 @@ public:
values[Indices::dissipationIdx] = dissipation_;
#endif
#if EXNUMBER == 1
if (onLowerBoundary_(globalPos) || onUpperBoundary_(globalPos))
{
values[Indices::turbulentKineticEnergyIdx] = 0.0;
values[Indices::dissipationIdx] = 0.0;
}
#elif EXNUMBER >= 2
if (onLowerBoundary_(globalPos) || onUpperBoundary_(globalPos))
{
values[Indices::turbulentKineticEnergyIdx] = 0.0;
values[Indices::dissipationIdx] = 0.0;
}
#endif
#if EXNUMBER >= 2
if(onLowerBoundary_(globalPos))
values[Indices::velocityXIdx] = 0.0;
......
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