Skip to content

Commit

Permalink
FIX: Set emissivity value in surface material (#5015)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Aug 8, 2024
1 parent 82d7352 commit c304025
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion _unittest/test_98_Icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ def test_28_get_all_dielectrics(self):
]

def test_29_assign_surface_material(self):
self.aedtapp.materials.add_surface_material("my_surface", 0.5)
surf_mat = self.aedtapp.materials.add_surface_material("my_surface", 0.5)
assert surf_mat.emissivity.value == 0.5
obj = ["box2", "box3"]
assert self.aedtapp.assign_surface_material(obj, "my_surface")
assert self.aedtapp.assign_surface_material("box", "Fe-cast")
Expand Down
2 changes: 1 addition & 1 deletion pyaedt/modules/MaterialLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def add_surface_material(self, name, emissivity=None):
else:
material = SurfaceMaterial(self._app, name, material_update=False)
if emissivity:
material.emissivity = emissivity
material.emissivity.value = emissivity
material.update()
material._material_update = True
self.logger.info("Material has been added. Edit it to update in Desktop.")
Expand Down

0 comments on commit c304025

Please sign in to comment.