diff --git a/openconcept/aerodynamics/openaerostruct/tests/test_aerostructural.py b/openconcept/aerodynamics/openaerostruct/tests/test_aerostructural.py index 9b35748b..a42cf26c 100644 --- a/openconcept/aerodynamics/openaerostruct/tests/test_aerostructural.py +++ b/openconcept/aerodynamics/openaerostruct/tests/test_aerostructural.py @@ -238,7 +238,9 @@ def test_defaults(self): toverc = np.array([0.05, 0.1, 0.12]) t_skin = np.array([5, 13, 15]) # mm t_spar = np.array([5, 13, 15]) # mm - p = om.Problem( + p = om.Problem() + p.model.add_subsystem( + "comp", OASDataGen( num_x=3, num_y=7, @@ -249,7 +251,8 @@ def test_defaults(self): Mach_train=np.linspace(0.1, 0.85, 2), alpha_train=np.linspace(-10, 15, 2), alt_train=np.linspace(0, 15e3, 2), - ) + ), + promotes=["*"], ) p.setup() p.set_val("fltcond|TempIncrement", 0, units="degC") diff --git a/openconcept/aerodynamics/openaerostruct/tests/test_drag_polar.py b/openconcept/aerodynamics/openaerostruct/tests/test_drag_polar.py index 428599ab..c1a83919 100644 --- a/openconcept/aerodynamics/openaerostruct/tests/test_drag_polar.py +++ b/openconcept/aerodynamics/openaerostruct/tests/test_drag_polar.py @@ -182,7 +182,9 @@ def tearDown(self): def test_defaults(self): # Regression test twist = np.array([-1, -0.5, 2]) - p = om.Problem( + p = om.Problem() + p.model.add_subsystem( + "comp", VLMDataGen( num_x=3, num_y=5, @@ -190,7 +192,8 @@ def test_defaults(self): Mach_train=np.linspace(0.1, 0.85, 2), alpha_train=np.linspace(-10, 15, 2), alt_train=np.linspace(0, 15e3, 2), - ) + ), + promotes=["*"], ) p.setup() p.set_val("fltcond|TempIncrement", 0, units="degC") @@ -375,7 +378,8 @@ class PlanformMeshTestCase(unittest.TestCase): def test_easy(self): nx = 3 ny = 5 - p = om.Problem(PlanformMesh(num_x=nx, num_y=ny)) + p = om.Problem() + p.model.add_subsystem("comp", PlanformMesh(num_x=nx, num_y=ny), promotes=["*"]) p.setup() p.set_val("S", 2, units="m**2") p.set_val("AR", 2) @@ -394,7 +398,8 @@ def test_easy(self): def test_S_AR(self): nx = 3 ny = 5 - p = om.Problem(PlanformMesh(num_x=nx, num_y=ny)) + p = om.Problem() + p.model.add_subsystem("comp", PlanformMesh(num_x=nx, num_y=ny), promotes=["*"]) p.setup(force_alloc_complex=True) p.set_val("S", 48, units="m**2") p.set_val("AR", 3) @@ -413,7 +418,8 @@ def test_S_AR(self): def test_taper(self): nx = 2 ny = 3 - p = om.Problem(PlanformMesh(num_x=nx, num_y=ny)) + p = om.Problem() + p.model.add_subsystem("comp", PlanformMesh(num_x=nx, num_y=ny), promotes=["*"]) p.setup() p.set_val("S", 1.3, units="m**2") p.set_val("AR", 4 / 1.3) # pick S and AR for half span and root chord of 1 @@ -433,7 +439,8 @@ def test_taper(self): def test_sweep(self): nx = 3 ny = 3 - p = om.Problem(PlanformMesh(num_x=nx, num_y=ny)) + p = om.Problem() + p.model.add_subsystem("comp", PlanformMesh(num_x=nx, num_y=ny), promotes=["*"]) p.setup() p.set_val("S", 2, units="m**2") p.set_val("AR", 2) @@ -455,7 +462,8 @@ def test_sweep(self): def test_taper_sweep(self): nx = 2 ny = 3 - p = om.Problem(PlanformMesh(num_x=nx, num_y=ny)) + p = om.Problem() + p.model.add_subsystem("comp", PlanformMesh(num_x=nx, num_y=ny), promotes=["*"]) p.setup() p.set_val("S", 1.3, units="m**2") p.set_val("AR", 4 / 1.3) # pick S and AR for half span and root chord of 1 @@ -477,7 +485,8 @@ def test_taper_sweep(self): def test_777ish_regression(self): nx = 3 ny = 4 - p = om.Problem(PlanformMesh(num_x=nx, num_y=ny)) + p = om.Problem() + p.model.add_subsystem("comp", PlanformMesh(num_x=nx, num_y=ny), promotes=["*"]) p.setup() p.set_val("S", 427.8, units="m**2") p.set_val("AR", 9.82) diff --git a/openconcept/utilities/math/tests/test_min_max_comp.py b/openconcept/utilities/math/tests/test_min_max_comp.py index 8641b7d0..f71d1a7e 100644 --- a/openconcept/utilities/math/tests/test_min_max_comp.py +++ b/openconcept/utilities/math/tests/test_min_max_comp.py @@ -100,7 +100,8 @@ def test_multiple_inputs(self): def test_multiple_min(self): nn = 5 - p = Problem(MinComp(num_nodes=nn)) + p = Problem() + p.model.add_subsystem("comp", MinComp(num_nodes=nn), promotes=["*"]) p.setup(check=True, force_alloc_complex=True) p.set_val("array", np.array([42.0, 7.0, 30.0, 58.0, 7.0])) p.run_model()