diff --git a/flow360/component/simulation/models/material.py b/flow360/component/simulation/models/material.py index f666093cd..c2aaa5faf 100644 --- a/flow360/component/simulation/models/material.py +++ b/flow360/component/simulation/models/material.py @@ -255,7 +255,20 @@ class SolidMaterial(MaterialBase): class Water(MaterialBase): - """Water material used for LiquidOperatingCondition""" + """ + Water material used for :class:`LiquidOperatingCondition` + + Example + ------- + + >>> fl.Water( + ... name="Water", + ... density=1000 * fl.u.kg / fl.u.m**3, + ... dynamic_viscosity=0.001002 * fl.u.kg / fl.u.m / fl.u.s, + ... ) + + ==== + """ type: Literal["water"] = pd.Field("water", frozen=True) name: str = pd.Field(frozen=True, description="Custom name of the water with given property.") diff --git a/flow360/component/simulation/operating_condition/operating_condition.py b/flow360/component/simulation/operating_condition/operating_condition.py index 47ed17ab0..bb56002dc 100644 --- a/flow360/component/simulation/operating_condition/operating_condition.py +++ b/flow360/component/simulation/operating_condition/operating_condition.py @@ -520,6 +520,19 @@ def flow360_reynolds_number(self, length_unit: LengthType.Positive): class LiquidOperatingCondition(Flow360BaseModel): """ Operating condition for simulation of water as the only material. + + Example + ------- + + >>> fl.LiquidOperatingCondition( + ... velocity_magnitude=10 * fl.u.m / fl.u.s, + ... alpha=-90 * fl.u.deg, + ... beta=0 * fl.u.deg, + ... material=fl.Water(name="Water"), + ... reference_velocity_magnitude=5 * fl.u.m / fl.u.s, + ... ) + + ==== """ type_name: Literal["LiquidOperatingCondition"] = pd.Field(