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
2 changes: 2 additions & 0 deletions flow360/component/simulation/translator/solver_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1649,6 +1649,8 @@ def boundary_spec_translator(model: SurfaceModelTypes, op_acoustic_to_static_pre
boundary["totalTemperatureRatio"] = model_dict["totalTemperature"]
if model.velocity_direction is not None:
boundary["velocityDirection"] = list(model_dict["velocityDirection"])
if model.rotate_velocity_direction_with_mesh:
boundary["rotateVelocityDirectionWithMesh"] = True
Comment thread
NasserFlexCompute marked this conversation as resolved.
Comment thread
NasserFlexCompute marked this conversation as resolved.
if isinstance(model.spec, TotalPressure):
boundary["type"] = "SubsonicInflow"
total_pressure_ratio = model_dict["spec"]["value"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pydantic = ">=2.8,<2.12"
# -- Local dev (editable install, schema changes take effect immediately):
# flow360-schema = { path = "../../../../flex/share/flow360-schema", develop = true }
# -- CI / release (install from CodeArtifact, swap comments before pushing):
flow360-schema = { version = "~0.1.24", source = "codeartifact" }
flow360-schema = { version = "= 25.10.1b2", source = "codeartifact" }
pytest = "^7.1.2"
Comment on lines 16 to 20
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyproject.toml was updated to require flow360-schema = 25.10.1b2, but poetry.lock still pins flow360-schema to 0.1.26. This will make installs/CI non-reproducible (or fail) unless the lockfile is regenerated/updated to match the new dependency constraint.

Copilot uses AI. Check for mistakes.
click = "^8.1.3"
toml = "^0.10.2"
Expand Down
45 changes: 45 additions & 0 deletions tests/simulation/translator/test_solver_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,51 @@ def test_boundaries():
translate_and_compare(param, mesh_unit=1 * u.m, ref_json_file="Flow360_boundaries.json")


def test_rotate_velocity_direction_with_mesh():
"""Verify rotateVelocityDirectionWithMesh is emitted only when set to True."""
operating_condition = AerospaceCondition(velocity_magnitude=10 * u.m / u.s)
with SI_unit_system:
param_default = SimulationParams(
operating_condition=operating_condition,
models=[
Inflow(
name="exhaust",
total_temperature=750 * u.K,
surfaces=Surface(name="engine_face"),
spec=Supersonic(
total_pressure=3e6 * u.Pa,
static_pressure=101325 * u.Pa,
),
velocity_direction=(0, -1, 0),
),
],
)
param_enabled = SimulationParams(
operating_condition=operating_condition,
models=[
Inflow(
name="exhaust",
total_temperature=750 * u.K,
surfaces=Surface(name="engine_face"),
spec=Supersonic(
total_pressure=3e6 * u.Pa,
static_pressure=101325 * u.Pa,
),
velocity_direction=(0, -1, 0),
rotate_velocity_direction_with_mesh=True,
),
],
)

translated_default = get_solver_json(param_default, mesh_unit=1 * u.m)
bc_default = translated_default["boundaries"]["engine_face"]
assert "rotateVelocityDirectionWithMesh" not in bc_default

translated_enabled = get_solver_json(param_enabled, mesh_unit=1 * u.m)
bc_enabled = translated_enabled["boundaries"]["engine_face"]
assert bc_enabled["rotateVelocityDirectionWithMesh"] is True
Comment thread
NasserFlexCompute marked this conversation as resolved.


def test_liquid_simulation_translation():
with SI_unit_system:
param = SimulationParams(
Expand Down