@@ -60,6 +60,13 @@ def m2d_app(add_app):
60
60
app .close_project (app .project_name )
61
61
62
62
63
+ @pytest .fixture ()
64
+ def m2d_blank (add_app ):
65
+ app = add_app (application = ansys .aedt .core .Maxwell2d )
66
+ yield app
67
+ app .close_project (app .project_name )
68
+
69
+
63
70
class TestClass :
64
71
def test_export_model_picture (self , aedtapp , local_scratch ):
65
72
path = aedtapp .post .export_model_picture (full_name = Path (local_scratch .path ) / "images2.jpg" )
@@ -188,14 +195,13 @@ def test_create_fieldplot_surface_4(self, aedtapp):
188
195
intrinsic = {"Freq" : frequency , "Phase" : phase }
189
196
assert not aedtapp .post .create_fieldplot_surface (123123123 , "Mag_E" , setup_name , intrinsic )
190
197
191
- def test_create_fieldplot_surface_5 (self , aedtapp ):
192
- frequency = Quantity ("5GHz" )
193
- phase = Quantity ("180deg" )
194
- setup_name = aedtapp .existing_analysis_sweeps [0 ]
195
- intrinsic = {"Freq" : frequency , "Phase" : phase }
196
- assert not aedtapp .post .create_fieldplot_surface (
197
- aedtapp .modeler ["outer" ].faces , "Flux_Lines" , setup_name , intrinsic
198
- )
198
+ def test_create_fieldplot_surface_5 (self , m2d_blank ):
199
+ circ = m2d_blank .modeler .create_circle (origin = [0 , 0 , 0 ], radius = 5 , material = "copper" )
200
+ m2d_blank .assign_current (assignment = circ .name , amplitude = 5 )
201
+ region = m2d_blank .modeler .create_region (pad_value = 100 )
202
+ m2d_blank .assign_balloon (assignment = region .edges )
203
+ m2d_blank .create_setup ()
204
+ assert m2d_blank .post .create_fieldplot_surface (assignment = m2d_blank .modeler .object_list , quantity = "Flux_Lines" )
199
205
200
206
def test_design_setups (self , aedtapp ):
201
207
assert len (aedtapp .design_setups ["Setup1" ].sweeps [0 ].frequencies ) > 0
0 commit comments