Skip to content

Commit e5917db

Browse files
FIX: Correct unit for h-field in set_non_linear() for bh curve definition (#6156)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 7d27b37 commit e5917db

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

doc/changelog.d/6156.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correct unit for h-field in set_non_linear() for bh curve definition

src/ansys/aedt/core/modules/material.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ def set_non_linear(self, x_unit=None, y_unit=None):
965965
if self.name == "permeability":
966966
if not y_unit:
967967
y_unit = "tesla"
968-
if not y_unit:
968+
if not x_unit:
969969
x_unit = "A_per_meter"
970970
self.bunit = y_unit
971971
self.hunit = x_unit

tests/system/general/test_03_Materials.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ def test_09_non_linear_materials(self, add_app):
289289
assert app.materials["myMat"].conductivity.type == "nonlinear"
290290
assert app.materials["myMat"].permittivity.type == "nonlinear"
291291
assert app.materials["myMat"].permeability.bunit == "tesla"
292+
assert app.materials["myMat"].permeability.hunit == "A_per_meter"
292293
mat2 = app.materials.add_material("myMat2")
293294
assert not mat2.is_used
294295
assert app.modeler.create_box([0, 0, 0], [10, 10, 10], material="myMat2")

0 commit comments

Comments
 (0)