Skip to content

Commit 9b60eab

Browse files
authored
Update some of the fun3d_tests to reflect changes in syntax (#276)
* Update fun3d_interface.py * Update namelists for fully coupled discipline derivative tests * Update interface syntax for fully coupled discipline derivative tests Include fun3d_project_name argument in Fun3dInterface. Change output_dir argument to prefix in create_from_bdf. * Update Fun3dInterface syntax for unsteady fully coupled discipline derivative tests
1 parent a08a97e commit 9b60eab

File tree

15 files changed

+70
-28
lines changed

15 files changed

+70
-28
lines changed

funtofem/interface/fun3d_interface.py

+2
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,7 @@ def copy_real_interface(cls, fun3d_interface):
12701270
fun3d_dir=fun3d_interface.fun3d_dir,
12711271
auto_coords=fun3d_interface.auto_coords,
12721272
coord_test_override=fun3d_interface._coord_test_override,
1273+
fun3d_project_name=fun3d_interface.fun3d_project_name,
12731274
)
12741275

12751276
@classmethod
@@ -1289,4 +1290,5 @@ def copy_complex_interface(cls, fun3d_interface):
12891290
fun3d_dir=fun3d_interface.fun3d_dir,
12901291
auto_coords=fun3d_interface.auto_coords,
12911292
coord_test_override=fun3d_interface._coord_test_override,
1293+
fun3d_project_name=fun3d_interface.fun3d_project_name,
12921294
)

tests/fun3d_tests/fully_coupled_disc_deriv/laminar/meshes/laminar/Flow/fun3d.nml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
freeze_limiter_iteration = 100
2525
/
2626
&code_run_control
27-
restart_write_freq = 1000
27+
restart_write_freq = 500
2828
restart_read = 'off'
2929
steps = 500
3030
/
@@ -44,6 +44,7 @@
4444
moving_grid = .true.
4545
boundary_animation_freq = 1000
4646
volume_animation_freq = 1000
47+
recompute_turb_dist = .false.
4748
/
4849
&slice_data
4950
nslices = 1

tests/fun3d_tests/fully_coupled_disc_deriv/laminar/test_fun3d_tacs.py

+24-12
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ def test_thick_laminar_aerothermoelastic(self):
5555

5656
# build the solvers and coupled driver
5757
solvers = SolverManager(comm)
58-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
58+
solvers.flow = Fun3dInterface(
59+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
60+
)
5961

6062
solvers.structural = TacsSteadyInterface.create_from_bdf(
61-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
63+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
6264
)
6365

