Fem: Fix Elmer magnetodynamic boundary condition keyword
This commit is contained in:
@@ -276,16 +276,13 @@ class MgDynwriter:
|
||||
self.write.handled(obj)
|
||||
|
||||
def _outputMagnetodynamicBndConditions(self, obj, name, equation):
|
||||
if hasattr(obj, "CurrentDensity_re_1"):
|
||||
# output only if current density is enabled and needed
|
||||
if not obj.CurrentDensity_re_1_Disabled:
|
||||
currentDensity = float(obj.CurrentDensity_re_1.getValueAs("A/m^2"))
|
||||
self.write.boundary(name, "Current Density 1", round(currentDensity, 6))
|
||||
if femutils.is_derived_from(obj, "Fem::ConstraintCurrentDensity") and obj.Mode == "Normal":
|
||||
currentDensity = float(obj.NormalCurrentDensity_re.getValueAs("A/m^2"))
|
||||
self.write.boundary(name, "Electric Current Density", round(currentDensity, 6))
|
||||
# imaginaries are only needed for harmonic equation
|
||||
if equation.IsHarmonic:
|
||||
if not obj.CurrentDensity_im_1_Disabled:
|
||||
currentDensity = float(obj.CurrentDensity_im_1.getValueAs("A/m^2"))
|
||||
self.write.boundary(name, "Current Density Im 1", round(currentDensity, 6))
|
||||
currentDensity = float(obj.NormalCurrentDensity_im.getValueAs("A/m^2"))
|
||||
self.write.boundary(name, "Electric Current Density Im", round(currentDensity, 6))
|
||||
|
||||
if femutils.is_derived_from(obj, "Fem::ConstraintElectrostaticPotential"):
|
||||
if obj.EnableAV:
|
||||
|
||||
Reference in New Issue
Block a user