Skip to content

Commit f5627a4

Browse files
changed mach reynolds to use charcteristic length (#1138)
* changed mach reynolds to use charcteristic length * Update flow360/component/simulation/operating_condition/operating_condition.py Co-authored-by: Maciej Skarysz <83596707+maciej-flexcompute@users.noreply.github.com> * reynolds->reynolds_mesh_unit and reverted back to project_length_unit * Update notebook_tutorial_2D_crm.ipynb --------- Co-authored-by: Maciej Skarysz <83596707+maciej-flexcompute@users.noreply.github.com>
1 parent 36fc16b commit f5627a4

File tree

14 files changed

+39
-37
lines changed

14 files changed

+39
-37
lines changed

examples/advanced_simulations/aerodynamics/airfoils/2D_30p30n.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
reference_geometry=fl.ReferenceGeometry(
7575
moment_center=[0.25, 0, 0], moment_length=[1, 1, 1], area=0.01
7676
),
77-
operating_condition=fl.operating_condition_from_mach_reynolds(
77+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
7878
mach=0.17,
79-
reynolds=1.71e06,
79+
reynolds_mesh_unit=1.71e06,
8080
project_length_unit=1 * fl.u.m,
8181
temperature=288.16,
8282
alpha=8.5 * fl.u.deg,

examples/advanced_simulations/aerodynamics/airfoils/2D_crm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
reference_geometry=fl.ReferenceGeometry(
7575
moment_center=[0.25, 0, 0], moment_length=[1, 1, 1], area=0.01
7676
),
77-
operating_condition=fl.operating_condition_from_mach_reynolds(
77+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
7878
mach=0.2,
79-
reynolds=5e6,
79+
reynolds_mesh_unit=5e6,
8080
project_length_unit=1 * fl.u.m,
8181
temperature=272.1,
8282
alpha=16 * fl.u.deg,

examples/advanced_simulations/aerodynamics/airfoils/2D_gaw2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
reference_geometry=fl.ReferenceGeometry(
7575
moment_center=[0.25, 0, 0], moment_length=[1, 1, 1], area=0.01
7676
),
77-
operating_condition=fl.operating_condition_from_mach_reynolds(
77+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
7878
mach=0.13,
79-
reynolds=2.2e06,
79+
reynolds_mesh_unit=2.2e06,
8080
project_length_unit=1 * fl.u.m,
8181
temperature=288.16,
8282
alpha=4 * fl.u.deg,

examples/advanced_simulations/aerodynamics/user_defined_dynamics/udd_alpha_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
moment_center=[0, 0, 0],
1717
moment_length=[1.47601, 0.80167, 1.47601],
1818
),
19-
operating_condition=fl.operating_condition_from_mach_reynolds(
20-
reynolds=11.72e6,
19+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
20+
reynolds_mesh_unit=11.72e6,
2121
mach=0.84,
2222
project_length_unit=0.80167 * fl.u.m,
2323
temperature=297.78,

examples/advanced_simulations/turbomachinery/periodic_BC.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
normal=[1, 0, 0],
3030
origin=[294.65, 0, 0] * fl.u.m,
3131
)
32-
operating_condition = fl.operating_condition_from_mach_reynolds(
32+
operating_condition = fl.AerospaceCondition.from_mach_reynolds(
3333
mach=0.13989,
34-
reynolds=3200,
34+
reynolds_mesh_unit=3200,
3535
project_length_unit=1 * fl.u.m,
3636
temperature=298.25 * fl.u.K,
3737
)

examples/basic_simulations/steady/steady_3D_cylinder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
reference_geometry=fl.ReferenceGeometry(
2626
area=340, moment_center=[0, 0, 0], moment_length=[1, 1, 1]
2727
),
28-
operating_condition=fl.operating_condition_from_mach_reynolds(
29-
reynolds=5, mach=0.1, project_length_unit=fl.u.m
28+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
29+
reynolds_mesh_unit=5, mach=0.1, project_length_unit=fl.u.m
3030
),
3131
time_stepping=fl.Steady(),
3232
models=[

examples/basic_simulations/unsteady/unsteady_2D_cylinder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
reference_geometry=fl.ReferenceGeometry(
1717
area=20, moment_center=[0, 0, 0], moment_length=[1, 1, 1]
1818
),
19-
operating_condition=fl.operating_condition_from_mach_reynolds(
20-
reynolds=50, mach=0.1, project_length_unit=fl.u.m
19+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
20+
reynolds_mesh_unit=50, mach=0.1, project_length_unit=fl.u.m
2121
),
2222
models=[
2323
fl.Fluid(

examples/post_processing/field_data/volumetric_and_surface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
moment_center=[0, 0, 0],
2222
moment_length=[1.47602, 0.801672958512342, 1.47602],
2323
),
24-
operating_condition=fl.operating_condition_from_mach_reynolds(
25-
reynolds=14.6e6, mach=0.84, alpha=3.06 * fl.u.deg, project_length_unit=fl.u.m
24+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
25+
reynolds_mesh_unit=14.6e6, mach=0.84, alpha=3.06 * fl.u.deg, project_length_unit=fl.u.m
2626
),
2727
time_stepping=fl.Steady(
2828
max_steps=500, CFL=fl.RampCFL(initial=5, final=200, ramp_steps=100)

examples/post_processing/monitoring/monitors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
moment_center=[0, 0, 0],
1515
moment_length=[1.47602, 0.801672958512342, 1.47602],
1616
),
17-
operating_condition=fl.operating_condition_from_mach_reynolds(
18-
reynolds=14.6e6, mach=0.84, alpha=3.06 * fl.u.deg, project_length_unit=fl.u.m
17+
operating_condition=fl.AerospaceCondition.from_mach_reynolds(
18+
reynolds_mesh_unit=14.6e6, mach=0.84, alpha=3.06 * fl.u.deg, project_length_unit=fl.u.m
1919
),
2020
time_stepping=fl.Steady(max_steps=500),
2121
models=[

examples/tutorials/notebooks/notebook_tutorial_2D_crm.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"\n",
1515
"We will walk through all the steps such as importing modules, creating a project and assigning simulation parameters.\n",
1616
"\n",
17-
"Additionally, we will use the function `fl.operating_condition_from_mach_reynolds()`, which is often utilized when running workshop cases and allows us to define operating conditions using mach and reynolds number.\n",
17+
"Additionally, we will use the function `fl.AerospaceCondition.from_mach_reynolds()`, which is often utilized when running workshop cases and allows us to define operating conditions using mach and reynolds number.\n",
1818
"\n",
1919
"In order to get a closer look at how we describe each parameter, we will first split the simulation parameters into smaller parts, which will be assembled later on."
2020
]
@@ -906,7 +906,7 @@
906906
"metadata": {},
907907
"source": [
908908
"### Operating condition\n",
909-
"Next up is the definition of flow conditions with the help of `fl.operating_condition_from_mach_reynolds()` function, which does not require knowledge of air properties in desired conditions and instead allows the usage of mach number in conjunction with reynolds number. This is particularly useful for conducting workshop cases as we can easily simulate flow conditions for different values of reynolds number. Viscosity as well as density are going to be automatically calculated based on input parameters."
909+
"Next up is the definition of flow conditions with the help of `fl.AerospaceCondition.from_mach_reynolds()` function, which does not require knowledge of air properties in desired conditions and instead allows the usage of mach number in conjunction with reynolds number. This is particularly useful for conducting workshop cases as we can easily simulate flow conditions for different values of reynolds number. Viscosity as well as density are going to be automatically calculated based on input parameters."
910910
]
911911
},
912912
{
@@ -948,9 +948,9 @@
948948
"with fl.SI_unit_system:\n",
949949
" operating_condition_params = fl.SimulationParams(\n",
950950
" # Create operating conditions using mach and reynolds number\n",
951-
" operating_condition=fl.operating_condition_from_mach_reynolds(\n",
951+
" operating_condition=fl.AerospaceCondition.from_mach_reynolds(\n",
952952
" mach=0.2,\n",
953-
" reynolds=5e6,\n",
953+
" reynolds_mesh_unit=5e6,\n",
954954
" temperature=272.1,\n",
955955
" alpha=16 * fl.u.deg,\n",
956956
" beta=0 * fl.u.deg,\n",

0 commit comments

Comments
 (0)