Skip to content

Commit

Permalink
Eddy effects available for Maxwell transient. (#1834)
Browse files Browse the repository at this point in the history
* Add eddy effects for transient.

* Add test for the eddy effects for the transient design.
  • Loading branch information
MaxJPRey authored Oct 14, 2022
1 parent 8e8e424 commit 405c135
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 24 deletions.
3 changes: 3 additions & 0 deletions _unittest/test_28_Maxwell3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,3 +664,6 @@ def test_42_harmonic_forces(self):
start_frequency=1, stop_frequency=100, number_of_frequency=None
)
assert self.m3dtransient.export_element_based_harmonic_force(number_of_frequency=5)

def test_43_eddy_effect_transient(self):
assert self.m3dtransient.eddy_effects_on(["Rotor"], activate_eddy_effects=True)
70 changes: 46 additions & 24 deletions pyaedt/maxwell.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,30 +424,52 @@ def eddy_effects_on(self, object_list, activate_eddy_effects=True, activate_disp
if not activate_eddy_effects:
activate_displacement_current = False
for obj in solid_objects_names:
if obj in object_list:
EddyVector.append(
[
"NAME:Data",
"Object Name:=",
obj,
"Eddy Effect:=",
activate_eddy_effects,
"Displacement Current:=",
activate_displacement_current,
]
)
else:
EddyVector.append(
[
"NAME:Data",
"Object Name:=",
obj,
"Eddy Effect:=",
bool(self.oboundary.GetEddyEffect(obj)),
"Displacement Current:=",
bool(self.oboundary.GetDisplacementCurrent(obj)),
]
)
if self.solution_type == "EddyCurrent":
if obj in object_list:
EddyVector.append(
[
"NAME:Data",
"Object Name:=",
obj,
"Eddy Effect:=",
activate_eddy_effects,
"Displacement Current:=",
activate_displacement_current,
]
)
else:
EddyVector.append(
[
"NAME:Data",
"Object Name:=",
obj,
"Eddy Effect:=",
bool(self.oboundary.GetEddyEffect(obj)),
"Displacement Current:=",
bool(self.oboundary.GetDisplacementCurrent(obj)),
]
)
if self.solution_type == "Transient":
if obj in object_list:
EddyVector.append(
[
"NAME:Data",
"Object Name:=",
obj,
"Eddy Effect:=",
activate_eddy_effects,
]
)
else:
EddyVector.append(
[
"NAME:Data",
"Object Name:=",
obj,
"Eddy Effect:=",
bool(self.oboundary.GetEddyEffect(obj)),
]
)
else:
for obj in solid_objects_names:
if obj in object_list:
Expand Down

0 comments on commit 405c135

Please sign in to comment.