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

[bugfix][navierstokes][radsym] Fix rotational symmetric Navier-Stokes with pressure normalization

parent 73368d88
No related branches found
No related tags found
1 merge request!2435[bugfix][navierstokes][radsym] Fix rotational symmetric Navier-Stokes with pressure normalization
...@@ -86,6 +86,8 @@ class NavierStokesResidualImpl<TypeTag, DiscretizationMethod::staggered> ...@@ -86,6 +86,8 @@ class NavierStokesResidualImpl<TypeTag, DiscretizationMethod::staggered>
using FluxVariables = GetPropType<TypeTag, Properties::FluxVariables>; using FluxVariables = GetPropType<TypeTag, Properties::FluxVariables>;
using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
static constexpr bool normalizePressure = getPropValue<TypeTag, Properties::NormalizePressure>();
using CellCenterResidual = CellCenterPrimaryVariables; using CellCenterResidual = CellCenterPrimaryVariables;
using FaceResidual = FacePrimaryVariables; using FaceResidual = FacePrimaryVariables;
...@@ -192,7 +194,11 @@ public: ...@@ -192,7 +194,11 @@ public:
// Pressure term (needed because we incorporate pressure in terms of a surface integral). // Pressure term (needed because we incorporate pressure in terms of a surface integral).
// grad(p) becomes div(pI) + (p/r)*n_r in cylindrical coordinates. The second term // grad(p) becomes div(pI) + (p/r)*n_r in cylindrical coordinates. The second term
// is new with respect to Cartesian coordinates and handled below as a source term. // is new with respect to Cartesian coordinates and handled below as a source term.
source += insideVolVars.pressure()/r; const Scalar pressure =
normalizePressure ? insideVolVars.pressure() - problem.initial(scvf)[Indices::pressureIdx]
: insideVolVars.pressure();
source += pressure/r;
} }
} }
......
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