Skip to content

Commit c3cbb11

Browse files
benflexcomputeflow360-auto-hotfix-bot
authored andcommitted
Bump to 25.5.6 for release (#1326)
1 parent 529aad3 commit c3cbb11

File tree

10 files changed

+106
-0
lines changed

10 files changed

+106
-0
lines changed

flow360/component/simulation/models/surface_models.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,26 @@ class TotalPressure(Flow360BaseModel):
144144
type_name: Literal["TotalPressure"] = pd.Field("TotalPressure", frozen=True)
145145
# pylint: disable=no-member
146146
value: PressureType.Positive = pd.Field(description="The total pressure value.")
147+
<<<<<<< HEAD
148+
=======
149+
velocity_direction: Optional[Axis] = pd.Field(
150+
None,
151+
description="Direction of the incoming flow. Must be a unit vector pointing "
152+
+ "into the volume. If unspecified, the direction will be normal to the surface.",
153+
)
154+
155+
@pd.model_validator(mode="after")
156+
@deprecation_reminder(version="25.5.6")
157+
def check_deprecate_velocity_direction(self):
158+
"""Check if duplicate velocity_direction set up exists."""
159+
# pylint: disable=unsupported-membership-test
160+
if "velocity_direction" in self.model_fields_set:
161+
log.warning(
162+
"Specifying `velocity_direction` in `TotalPressure` will be deprecated in the "
163+
+ "next (25.5.2) Python client release. Please specify it directly under `Inflow`."
164+
)
165+
return self
166+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
147167

148168

149169
class Pressure(SingleAttributeModel):
@@ -577,6 +597,25 @@ class Inflow(BoundaryBaseWithTurbulenceQuantities):
577597
+ "into the volume. If unspecified, the direction will be normal to the surface.",
578598
)
579599

600+
<<<<<<< HEAD
601+
=======
602+
@pd.model_validator(mode="after")
603+
@deprecation_reminder(version="25.5.6")
604+
def check_duplicate_velocity_direction_setup(self):
605+
"""Check if duplicate velocity_direction set up exists."""
606+
607+
if (
608+
self.velocity_direction
609+
and isinstance(self.spec, TotalPressure)
610+
and self.spec.velocity_direction
611+
):
612+
raise ValueError(
613+
"Duplicate `velocity_direction` setup found in `TotalPressure` and `Inflow`, "
614+
"please set `velocity_direction` in `Inflow`."
615+
)
616+
return self
617+
618+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
580619

581620
class SlipWall(BoundaryBase):
582621
""":class:`SlipWall` class defines the :code:`SlipWall` boundary condition.

flow360/component/simulation/web/draft.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,36 @@ def from_cloud(cls, draft_id: IDStringType) -> Draft:
117117
def update_simulation_params(self, params):
118118
"""update the SimulationParams of the draft"""
119119

120+
<<<<<<< HEAD
121+
=======
122+
@deprecation_reminder(version="25.5.6")
123+
def remove_none_inflow_velocity_direction_for_forward_compatibility(params_dict):
124+
"""
125+
If None `velocity_direction` is found in root level of `Inflow` then
126+
pop the key so that forward compatibility is kept within 25.5 release.
127+
"""
128+
if params_dict.get("models"):
129+
for idx, model in enumerate(params_dict["models"]):
130+
if model.get("type") != "Inflow":
131+
continue
132+
if "velocity_direction" in model.keys():
133+
params_dict["models"][idx].pop("velocity_direction")
134+
return params_dict
135+
136+
params_dict = params.model_dump(exclude_none=True)
137+
if params_dict.get("models"):
138+
# Remove hybrid_model:None to avoid triggering front end display activated toggle.
139+
for idx, model in enumerate(params_dict["models"]):
140+
if (
141+
model.get("turbulence_model_solver") is not None
142+
and model["turbulence_model_solver"].get("hybrid_model") is None
143+
):
144+
params_dict["models"][idx]["turbulence_model_solver"].pop("hybrid_model", None)
145+
break
146+
params_dict = remove_none_inflow_velocity_direction_for_forward_compatibility(
147+
params_dict=params_dict
148+
)
149+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
120150
self.post(
121151
json={
122152
"data": params.model_dump_json(exclude_none=True),

flow360/component/v1/updater.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ def _no_update(params_as_dict):
2727
("25.2.2", "25.2.3", _no_update),
2828
("25.2.3", "25.4.0", _no_update),
2929
("25.4.0", "25.4.1", _no_update),
30+
<<<<<<< HEAD
3031
("25.4.1", "25.5.*", _no_update),
3132
("25.5.*", "25.7.*", _no_update),
33+
=======
34+
("25.4.1", "25.5.2", _no_update),
35+
("25.5.2", "25.5.3", _no_update),
36+
("25.5.3", "25.5.4", _no_update),
37+
("25.5.4", "25.5.6", _no_update),
38+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
3239
]
3340

3441

flow360/version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
version
33
"""
44

