Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions CfdOF/Solve/CfdSolverFoam.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,47 @@ def initProperties(self, obj):
QT_TRANSLATE_NOOP("App::Property", "Global absolute solution convergence criterion"),
)

addObjectProperty(
obj,
"RelaxationU",
0.7,
"App::PropertyFloat",
"Relaxation",
QT_TRANSLATE_NOOP("App::Property", "Velocity equation relaxation factor (steady-state)"),
)
addObjectProperty(
obj,
"RelaxationP",
0.3,
"App::PropertyFloat",
"Relaxation",
QT_TRANSLATE_NOOP("App::Property", "Pressure field relaxation factor (steady-state)"),
)
addObjectProperty(
obj,
"RelaxationH",
0.7,
"App::PropertyFloat",
"Relaxation",
QT_TRANSLATE_NOOP("App::Property", "Enthalpy equation relaxation factor (steady-state)"),
)
addObjectProperty(
obj,
"RelaxationTurbulence",
0.7,
"App::PropertyFloat",
"Relaxation",
QT_TRANSLATE_NOOP("App::Property", "Turbulence equations relaxation factor (steady-state)"),
)
addObjectProperty(
obj,
"RelaxationRho",
0.5,
"App::PropertyFloat",
"Relaxation",
QT_TRANSLATE_NOOP("App::Property", "Density field relaxation factor (steady-state)"),
)

if addObjectProperty(
obj,
"StartFrom",
Expand Down
60 changes: 29 additions & 31 deletions Data/Templates/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -321,94 +321,92 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
%{%(physics/Time%)
%:Steady
equations
{
%{%(solver/SolverName%)
%:SRFSimpleFoam
Urel 0.7;
Urel %(solver/RelaxationU%);
%:default
U 0.7;
U %(solver/RelaxationU%);
%}
%{%(solver/SolverName%)
%:buoyantSimpleFoam
h 0.7;
h %(solver/RelaxationH%);
%}
%{%(physics/Turbulence%)
%:RANS DES
%{%(physics/TurbulenceModel%)
%:kOmegaSST kOmegaSSTDES kOmegaSSTDDES kOmegaSSTIDDES
k 0.7;
omega 0.7;
k %(solver/RelaxationTurbulence%);
omega %(solver/RelaxationTurbulence%);
%:kEpsilon
k 0.7;
epsilon 0.7;
k %(solver/RelaxationTurbulence%);
epsilon %(solver/RelaxationTurbulence%);
%:SpalartAllmaras SpalartAllmarasDES SpalartAllmarasDDES SpalartAllmarasIDDES
nuTilda 0.7;
nuTilda %(solver/RelaxationTurbulence%);
%:kOmegaSSTLM
k 0.7;
omega 0.7;
gammaInt 0.7;
ReThetat 0.7;
k %(solver/RelaxationTurbulence%);
omega %(solver/RelaxationTurbulence%);
gammaInt %(solver/RelaxationTurbulence%);
ReThetat %(solver/RelaxationTurbulence%);
%}
%}
%{%(scalarTransportFunctionsEnabled%)
%:True
%{%(scalarTransportFunctions%)
%(scalarTransportFunctions/%(0%)/FieldName%) 0.7;
%(scalarTransportFunctions/%(0%)/FieldName%) %(solver/RelaxationU%);
%}
%}
}

fields
{
p 0.3;
p %(solver/RelaxationP%);
%{%(solver/SolverName%)
%:buoyantSimpleFoam
p_rgh 0.3;
rho 0.5;
p_rgh %(solver/RelaxationP%);
rho %(solver/RelaxationRho%);
%}
}
%:Transient
equations
{
U 0.7;
U %(solver/RelaxationU%);
UFinal 1;
%{%(solver/SolverName%)
%:buoyantPimpleFoam
h 0.7;
h %(solver/RelaxationH%);
hFinal 1;
%}
%{%(physics/Turbulence%)
%:RANS DES LES
%{%(physics/TurbulenceModel%)
%:kOmegaSST kOmegaSSTDES kOmegaSSTDDES kOmegaSSTIDDES
k 0.7;
k %(solver/RelaxationTurbulence%);
kFinal 1;
omega 0.7;
omega %(solver/RelaxationTurbulence%);
omegaFinal 1;
%:kEpsilon
k 0.7;
k %(solver/RelaxationTurbulence%);
kFinal 1;
epsilon 0.7;
epsilon %(solver/RelaxationTurbulence%);
epsilonFinal 1;
%:SpalartAllmaras SpalartAllmarasDES SpalartAllmarasDDES SpalartAllmarasIDDES
nuTilda 0.7;
nuTilda %(solver/RelaxationTurbulence%);
nuTildaFinal 1;
%:kOmegaSSTLM
k 0.7;
k %(solver/RelaxationTurbulence%);
kFinal 1;
omega 0.7;
omega %(solver/RelaxationTurbulence%);
omegaFinal 1;
gammaInt 0.7;
gammaInt %(solver/RelaxationTurbulence%);
gammaIntFinal 1;
ReThetat 0.7;
ReThetat %(solver/RelaxationTurbulence%);
ReThetatFinal 1;
%:kEqn
k 0.7;
k %(solver/RelaxationTurbulence%);
kFinal 1;
%}
%}
Expand All @@ -419,7 +417,7 @@ relaxationFactors
%{%(scalarTransportFunctionsEnabled%)
%:True
%{%(scalarTransportFunctions%)
%(scalarTransportFunctions/%(0%)/FieldName%) 0.7;
%(scalarTransportFunctions/%(0%)/FieldName%) %(solver/RelaxationU%);
%(scalarTransportFunctions/%(0%)/FieldName%)Final 1;
%}
%}
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/BatteryCooling/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/DamBreak3D/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/Duct/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/Elbow/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/LESStep/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/Projectile/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/Propeller/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/UAV/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/ViscousTubeBundle/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
2 changes: 0 additions & 2 deletions Data/TestFiles/cases/block/case/system/fvSolution
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ solvers

relaxationFactors
{
// Conservative settings to solve reliably on bad
// meshes
equations
{
U 0.7;
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<!--[ Versions ]―――――――――――――――――――――――――――――――――――――――――――――――――――――――――-->

<freecadmin>1.0.0</freecadmin>
<version>1.34.16</version>
<date>2026-04-16</date>
<version>1.34.18</version>
<date>2026-04-19</date>

<!--[ Dependencies ]―――――――――――――――――――――――――――――――――――――――――――――――――――――-->

Expand Down