6466
transfer_settings = TransferSettings(
@@ -100,10 +102,12 @@ def test_alpha_laminar_aerothermoelastic(self):
100102

101103
# build the solvers and coupled driver
102104
solvers = SolverManager(comm)
103-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
105+
solvers.flow = Fun3dInterface(
106+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
107+
)
104108

105109
solvers.structural = TacsSteadyInterface.create_from_bdf(
106-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
110+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
107111
)
108112

109113
transfer_settings = TransferSettings(
@@ -145,10 +149,12 @@ def test_thick_laminar_aeroelastic(self):
145149

146150
# build the solvers and coupled driver
147151
solvers = SolverManager(comm)
148-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
152+
solvers.flow = Fun3dInterface(
153+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
154+
)
149155

150156
solvers.structural = TacsSteadyInterface.create_from_bdf(
151-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
157+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
152158
)
153159

154160
transfer_settings = TransferSettings(
@@ -189,10 +195,12 @@ def test_alpha_laminar_aeroelastic(self):
189195

190196
# build the solvers and coupled driver
191197
solvers = SolverManager(comm)
192-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
198+
solvers.flow = Fun3dInterface(
199+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
200+
)
193201

194202
solvers.structural = TacsSteadyInterface.create_from_bdf(
195-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
203+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
196204
)
197205

198206
transfer_settings = TransferSettings(
@@ -234,10 +242,12 @@ def test_thick_laminar_aerothermal(self):
234242

235243
# build the solvers and coupled driver
236244
solvers = SolverManager(comm)
237-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
245+
solvers.flow = Fun3dInterface(
246+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
247+
)
238248

239249
solvers.structural = TacsSteadyInterface.create_from_bdf(
240-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
250+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
241251
)
242252

243253
transfer_settings = TransferSettings(
@@ -278,10 +288,12 @@ def test_alpha_laminar_aerothermal(self):
278288

279289
# build the solvers and coupled driver
280290
solvers = SolverManager(comm)
281-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
291+
solvers.flow = Fun3dInterface(
292+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
293+
)
282294

283295
solvers.structural = TacsSteadyInterface.create_from_bdf(
284-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
296+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
285297
)
286298

287299
transfer_settings = TransferSettings(

tests/fun3d_tests/fully_coupled_disc_deriv/turb_AE/meshes/turbulent/Flow/fun3d.nml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
freeze_limiter_iteration = 100
2525
/
2626
&code_run_control
27-
restart_write_freq = 1000
27+
restart_write_freq = 500
2828
restart_read = 'off'
2929
steps = 500
3030
/
@@ -45,6 +45,7 @@
4545
moving_grid = .true.
4646
boundary_animation_freq = 1000
4747
volume_animation_freq = 1000
48+
recompute_turb_dist = .false.
4849
/
4950
&slice_data
5051
nslices = 1

tests/fun3d_tests/fully_coupled_disc_deriv/turb_AE/test_fun3d_tacs.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ def test_alpha_turbulent_aeroelastic(self):
5353

5454
# build the solvers and coupled driver
5555
solvers = SolverManager(comm)
56-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
56+
solvers.flow = Fun3dInterface(
57+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
58+
)
5759

5860
solvers.structural = TacsSteadyInterface.create_from_bdf(
59-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
61+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
6062
)
6163

6264
transfer_settings = TransferSettings(
@@ -98,10 +100,12 @@ def test_thick_turbulent_aeroelastic(self):
98100

99101
# build the solvers and coupled driver
100102
solvers = SolverManager(comm)
101-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
103+
solvers.flow = Fun3dInterface(
104+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
105+
)
102106

103107
solvers.structural = TacsSteadyInterface.create_from_bdf(
104-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
108+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
105109
)
106110

107111
transfer_settings = TransferSettings(

tests/fun3d_tests/fully_coupled_disc_deriv/turb_AT/meshes/turbulent/Flow/fun3d.nml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
freeze_limiter_iteration = 100
2525
/
2626
&code_run_control
27-
restart_write_freq = 1000
27+
restart_write_freq = 500
2828
restart_read = 'off'
2929
steps = 500
3030
/
@@ -44,6 +44,7 @@
4444
moving_grid = .true.
4545
boundary_animation_freq = 1000
4646
volume_animation_freq = 1000
47+
recompute_turb_dist = .false.
4748
/
4849
&slice_data
4950
nslices = 1

tests/fun3d_tests/fully_coupled_disc_deriv/turb_AT/test_fun3d_tacs.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ def test_alpha_turbulent_aerothermal(self):
5454

5555
# build the solvers and coupled driver
5656
solvers = SolverManager(comm)
57-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
57+
solvers.flow = Fun3dInterface(
58+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
59+
)
5860

5961
solvers.structural = TacsSteadyInterface.create_from_bdf(
60-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
62+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
6163
)
6264

6365
transfer_settings = TransferSettings(
@@ -100,10 +102,12 @@ def test_thick_turbulent_aerothermal(self):
100102

101103
# build the solvers and coupled driver
102104
solvers = SolverManager(comm)
103-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
105+
solvers.flow = Fun3dInterface(
106+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
107+
)
104108

105109
solvers.structural = TacsSteadyInterface.create_from_bdf(
106-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
110+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
107111
)
108112

109113
transfer_settings = TransferSettings(

tests/fun3d_tests/fully_coupled_disc_deriv/turb_ATE/meshes/turbulent/Flow/fun3d.nml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
freeze_limiter_iteration = 100
2525
/
2626
&code_run_control
27-
restart_write_freq = 1000
27+
restart_write_freq = 500
2828
restart_read = 'off'
2929
steps = 500
3030
/
@@ -44,6 +44,7 @@
4444
moving_grid = .true.
4545
boundary_animation_freq = 1000
4646
volume_animation_freq = 1000
47+
recompute_turb_dist = .false.
4748
/
4849
&slice_data
4950
nslices = 1

tests/fun3d_tests/fully_coupled_disc_deriv/turb_ATE/test_fun3d_tacs.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ def test_thick_turbulent_aerothermoelastic(self):
5555

5656
# build the solvers and coupled driver
5757
solvers = SolverManager(comm)
58-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
58+
solvers.flow = Fun3dInterface(
59+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
60+
)
5961

6062
solvers.structural = TacsSteadyInterface.create_from_bdf(
61-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
63+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
6264
)
6365

6466
transfer_settings = TransferSettings(
@@ -100,10 +102,12 @@ def test_alpha_turbulent_aerothermoelastic(self):
100102

101103
# build the solvers and coupled driver
102104
solvers = SolverManager(comm)
103-
solvers.flow = Fun3dInterface(comm, model, fun3d_dir="meshes")
105+
solvers.flow = Fun3dInterface(
106+
comm, model, fun3d_project_name="miniMesh", fun3d_dir="meshes"
107+
)
104108

105109
solvers.structural = TacsSteadyInterface.create_from_bdf(
106-
model, comm, nprocs=1, bdf_file=bdf_filename, output_dir=output_dir
110+
model, comm, nprocs=1, bdf_file=bdf_filename, prefix=output_dir
107111
)
108112

109113
transfer_settings = TransferSettings(

tests/fun3d_tests/fully_coupled_disc_deriv_unsteady/euler-AE/test_fun3d_tacs_unsteady.py

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def test_inviscid_aeroelastic_thick(self):
8383
solvers.flow = Fun3dInterface(
8484
comm,
8585
model,
86+
fun3d_project_name="miniMesh",
8687
fun3d_dir="meshes",
8788
forward_options={"timedep_adj_frozen": True},
8889
adjoint_options={"timedep_adj_frozen": True},
@@ -142,6 +143,7 @@ def test_inviscid_aeroelastic_alpha(self):
142143
solvers.flow = Fun3dInterface(
143144
comm,
144145
model,
146+
fun3d_project_name="miniMesh",
145147
fun3d_dir="meshes",
146148
forward_options={"timedep_adj_frozen": True},
147149
adjoint_options={"timedep_adj_frozen": True},

tests/fun3d_tests/fully_coupled_disc_deriv_unsteady/laminar-AE/test_fun3d_tacs_unsteady.py

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def test_laminar_aeroelastic_thick(self):
8383
solvers.flow = Fun3dInterface(
8484
comm,
8585
model,
86+
fun3d_project_name="miniMesh",
8687
fun3d_dir="meshes",
8788
forward_options={"timedep_adj_frozen": True},
8889
adjoint_options={"timedep_adj_frozen": True},
@@ -142,6 +143,7 @@ def test_laminar_aeroelastic_alpha(self):
142143
solvers.flow = Fun3dInterface(
143144
comm,
144145
model,
146+
fun3d_project_name="miniMesh",
145147
fun3d_dir="meshes",
146148
forward_options={"timedep_adj_frozen": True},
147149
adjoint_options={"timedep_adj_frozen": True},

tests/fun3d_tests/fully_coupled_disc_deriv_unsteady/laminar-AT/test_fun3d_tacs_unsteady.py

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def test_laminar_aerothermal_thick(self):
8181
solvers.flow = Fun3dInterface(
8282
comm,
8383
model,
84+
fun3d_project_name="miniMesh",
8485
fun3d_dir="meshes",
8586
forward_options={"timedep_adj_frozen": True},
8687
adjoint_options={"timedep_adj_frozen": True},
@@ -139,6 +140,7 @@ def test_laminar_aerothermal_alpha(self):
139140
solvers.flow = Fun3dInterface(
140141
comm,
141142
model,
143+
fun3d_project_name="miniMesh",
142144
fun3d_dir="meshes",
143145
forward_options={"timedep_adj_frozen": True},
144146
adjoint_options={"timedep_adj_frozen": True},

tests/fun3d_tests/fully_coupled_disc_deriv_unsteady/turbulent-AE/test_fun3d_tacs_unsteady.py

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def test_turbulent_aeroelastic_thick(self):
8282
solvers.flow = Fun3dInterface(
8383
comm,
8484
model,
85+
fun3d_project_name="miniMesh",
8586
fun3d_dir="meshes",
8687
forward_options={"timedep_adj_frozen": True},
8788
adjoint_options={"timedep_adj_frozen": True},
@@ -141,6 +142,7 @@ def test_turbulent_aeroelastic_alpha(self):
141142
solvers.flow = Fun3dInterface(
142143
comm,
143144
model,
145+
fun3d_project_name="miniMesh",
144146
fun3d_dir="meshes",
145147
forward_options={"timedep_adj_frozen": True},
146148
adjoint_options={"timedep_adj_frozen": True},

tests/fun3d_tests/fully_coupled_disc_deriv_unsteady/turbulent-AT/test_fun3d_tacs_unsteady.py

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def test_turbulent_aerothermal_thick(self):
8282
solvers.flow = Fun3dInterface(
8383
comm,
8484
model,
85+
fun3d_project_name="miniMesh",
8586
fun3d_dir="meshes",
8687
forward_options={"timedep_adj_frozen": True},
8788
adjoint_options={"timedep_adj_frozen": True},
@@ -141,6 +142,7 @@ def test_turbulent_aerothermal_alpha(self):
141142
solvers.flow = Fun3dInterface(
142143
comm,
143144
model,
145+
fun3d_project_name="miniMesh",
144146
fun3d_dir="meshes",
145147
forward_options={"timedep_adj_frozen": True},
146148
adjoint_options={"timedep_adj_frozen": True},

tests/fun3d_tests/fully_coupled_disc_deriv_unsteady/turbulent-ATE/test_fun3d_tacs_unsteady.py

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def test_turbulent_aerothermoelastic_thick(self):
8282
solvers.flow = Fun3dInterface(
8383
comm,
8484
model,
85+
fun3d_project_name="miniMesh",
8586
fun3d_dir="meshes",
8687
forward_options={"timedep_adj_frozen": True},
8788
adjoint_options={"timedep_adj_frozen": True},
@@ -141,6 +142,7 @@ def test_turbulent_aerothermoelastic_alpha(self):
141142
solvers.flow = Fun3dInterface(
142143
comm,
143144
model,
145+
fun3d_project_name="miniMesh",
144146
fun3d_dir="meshes",
145147
forward_options={"timedep_adj_frozen": True},
146148
adjoint_options={"timedep_adj_frozen": True},

0 commit comments

Comments
 (0)