Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non linear method private #3824

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading