Skip to content
Merged
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
4 changes: 2 additions & 2 deletions flow360/component/simulation/models/solver_numerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ class DetachedEddySimulation(Flow360BaseModel):
"``DDES`` (Delayed Detached Eddy Simulation proposed by Spalart 2006) and ``ZDES`` "
"(proposed by Deck and Renard 2020).",
)
grid_size_for_LES: Literal["maxEdgeLength", "meanEdgeLength"] = pd.Field(
grid_size_for_LES: Literal["maxEdgeLength", "meanEdgeLength", "shearLayerAdapted"] = pd.Field(
"maxEdgeLength",
description="Specifies the length used for the computation of LES length scale. "
+ "The allowed inputs are :code:`maxEdgeLength` and :code:`meanEdgeLength`.",
+ "The allowed inputs are :code:`maxEdgeLength`, :code:`meanEdgeLength` and :code:`shearLayerAdapted`.",
)


Expand Down
9 changes: 9 additions & 0 deletions tests/simulation/params/test_validators_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,15 @@ def test_hybrid_model_for_unsteady_validator(
SimulationParams(models=[fluid_model_with_hybrid_model])


def test_hybrid_model_grid_size_for_LES():
for valid_option in ["maxEdgeLength", "meanEdgeLength", "shearLayerAdapted"]:
des = DetachedEddySimulation(grid_size_for_LES=valid_option)
assert des.grid_size_for_LES == valid_option

with pytest.raises(pd.ValidationError):
DetachedEddySimulation(grid_size_for_LES="invalidOption")


def test_hybrid_model_to_use_zonal_enforcement(fluid_model, fluid_model_with_hybrid_model):

fluid_model_with_hybrid_model.turbulence_model_solver.controls = [
Expand Down
Loading