Skip to content

Commit

Permalink
Non linear method private (#3824)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Oct 31, 2023
1 parent d19dc46 commit 4cd8f60
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions pyaedt/modules/Material.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def value(self):
def value(self, val):
if isinstance(val, list) and isinstance(val[0], list):
self._property_value[0].value = val
self.set_non_linear()
self._set_non_linear()
elif isinstance(val, list) and self.type != "vector":
if len(val) == 3:
self.type = "anisotropic"
Expand Down Expand Up @@ -825,8 +825,9 @@ def add_thermal_modifier_closed_form(
return self._material.update()

@pyaedt_function_handler()
def set_non_linear(self, x_unit=None, y_unit=None):
"""Enable Non Linear Material.
def _set_non_linear(self, x_unit=None, y_unit=None):
"""Enable non-linear material.
This is a private method, and should not be used directly.
Parameters
----------
Expand All @@ -839,6 +840,17 @@ def set_non_linear(self, x_unit=None, y_unit=None):
-------
bool
`True` if succeeded.
Examples
--------
>>> from pyaedt import Hfss
>>> hfss = Hfss(specified_version="2023.2")
>>> B_value = [0.0, 0.1, 0.3, 0.4, 0.48, 0.55, 0.6, 0.61, 0.65]
>>> H_value = [0.0, 500.0, 1000.0, 1500.0, 2000.0, 2500.0, 3500.0, 5000.0, 10000.0]
>>> mat = hfss.materials.add_material("newMat")
>>> b_h_dataset = [[b, h] for b, h in zip(B_value, H_value)]
>>> mat.permeability = b_h_dataset
"""
if self.name not in ["permeability", "conductivity", "permittivity"]:
self.logger.error(
Expand Down

0 comments on commit 4cd8f60

Please sign in to comment.