diff --git a/mach_eval/analyzers/electromagnetic/bspm/jmag_2d.py b/mach_eval/analyzers/electromagnetic/bspm/jmag_2d.py index a9f6eb7b..940888b2 100644 --- a/mach_eval/analyzers/electromagnetic/bspm/jmag_2d.py +++ b/mach_eval/analyzers/electromagnetic/bspm/jmag_2d.py @@ -753,15 +753,21 @@ def add_material(self, study): "Shaft", self.machine_variant.shaft_mat["shaft_material"] ) study.GetMaterial("Shaft").SetValue("Laminated", 0) - study.GetMaterial("Shaft").SetValue("EddyCurrentCalculation", 1) - + if self.config.enable_eddy_current_calcs: + study.GetMaterial("Shaft").SetValue("EddyCurrentCalculation", 1) + else: + study.GetMaterial("Shaft").SetValue("EddyCurrentCalculation", 0) + study.SetMaterialByName("Coils", "Copper") study.GetMaterial("Coils").SetValue("UserConductivityType", 1) study.SetMaterialByName( "Magnet", "{}".format(self.machine_variant.magnet_mat["magnet_material"]) ) - study.GetMaterial("Magnet").SetValue("EddyCurrentCalculation", 1) + if self.config.enable_eddy_current_calcs: + study.GetMaterial("Magnet").SetValue("EddyCurrentCalculation", 1) + else: + study.GetMaterial("Magnet").SetValue("EddyCurrentCalculation", 0) study.GetMaterial("Magnet").SetValue( "Temperature", self.operating_point.ambient_temp + self.operating_point.rotor_temp_rise ) # TEMPERATURE (There is no 75 deg C option) diff --git a/mach_eval/analyzers/electromagnetic/bspm/jmag_2d_config.py b/mach_eval/analyzers/electromagnetic/bspm/jmag_2d_config.py index e7cccdb1..3607256c 100644 --- a/mach_eval/analyzers/electromagnetic/bspm/jmag_2d_config.py +++ b/mach_eval/analyzers/electromagnetic/bspm/jmag_2d_config.py @@ -28,3 +28,4 @@ def __init__(self, **kwargs) -> None: self.jmag_scheduler = kwargs["jmag_scheduler"] # True if it is desired to schedule jobs instead of solving immediately self.jmag_visible = kwargs["jmag_visible"] # JMAG application visible if true self.jmag_version = kwargs["jmag_version"] # JMAG application version + self.enable_eddy_current_calcs = kwargs.get("enable_eddy_current_calcs", True) # Enable eddy current calculations for the shaft and permanent magnets if True (default), disable if False