Template cases: automatically set relaxationFactors for steady-state and transient simulation

This commit is contained in:
Chris Greenshields
2023-08-17 09:21:39 +01:00
parent 07b434e098
commit dd23a7dbe8
4 changed files with 64 additions and 15 deletions

View File

@ -78,18 +78,32 @@ potentialFlow
nNonOrthogonalCorrectors 10; nNonOrthogonalCorrectors 10;
} }
// timeScheme = steadyState for a steady-state simulation; otherwise transient
timeScheme $fvSchemes!ddtSchemes/default;
#ifeq $timeScheme steadyState
relaxationFactors relaxationFactors
{ {
// Steady-state relaxation factors
fields fields
{ {
p_rgh 0.7; p 0.3;
} }
equations equations
{ {
U 0.3; U 0.7;
e 0.5;
"(k|omega|epsilon)" 0.7; "(k|omega|epsilon)" 0.7;
} }
} }
#else
relaxationFactors
{
// Transient relaxation factors
equations
{
".*" 1;
}
}
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -95,8 +95,13 @@ potentialFlow
nNonOrthogonalCorrectors 10; nNonOrthogonalCorrectors 10;
} }
// timeScheme = steadyState for a steady-state simulation; otherwise transient
timeScheme $fvSchemes!ddtSchemes/default;
#ifeq $timeScheme steadyState
relaxationFactors relaxationFactors
{ {
// Steady-state relaxation factors
fields fields
{ {
p 0.3; p 0.3;
@ -107,10 +112,15 @@ relaxationFactors
"(k|omega|epsilon)" 0.7; "(k|omega|epsilon)" 0.7;
} }
} }
#else
cache relaxationFactors
{ {
grad(U); // Transient relaxation factors
equations
{
".*" 1;
} }
}
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -77,8 +77,13 @@ potentialFlow
nNonOrthogonalCorrectors 10; nNonOrthogonalCorrectors 10;
} }
// timeScheme = steadyState for a steady-state simulation; otherwise transient
timeScheme $fvSchemes!ddtSchemes/default;
#ifeq $timeScheme steadyState
relaxationFactors relaxationFactors
{ {
// Steady-state relaxation factors
fields fields
{ {
p 0.3; p 0.3;
@ -89,5 +94,15 @@ relaxationFactors
"(k|omega|epsilon)" 0.7; "(k|omega|epsilon)" 0.7;
} }
} }
#else
relaxationFactors
{
// Transient relaxation factors
equations
{
".*" 1;
}
}
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -95,8 +95,13 @@ potentialFlow
nNonOrthogonalCorrectors 10; nNonOrthogonalCorrectors 10;
} }
// timeScheme = steadyState for a steady-state simulation; otherwise transient
timeScheme $fvSchemes!ddtSchemes/default;
#ifeq $timeScheme steadyState
relaxationFactors relaxationFactors
{ {
// Steady-state relaxation factors
fields fields
{ {
p 0.3; p 0.3;
@ -107,10 +112,15 @@ relaxationFactors
"(k|omega|epsilon)" 0.7; "(k|omega|epsilon)" 0.7;
} }
} }
#else
cache relaxationFactors
{ {
grad(U); // Transient relaxation factors
equations
{
".*" 1;
} }
}
#endif
// ************************************************************************* // // ************************************************************************* //