Skip to content

Commit 6436a18

Browse files
authored
Low reynolds SA correction interface (#1408)
* added option for low reynolds number correction for SA * added solver translator test for SA low reynolds correction option * fixed unit tests and changed default value for low_reynolds_correction to none and made it optional * added low_reynolds_correction to json file to get test to pass * changed default for low_reynolds_correction in SA model from None to False updated json files in solver translator to add default false option * updated json file to add new default option * updated more json files * added option to change C_w4 and C_w5 in python interface updated json files for unit tests
1 parent 0c6e0a5 commit 6436a18

40 files changed

+677
-345
lines changed

flow360/component/simulation/models/solver_numerics.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ class SpalartAllmarasModelConstants(Flow360BaseModel):
170170
C_v1: NonNegativeFloat = pd.Field(7.1)
171171
C_vonKarman: NonNegativeFloat = pd.Field(0.41)
172172
C_w2: float = pd.Field(0.3)
173+
C_w4: float = pd.Field(0.21)
174+
C_w5: float = pd.Field(1.5)
173175
C_t3: NonNegativeFloat = pd.Field(1.2)
174176
C_t4: NonNegativeFloat = pd.Field(0.5)
175177
C_min_rd: NonNegativeFloat = pd.Field(10.0)
@@ -426,6 +428,10 @@ class SpalartAllmaras(TurbulenceModelSolver):
426428
+ "variables at the faces (specified in the range [0.0, 2.0]). 0.0 corresponds to "
427429
+ "setting the gradient equal to zero, and 2.0 means no limiting.",
428430
)
431+
low_reynolds_correction: Optional[bool] = pd.Field(
432+
False,
433+
description="Use low Reynolds number correction for Spalart-Allmaras turbulence model",
434+
)
429435

430436

431437
class NoneSolver(Flow360BaseModel):

flow360/component/simulation/translator/solver_translator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,8 @@ def rename_modeling_constants(modeling_constants):
13761376
replace_dict_key(modeling_constants, "CV1", "C_v1")
13771377
replace_dict_key(modeling_constants, "CVonKarman", "C_vonKarman")
13781378
replace_dict_key(modeling_constants, "CW2", "C_w2")
1379+
replace_dict_key(modeling_constants, "CW4", "C_w4")
1380+
replace_dict_key(modeling_constants, "CW5", "C_w5")
13791381
replace_dict_key(modeling_constants, "CT3", "C_t3")
13801382
replace_dict_key(modeling_constants, "CT4", "C_t4")
13811383
replace_dict_key(modeling_constants, "CMinRd", "C_min_rd")

0 commit comments

Comments
 (0)