Skip to content

Commit

Permalink
Bugfix on Surface material creation and value_with_units (#3942)
Browse files Browse the repository at this point in the history
* added "PhysicsTypes" property on Surface material creation.

* fixed value_with_units in case units=""
  • Loading branch information
Alberto-DM authored Dec 4, 2023
1 parent 04692ff commit 44ae3d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyaedt/application/Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2203,7 +2203,7 @@ def value_with_units(
Some common examples are:
"in": inches
"cm": centimeter
"um": micron
"um": micron
"mm": millimeter
"meter": meters
"mil": 0.001 inches (mils)
Expand All @@ -2217,7 +2217,7 @@ def value_with_units(
str
String that combines the value and the units (e.g. "1.2mm").
"""
if not units:
if units is None:
if unit_system == "Length":
units = self.modeler.model_units
else:
Expand Down
1 change: 1 addition & 0 deletions pyaedt/modules/Material.py
Original file line number Diff line number Diff line change
Expand Up @@ -2652,6 +2652,7 @@ def __init__(self, materiallib, name, props=None, material_update=True):
self.physics_type = self._props["PhysicsTypes"]["set"]
else:
self.physics_type = ["Thermal"]
self._props["PhysicsTypes"] = OrderedDict({"set": ["Thermal"]})
for property in SurfMatProperties.aedtname:
if property in self._props:
mods = None
Expand Down

0 comments on commit 44ae3d4

Please sign in to comment.