Skip to content

Commit c580137

Browse files
Merge branch 'develop' into expressions
2 parents 858413d + 45aeaeb commit c580137

File tree

125 files changed

+67638
-1113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+67638
-1113
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ coverage.xml
176176
.pytest_cache/
177177
cover/
178178

179+
# Matplotlib testing
180+
result_images/
181+
179182
# Translations
180183
*.mo
181184
*.pot

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
cylinder5 = fl.Cylinder(
2727
name="cylinder5", axis=[-1, 0, 0], center=[6.5, 0.5, 0], outer_radius=6.5, height=10
2828
)
29-
farfield = fl.AutomatedFarfield(name="farfield", method="quasi-3d")
29+
farfield = fl.AutomatedFarfield(method="quasi-3d")
3030
params = fl.SimulationParams(
3131
meshing=fl.MeshingParams(
3232
defaults=fl.MeshingDefaults(
@@ -90,10 +90,9 @@
9090
surfaces=[
9191
geometry["*"],
9292
],
93-
name="wall",
9493
),
95-
fl.Freestream(surfaces=farfield.farfield, name="Freestream"),
96-
fl.SlipWall(surfaces=farfield.symmetry_planes, name="slipwall"),
94+
fl.Freestream(surfaces=farfield.farfield),
95+
fl.SlipWall(surfaces=farfield.symmetry_planes),
9796
fl.Fluid(
9897
navier_stokes_solver=fl.NavierStokesSolver(
9998
absolute_tolerance=1e-11,
@@ -109,7 +108,6 @@
109108
],
110109
outputs=[
111110
fl.VolumeOutput(
112-
name="VolumeOutput",
113111
output_fields=[
114112
"primitiveVars",
115113
"vorticity",
@@ -122,7 +120,6 @@
122120
],
123121
),
124122
fl.SurfaceOutput(
125-
name="SurfaceOutput",
126123
surfaces=geometry["*"],
127124
output_fields=["primitiveVars", "Cp", "Cf", "CfVec", "yPlus"],
128125
),

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
cylinder5 = fl.Cylinder(
2727
name="cylinder5", axis=[-1, 0, 0], center=[6.5, 0.5, 0], outer_radius=6.5, height=10
2828
)
29-
farfield = fl.AutomatedFarfield(name="farfield", method="quasi-3d")
29+
farfield = fl.AutomatedFarfield(method="quasi-3d")
3030
params = fl.SimulationParams(
3131
meshing=fl.MeshingParams(
3232
defaults=fl.MeshingDefaults(
@@ -90,10 +90,9 @@
9090
surfaces=[
9191
geometry["*"],
9292
],
93-
name="wall",
9493
),
95-
fl.Freestream(surfaces=farfield.farfield, name="Freestream"),
96-
fl.SlipWall(surfaces=farfield.symmetry_planes, name="slipwall"),
94+
fl.Freestream(surfaces=farfield.farfield),
95+
fl.SlipWall(surfaces=farfield.symmetry_planes),
9796
fl.Fluid(
9897
navier_stokes_solver=fl.NavierStokesSolver(
9998
absolute_tolerance=1e-11,
@@ -109,7 +108,6 @@
109108
],
110109
outputs=[
111110
fl.VolumeOutput(
112-
name="fl.VolumeOutput",
113111
output_fields=[
114112
"primitiveVars",
115113
"vorticity",
@@ -122,7 +120,6 @@
122120
],
123121
),
124122
fl.SurfaceOutput(
125-
name="fl.SurfaceOutput",
126123
surfaces=geometry["*"],
127124
output_fields=["primitiveVars", "Cp", "Cf", "CfVec", "yPlus"],
128125
),

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
cylinder5 = fl.Cylinder(
2727
name="cylinder5", axis=[-1, 0, 0], center=[6.5, 0.5, 0], outer_radius=6.5, height=10
2828
)
29-
farfield = fl.AutomatedFarfield(name="farfield", method="quasi-3d")
29+
farfield = fl.AutomatedFarfield(method="quasi-3d")
3030
params = fl.SimulationParams(
3131
meshing=fl.MeshingParams(
3232
defaults=fl.MeshingDefaults(
@@ -90,10 +90,9 @@
9090
surfaces=[
9191
geometry["*"],
9292
],
93-
name="wall",
9493
),
95-
fl.Freestream(surfaces=farfield.farfield, name="Freestream"),
96-
fl.SlipWall(surfaces=farfield.symmetry_planes, name="slipwall"),
94+
fl.Freestream(surfaces=farfield.farfield),
95+
fl.SlipWall(surfaces=farfield.symmetry_planes),
9796
fl.Fluid(
9897
navier_stokes_solver=fl.NavierStokesSolver(
9998
absolute_tolerance=1e-11,
@@ -109,7 +108,6 @@
109108
],
110109
outputs=[
111110
fl.VolumeOutput(
112-
name="VolumeOutput",
113111
output_fields=[
114112
"primitiveVars",
115113
"vorticity",
@@ -122,7 +120,6 @@
122120
],
123121
),
124122
fl.SurfaceOutput(
125-
name="SurfaceOutput",
126123
surfaces=geometry["*"],
127124
output_fields=["primitiveVars", "Cp", "Cf", "CfVec", "yPlus"],
128125
),

examples/advanced_simulations/aerodynamics/dynamic_derivatives/dynamic_derivatives.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
entities=cylinder,
3333
enclosed_entities=geometry["wing"],
3434
)
35-
farfield = fl.AutomatedFarfield(name="farfield")
35+
farfield = fl.AutomatedFarfield()
3636
params = fl.SimulationParams(
3737
meshing=fl.MeshingParams(
3838
defaults=fl.MeshingDefaults(
@@ -70,13 +70,11 @@
7070
),
7171
outputs=[
7272
fl.VolumeOutput(
73-
name="VolumeOutput",
7473
output_fields=[
7574
"Mach",
7675
],
7776
),
7877
fl.SurfaceOutput(
79-
name="SurfaceOutput",
8078
surfaces=geometry["*"],
8179
output_fields=[
8280
"Cp",
@@ -89,8 +87,8 @@
8987
volumes=cylinder,
9088
spec=fl.AngularVelocity(0 * fl.u.rad / fl.u.s),
9189
),
92-
fl.Freestream(surfaces=farfield.farfield, name="Freestream"),
93-
fl.Wall(surfaces=geometry["wing"], name="NoSlipWall"),
90+
fl.Freestream(surfaces=farfield.farfield),
91+
fl.Wall(surfaces=geometry["wing"]),
9492
fl.Fluid(
9593
navier_stokes_solver=fl.NavierStokesSolver(
9694
absolute_tolerance=1e-9,

examples/advanced_simulations/aerodynamics/user_defined_dynamics/udd_alpha_controller.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
beta=0 * fl.u.deg,
2626
),
2727
models=[
28-
fl.Wall(name="NoSlipWall", surfaces=[volume_mesh["1"]]),
29-
fl.SlipWall(name="SlipWall", surfaces=[volume_mesh["2"]]),
30-
fl.Freestream(name="Freestream", surfaces=[volume_mesh["3"]]),
28+
fl.Wall(surfaces=[volume_mesh["1"]]),
29+
fl.SlipWall(surfaces=[volume_mesh["2"]]),
30+
fl.Freestream(surfaces=[volume_mesh["3"]]),
3131
],
3232
time_stepping=fl.Steady(
3333
max_steps=2000,

examples/advanced_simulations/aerodynamics/user_defined_dynamics/udd_forces_and_moments.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
box1 = fl.Box(name="box1", size=[2, 6, 3], center=[6.5, 9, 0], axis_of_rotation=[0, 1, 0])
1818
box2 = fl.Box(name="box2", size=[2, 6, 3], center=[6.5, -9, 0], axis_of_rotation=[0, 1, 0])
1919
box3 = fl.Box(name="box3", size=[4, 8, 3], center=[12, 0, 2], axis_of_rotation=[0, 1, 0])
20-
farfield = fl.AutomatedFarfield(name="farfield")
20+
farfield = fl.AutomatedFarfield()
2121
params = fl.SimulationParams(
2222
meshing=fl.MeshingParams(
2323
defaults=fl.MeshingDefaults(
@@ -60,10 +60,9 @@
6060
),
6161
),
6262
fl.Wall(
63-
name="NoSlipWall",
6463
surfaces=[geometry["*Left"], geometry["*Right"], geometry["fuselage"]],
6564
),
66-
fl.Freestream(name="Freestream", surfaces=[farfield.farfield]),
65+
fl.Freestream(surfaces=[farfield.farfield]),
6766
],
6867
time_stepping=fl.Steady(max_steps=5000),
6968
outputs=[

examples/advanced_simulations/heat_transfer/cht_solver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
],
6363
outputs=[
6464
fl.VolumeOutput(
65-
name="fl.VolumeOutput",
6665
output_format="both",
6766
output_fields=[
6867
"primitiveVars",
@@ -72,7 +71,6 @@
7271
],
7372
),
7473
fl.SurfaceOutput(
75-
name="fl.SurfaceOutput",
7674
surfaces=volume_mesh["*"],
7775
output_format="both",
7876
output_fields=["primitiveVars", "T", "Cp", "Cf", "CfVec"],

examples/advanced_simulations/rotorcraft/BET_Disk.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
geometry.group_edges_by_tag("edgeName")
1515

1616

17-
bet = json.loads(open(TutorialBETDisk.extra["disk0"]).read())
17+
bet = fl.BETDisk.from_file(TutorialBETDisk.extra["disk0"])
1818

1919
with fl.SI_unit_system:
2020
cylinder1 = fl.Cylinder(
@@ -33,7 +33,7 @@
3333
inner_radius=0,
3434
height=5,
3535
)
36-
farfield = fl.AutomatedFarfield(name="farfield", method="auto")
36+
farfield = fl.AutomatedFarfield()
3737
params = fl.SimulationParams(
3838
meshing=fl.MeshingParams(
3939
defaults=fl.MeshingDefaults(
@@ -93,15 +93,13 @@
9393
),
9494
outputs=[
9595
fl.VolumeOutput(
96-
name="VolumeOutput",
9796
output_fields=[
9897
"primitiveVars",
9998
"betMetrics",
10099
"qcriterion",
101100
],
102101
),
103102
fl.SurfaceOutput(
104-
name="SurfaceOutput",
105103
surfaces=geometry["*"],
106104
output_fields=[
107105
"primitiveVars",
@@ -117,10 +115,9 @@
117115
geometry["wing"],
118116
geometry["tip"],
119117
],
120-
name="wall",
121118
),
122-
fl.Freestream(surfaces=farfield.farfield, name="Freestream"),
123-
fl.SlipWall(surfaces=farfield.symmetry_planes, name="slipwall"),
119+
fl.Freestream(surfaces=farfield.farfield),
120+
fl.SlipWall(surfaces=farfield.symmetry_planes),
124121
fl.Fluid(
125122
navier_stokes_solver=fl.NavierStokesSolver(
126123
absolute_tolerance=1e-12,
@@ -131,7 +128,7 @@
131128
equation_evaluation_frequency=1,
132129
),
133130
),
134-
fl.BETDisk(**bet),
131+
bet,
135132
],
136133
)
137134

examples/advanced_simulations/rotorcraft/RANS_xv15.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
),
3232
outputs=[
3333
fl.VolumeOutput(
34-
name="VolumeOutput",
3534
output_fields=[
3635
"primitiveVars",
3736
"T",
@@ -42,7 +41,6 @@
4241
],
4342
),
4443
fl.SurfaceOutput(
45-
name="SurfaceOutput",
4644
surfaces=volume_mesh["*"],
4745
output_fields=[
4846
"primitiveVars",
@@ -74,8 +72,8 @@
7472
volumes=rotation_zone,
7573
spec=fl.AngularVelocity(600 * fl.u.rpm),
7674
),
77-
fl.Freestream(surfaces=volume_mesh["farField/farField"], name="Freestream"),
78-
fl.Wall(surfaces=volume_mesh["innerRotating/blade"], name="NoSlipWall"),
75+
fl.Freestream(surfaces=volume_mesh["farField/farField"]),
76+
fl.Wall(surfaces=volume_mesh["innerRotating/blade"]),
7977
],
8078
)
8179

examples/advanced_simulations/turbomachinery/periodic_BC.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
],
9393
outputs=[
9494
fl.VolumeOutput(
95-
name="fl.VolumeOutput",
9695
output_format="tecplot",
9796
output_fields=[
9897
"primitiveVars",
@@ -109,7 +108,6 @@
109108
],
110109
),
111110
fl.SurfaceOutput(
112-
name="fl.SurfaceOutput",
113111
surfaces=volume_mesh["*"],
114112
output_format="both",
115113
output_fields=[
@@ -122,7 +120,6 @@
122120
],
123121
),
124122
fl.SliceOutput(
125-
name="fl.SliceOutput",
126123
slices=[slice_inlet, slice_outlet, slice_trailing_edge, slice_wake],
127124
output_format="both",
128125
output_fields=["Cp", "primitiveVars", "T", "Mach", "gradW"],

examples/basic_simulations/meshing/auto_meshing_internal_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
geometry.group_faces_by_tag("faceName")
1414

1515
with fl.SI_unit_system:
16-
farfield = fl.AutomatedFarfield(name="farfield")
16+
farfield = fl.UserDefinedFarfield()
1717
params = fl.SimulationParams(
1818
meshing=fl.MeshingParams(
1919
defaults=fl.MeshingDefaults(

examples/basic_simulations/steady/steady_3D_cylinder.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
geo.group_faces_by_tag("faceId")
1212

1313
with fl.SI_unit_system:
14-
farfield = fl.AutomatedFarfield(name="Farfield")
14+
farfield = fl.AutomatedFarfield()
1515
params = fl.SimulationParams(
1616
meshing=fl.MeshingParams(
1717
defaults=fl.MeshingDefaults(
@@ -37,20 +37,18 @@
3737
turbulence_model_solver=fl.NoneSolver(),
3838
),
3939
fl.Wall(
40-
name="NoSlipWall",
4140
surfaces=[
4241
geo["*"],
4342
],
4443
),
45-
fl.Freestream(name="Freestream", surfaces=farfield.farfield),
44+
fl.Freestream(surfaces=farfield.farfield),
4645
],
4746
outputs=[
4847
fl.SurfaceOutput(
49-
name="SurfaceOutput",
5048
output_fields=["Cp", "Cf", "CfVec", "yPlus", "nodeForcesPerUnitArea"],
5149
surfaces=[geo["*"]],
5250
),
53-
fl.VolumeOutput(name="VolumeOutput", output_fields=["primitiveVars", "qcriterion"]),
51+
fl.VolumeOutput(output_fields=["primitiveVars", "qcriterion"]),
5452
],
5553
)
5654

examples/basic_simulations/unsteady/unsteady_2D_cylinder.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,18 @@
2626
),
2727
turbulence_model_solver=fl.NoneSolver(),
2828
),
29-
fl.Wall(name="NoSlipWall", surfaces=[vm["fluid/wall"]]),
30-
fl.Freestream(name="Freestream", surfaces=[vm["fluid/farfield"]]),
31-
fl.SlipWall(
32-
name="SlipWall", surfaces=[vm["fluid/periodic_0_l"], vm["fluid/periodic_0_r"]]
33-
),
29+
fl.Wall(surfaces=[vm["fluid/wall"]]),
30+
fl.Freestream(surfaces=[vm["fluid/farfield"]]),
31+
fl.SlipWall(surfaces=[vm["fluid/periodic_0_l"], vm["fluid/periodic_0_r"]]),
3432
],
3533
time_stepping=fl.Unsteady(
3634
max_pseudo_steps=40,
3735
step_size=2,
3836
steps=20,
3937
),
4038
outputs=[
41-
fl.SurfaceOutput(name="SurfaceOutput", output_fields=["Cp"], surfaces=[vm["*"]]),
39+
fl.SurfaceOutput(output_fields=["Cp"], surfaces=[vm["*"]]),
4240
fl.VolumeOutput(
43-
name="VolumeOutput",
4441
output_fields=[
4542
"primitiveVars",
4643
"vorticity",

examples/getting_started/quick_start.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@
4646
models=[
4747
fl.Wall(
4848
surfaces=[geo["*"]], # Apply wall boundary conditions to all surfaces in geometry
49-
name="Wall",
5049
),
5150
fl.Freestream(
5251
surfaces=[
5352
far_field_zone.farfield
5453
], # Apply freestream boundary to the far-field zone
55-
name="Freestream",
5654
),
5755
],
5856
# Define output parameters for the simulation

0 commit comments

Comments
 (0)