5+
<<<<<<< HEAD
56
__version__ = "25.7.1b1"
67
__solver_version__ = "release-25.7"
8+
=======
9+
__version__ = "25.5.6"
10+
__solver_version__ = "release-25.5"
11+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[tool.poetry]
22
name = "flow360"
3+
<<<<<<< HEAD
34
version = "v25.7.1b1"
45
description = ""
6+
=======
7+
version = "v25.5.6"
8+
description = "Flow360 Python Client"
9+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
510
authors = ["Flexcompute <support@flexcompute.com>"]
611

712
[tool.poetry.dependencies]

tests/ref/simulation/service_init_geometry.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2+
<<<<<<< HEAD
23
"version": "25.7.1b1",
4+
=======
5+
"version": "25.5.6",
6+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
37
"unit_system": {
48
"name": "SI"
59
},

tests/ref/simulation/service_init_surface_mesh.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2+
<<<<<<< HEAD
23
"version": "25.7.1b1",
4+
=======
5+
"version": "25.5.6",
6+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
37
"unit_system": {
48
"name": "SI"
59
},

tests/ref/simulation/service_init_volume_mesh.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
2+
<<<<<<< HEAD
23
"version": "25.7.1b1",
4+
=======
5+
"version": "25.5.6",
6+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))
37
"unit_system": {
48
"name": "SI"
59
},
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
<<<<<<< HEAD
12
{"version":"25.7.1b1","unit_system":{"name":"SI"},"meshing":null,"reference_geometry":null,"operating_condition":null,"models":[{"material":{"type":"air","name":"air","dynamic_viscosity":{"reference_viscosity":{"value":0.00001716,"units":"Pa*s"},"reference_temperature":{"value":273.15,"units":"K"},"effective_temperature":{"value":110.4,"units":"K"}}},"initial_condition":{"type_name":"NavierStokesInitialCondition","constants":null,"rho":"rho","u":"u","v":"v","w":"w","p":"p"},"type":"Fluid","navier_stokes_solver":{"absolute_tolerance":1e-10,"relative_tolerance":0.0,"order_of_accuracy":2,"equation_evaluation_frequency":1,"linear_solver":{"max_iterations":30,"absolute_tolerance":null,"relative_tolerance":null},"private_attribute_dict":null,"CFL_multiplier":1.0,"kappa_MUSCL":-1.0,"numerical_dissipation_factor":1.0,"limit_velocity":false,"limit_pressure_density":false,"type_name":"Compressible","low_mach_preconditioner":false,"low_mach_preconditioner_threshold":null,"update_jacobian_frequency":4,"max_force_jac_update_physical_steps":0},"turbulence_model_solver":{"absolute_tolerance":1e-8,"relative_tolerance":0.0,"order_of_accuracy":2,"equation_evaluation_frequency":4,"linear_solver":{"max_iterations":20,"absolute_tolerance":null,"relative_tolerance":null},"private_attribute_dict":null,"CFL_multiplier":2.0,"type_name":"SpalartAllmaras","reconstruction_gradient_limiter":0.5,"quadratic_constitutive_relation":false,"modeling_constants":{"type_name":"SpalartAllmarasConsts","C_DES":0.72,"C_d":8.0,"C_cb1":0.1355,"C_cb2":0.622,"C_sigma":0.6666666666666666,"C_v1":7.1,"C_vonKarman":0.41,"C_w2":0.3,"C_t3":1.2,"C_t4":0.5,"C_min_rd":10.0},"update_jacobian_frequency":4,"max_force_jac_update_physical_steps":0,"hybrid_model":null,"rotation_correction":false, "controls":null},"transition_model_solver":{"type_name":"None"}}],"time_stepping":{"type_name":"Steady","max_steps":2000,"CFL":{"type":"adaptive","min":0.1,"max":10000.0,"max_relative_change":1.0,"convergence_limiting_factor":0.25}},"user_defined_dynamics":null,"user_defined_fields":[],"outputs":[{"name":"R1","entities":{"stored_entities":[{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"b9de2bce-36c1-4bbf-af0a-2c6a2ab713a4","name":"Point-0","location":{"value":[2.694298,0.0,1.0195910000000001],"units":"m"}}]},"output_fields":{"items":["primitiveVars"]},"output_type":"ProbeOutput"},{"name":"V3","entities":{"stored_entities":[{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"a79cffc0-31d0-499d-906c-f271c2320166","name":"Point-1","location":{"value":[4.007,0.0,-0.31760000000000005],"units":"m"}},{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"8947eb10-fc59-4102-b9c7-168a91ca22b9","name":"Point-2","location":{"value":[4.007,0.0,-0.29760000000000003],"units":"m"}},{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"27ac4e03-592b-4dba-8fa1-8f6678087a96","name":"Point-3","location":{"value":[4.007,0.0,-0.2776],"units":"m"}}]},"output_fields":{"items":["mut"]},"output_type":"ProbeOutput"}],"private_attribute_asset_cache":{"project_length_unit":null,"project_entity_info":null, "use_inhouse_mesher": false, "variable_context":null, "use_geometry_AI": false}}
3+
=======
4+
{"version":"25.5.6","unit_system":{"name":"SI"},"meshing":null,"reference_geometry":null,"operating_condition":null,"models":[{"material":{"type":"air","name":"air","dynamic_viscosity":{"reference_viscosity":{"value":0.00001716,"units":"Pa*s"},"reference_temperature":{"value":273.15,"units":"K"},"effective_temperature":{"value":110.4,"units":"K"}}},"initial_condition":{"type_name":"NavierStokesInitialCondition","constants":null,"rho":"rho","u":"u","v":"v","w":"w","p":"p"},"type":"Fluid","navier_stokes_solver":{"absolute_tolerance":1e-10,"relative_tolerance":0.0,"order_of_accuracy":2,"equation_evaluation_frequency":1,"linear_solver":{"max_iterations":30,"absolute_tolerance":null,"relative_tolerance":null},"private_attribute_dict":null,"CFL_multiplier":1.0,"kappa_MUSCL":-1.0,"numerical_dissipation_factor":1.0,"limit_velocity":false,"limit_pressure_density":false,"type_name":"Compressible","low_mach_preconditioner":false,"low_mach_preconditioner_threshold":null,"update_jacobian_frequency":4,"max_force_jac_update_physical_steps":0},"turbulence_model_solver":{"absolute_tolerance":1e-8,"relative_tolerance":0.0,"order_of_accuracy":2,"equation_evaluation_frequency":4,"linear_solver":{"max_iterations":20,"absolute_tolerance":null,"relative_tolerance":null},"private_attribute_dict":null,"CFL_multiplier":2.0,"type_name":"SpalartAllmaras","reconstruction_gradient_limiter":0.5,"quadratic_constitutive_relation":false,"modeling_constants":{"type_name":"SpalartAllmarasConsts","C_DES":0.72,"C_d":8.0,"C_cb1":0.1355,"C_cb2":0.622,"C_sigma":0.6666666666666666,"C_v1":7.1,"C_vonKarman":0.41,"C_w2":0.3,"C_t3":1.2,"C_t4":0.5,"C_min_rd":10.0},"update_jacobian_frequency":4,"max_force_jac_update_physical_steps":0,"hybrid_model":null,"rotation_correction":false},"transition_model_solver":{"type_name":"None"}}],"time_stepping":{"type_name":"Steady","max_steps":2000,"CFL":{"type":"adaptive","min":0.1,"max":10000.0,"max_relative_change":1.0,"convergence_limiting_factor":0.25}},"user_defined_dynamics":null,"user_defined_fields":[],"outputs":[{"name":"R1","entities":{"stored_entities":[{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"b9de2bce-36c1-4bbf-af0a-2c6a2ab713a4","name":"Point-0","location":{"value":[2.694298,0.0,1.0195910000000001],"units":"m"}}]},"output_fields":{"items":["primitiveVars"]},"output_type":"ProbeOutput"},{"name":"V3","entities":{"stored_entities":[{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"a79cffc0-31d0-499d-906c-f271c2320166","name":"Point-1","location":{"value":[4.007,0.0,-0.31760000000000005],"units":"m"}},{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"8947eb10-fc59-4102-b9c7-168a91ca22b9","name":"Point-2","location":{"value":[4.007,0.0,-0.29760000000000003],"units":"m"}},{"private_attribute_registry_bucket_name":"PointEntityType","private_attribute_entity_type_name":"Point","private_attribute_id":"27ac4e03-592b-4dba-8fa1-8f6678087a96","name":"Point-3","location":{"value":[4.007,0.0,-0.2776],"units":"m"}}]},"output_fields":{"items":["mut"]},"output_type":"ProbeOutput"}],"private_attribute_asset_cache":{"project_length_unit":null,"project_entity_info":null, "use_inhouse_mesher": false, "use_geometry_AI": false}}
5+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))

tests/test_current_flow360_version.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33

44
def test_version():
5+
<<<<<<< HEAD
56
assert __version__ == "25.7.1b1"
7+
=======
8+
assert __version__ == "25.5.6"
9+
>>>>>>> a2099add (Bump to 25.5.6 for release (#1326))

0 commit comments

Comments
 (0)