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

Update Operators for DPF 232 on master #951

Merged
merged 1 commit into from
May 12, 2023
Merged
Show file tree
Hide file tree
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
140 changes: 63 additions & 77 deletions docs/source/_static/dpf_operators.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ansys/dpf/core/operators/geo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .rotate_in_cylindrical_cs_fc import rotate_in_cylindrical_cs_fc
from .rotate_in_cylindrical_cs import rotate_in_cylindrical_cs
from .rotate import rotate
from .rotate_in_cylindrical_cs import rotate_in_cylindrical_cs
from .rotate_fc import rotate_fc
from .to_polar_coordinates import to_polar_coordinates
from .spherical_to_cartesian_fc import spherical_to_cartesian_fc
Expand Down
52 changes: 52 additions & 0 deletions src/ansys/dpf/core/operators/result/accu_eqv_creep_strain.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ class accu_eqv_creep_strain(Operator):
read_beams : bool, optional
Elemental nodal beam results are read if this
pin is set to true (default is false)
split_shells : bool, optional
If the requested_location pin is not
connected, this pin forces elemental
nodal shell and solid results to be
split if this pin is set to true
(default is false)


Examples
Expand Down Expand Up @@ -103,6 +109,8 @@ class accu_eqv_creep_strain(Operator):
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
>>> my_read_beams = bool()
>>> op.inputs.read_beams.connect(my_read_beams)
>>> my_split_shells = bool()
>>> op.inputs.split_shells.connect(my_split_shells)

>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.result.accu_eqv_creep_strain(
Expand All @@ -116,6 +124,7 @@ class accu_eqv_creep_strain(Operator):
... requested_location=my_requested_location,
... read_cyclic=my_read_cyclic,
... read_beams=my_read_beams,
... split_shells=my_split_shells,
... )

>>> # Get output data
Expand All @@ -134,6 +143,7 @@ def __init__(
requested_location=None,
read_cyclic=None,
read_beams=None,
split_shells=None,
config=None,
server=None,
):
Expand All @@ -160,6 +170,8 @@ def __init__(
self.inputs.read_cyclic.connect(read_cyclic)
if read_beams is not None:
self.inputs.read_beams.connect(read_beams)
if split_shells is not None:
self.inputs.split_shells.connect(split_shells)

@staticmethod
def _spec():
Expand Down Expand Up @@ -272,6 +284,16 @@ def _spec():
document="""Elemental nodal beam results are read if this
pin is set to true (default is false)""",
),
26: PinSpecification(
name="split_shells",
type_names=["bool"],
optional=True,
document="""If the requested_location pin is not
connected, this pin forces elemental
nodal shell and solid results to be
split if this pin is set to true
(default is false)""",
),
},
map_output_pin_spec={
0: PinSpecification(
Expand Down Expand Up @@ -349,6 +371,8 @@ class InputsAccuEqvCreepStrain(_Inputs):
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
>>> my_read_beams = bool()
>>> op.inputs.read_beams.connect(my_read_beams)
>>> my_split_shells = bool()
>>> op.inputs.split_shells.connect(my_split_shells)
"""

def __init__(self, op: Operator):
Expand Down Expand Up @@ -391,6 +415,10 @@ def __init__(self, op: Operator):
accu_eqv_creep_strain._spec().input_pin(22), 22, op, -1
)
self._inputs.append(self._read_beams)
self._split_shells = Input(
accu_eqv_creep_strain._spec().input_pin(26), 26, op, -1
)
self._inputs.append(self._split_shells)

@property
def time_scoping(self):
Expand Down Expand Up @@ -627,6 +655,30 @@ def read_beams(self):
"""
return self._read_beams

@property
def split_shells(self):
"""Allows to connect split_shells input to the operator.

If the requested_location pin is not
connected, this pin forces elemental
nodal shell and solid results to be
split if this pin is set to true
(default is false)

Parameters
----------
my_split_shells : bool

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.accu_eqv_creep_strain()
>>> op.inputs.split_shells.connect(my_split_shells)
>>> # or
>>> op.inputs.split_shells(my_split_shells)
"""
return self._split_shells


class OutputsAccuEqvCreepStrain(_Outputs):
"""Intermediate class used to get outputs from
Expand Down
52 changes: 52 additions & 0 deletions src/ansys/dpf/core/operators/result/accu_eqv_plastic_strain.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ class accu_eqv_plastic_strain(Operator):
read_beams : bool, optional
Elemental nodal beam results are read if this
pin is set to true (default is false)
split_shells : bool, optional
If the requested_location pin is not
connected, this pin forces elemental
nodal shell and solid results to be
split if this pin is set to true
(default is false)


Examples
Expand Down Expand Up @@ -103,6 +109,8 @@ class accu_eqv_plastic_strain(Operator):
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
>>> my_read_beams = bool()
>>> op.inputs.read_beams.connect(my_read_beams)
>>> my_split_shells = bool()
>>> op.inputs.split_shells.connect(my_split_shells)

>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.result.accu_eqv_plastic_strain(
Expand All @@ -116,6 +124,7 @@ class accu_eqv_plastic_strain(Operator):
... requested_location=my_requested_location,
... read_cyclic=my_read_cyclic,
... read_beams=my_read_beams,
... split_shells=my_split_shells,
... )

>>> # Get output data
Expand All @@ -134,6 +143,7 @@ def __init__(
requested_location=None,
read_cyclic=None,
read_beams=None,
split_shells=None,
config=None,
server=None,
):
Expand All @@ -160,6 +170,8 @@ def __init__(
self.inputs.read_cyclic.connect(read_cyclic)
if read_beams is not None:
self.inputs.read_beams.connect(read_beams)
if split_shells is not None:
self.inputs.split_shells.connect(split_shells)

@staticmethod
def _spec():
Expand Down Expand Up @@ -272,6 +284,16 @@ def _spec():
document="""Elemental nodal beam results are read if this
pin is set to true (default is false)""",
),
26: PinSpecification(
name="split_shells",
type_names=["bool"],
optional=True,
document="""If the requested_location pin is not
connected, this pin forces elemental
nodal shell and solid results to be
split if this pin is set to true
(default is false)""",
),
},
map_output_pin_spec={
0: PinSpecification(
Expand Down Expand Up @@ -349,6 +371,8 @@ class InputsAccuEqvPlasticStrain(_Inputs):
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
>>> my_read_beams = bool()
>>> op.inputs.read_beams.connect(my_read_beams)
>>> my_split_shells = bool()
>>> op.inputs.split_shells.connect(my_split_shells)
"""

def __init__(self, op: Operator):
Expand Down Expand Up @@ -391,6 +415,10 @@ def __init__(self, op: Operator):
accu_eqv_plastic_strain._spec().input_pin(22), 22, op, -1
)
self._inputs.append(self._read_beams)
self._split_shells = Input(
accu_eqv_plastic_strain._spec().input_pin(26), 26, op, -1
)
self._inputs.append(self._split_shells)

@property
def time_scoping(self):
Expand Down Expand Up @@ -627,6 +655,30 @@ def read_beams(self):
"""
return self._read_beams

@property
def split_shells(self):
"""Allows to connect split_shells input to the operator.

If the requested_location pin is not
connected, this pin forces elemental
nodal shell and solid results to be
split if this pin is set to true
(default is false)

Parameters
----------
my_split_shells : bool

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.accu_eqv_plastic_strain()
>>> op.inputs.split_shells.connect(my_split_shells)
>>> # or
>>> op.inputs.split_shells(my_split_shells)
"""
return self._split_shells


class OutputsAccuEqvPlasticStrain(_Outputs):
"""Intermediate class used to get outputs from
Expand Down
17 changes: 4 additions & 13 deletions src/ansys/dpf/core/operators/result/compute_stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@


class compute_stress(Operator):
"""Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and integration
schemes are supported. Only isotropic materials are supported.
Material nonlinearity is not supported. Only constant materials
are supported. All coordinates are global coordinates. All units
need to be consistent.
"""Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computation

Parameters
----------
Expand Down Expand Up @@ -97,13 +93,8 @@ def __init__(

@staticmethod
def _spec():
description = """Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and
integration schemes are supported. Only isotropic
materials are supported. Material nonlinearity is not
supported. Only constant materials are supported. All
coordinates are global coordinates. All units need to be
consistent."""
description = """Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computation"""
spec = Specification(
description=description,
map_input_pin_spec={
Expand Down
19 changes: 6 additions & 13 deletions src/ansys/dpf/core/operators/result/compute_stress_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@


class compute_stress_1(Operator):
"""Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and integration
schemes are supported. Only isotropic materials are supported.
Material nonlinearity is not supported. Only constant materials
are supported. All coordinates are global coordinates. All units
need to be consistent.Get the 1st principal component.
"""Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computationGet the 1st
principal component.

Parameters
----------
Expand Down Expand Up @@ -97,13 +94,9 @@ def __init__(

@staticmethod
def _spec():
description = """Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and
integration schemes are supported. Only isotropic
materials are supported. Material nonlinearity is not
supported. Only constant materials are supported. All
coordinates are global coordinates. All units need to be
consistent.Get the 1st principal component."""
description = """Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computationGet the
1st principal component."""
spec = Specification(
description=description,
map_input_pin_spec={
Expand Down
19 changes: 6 additions & 13 deletions src/ansys/dpf/core/operators/result/compute_stress_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@


class compute_stress_2(Operator):
"""Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and integration
schemes are supported. Only isotropic materials are supported.
Material nonlinearity is not supported. Only constant materials
are supported. All coordinates are global coordinates. All units
need to be consistent.Get the 2nd principal component.
"""Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computationGet the 2nd
principal component.

Parameters
----------
Expand Down Expand Up @@ -97,13 +94,9 @@ def __init__(

@staticmethod
def _spec():
description = """Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and
integration schemes are supported. Only isotropic
materials are supported. Material nonlinearity is not
supported. Only constant materials are supported. All
coordinates are global coordinates. All units need to be
consistent.Get the 2nd principal component."""
description = """Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computationGet the
2nd principal component."""
spec = Specification(
description=description,
map_input_pin_spec={
Expand Down
19 changes: 6 additions & 13 deletions src/ansys/dpf/core/operators/result/compute_stress_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@


class compute_stress_3(Operator):
"""Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and integration
schemes are supported. Only isotropic materials are supported.
Material nonlinearity is not supported. Only constant materials
are supported. All coordinates are global coordinates. All units
need to be consistent.Get the 3rd principal component.
"""Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computationGet the 3rd
principal component.

Parameters
----------
Expand Down Expand Up @@ -97,13 +94,9 @@ def __init__(

@staticmethod
def _spec():
description = """Computes the stress from an elastic strain field.Only some 3-D
elements (only hexa, tetra, pyramid and wedge) and
integration schemes are supported. Only isotropic
materials are supported. Material nonlinearity is not
supported. Only constant materials are supported. All
coordinates are global coordinates. All units need to be
consistent.Get the 3rd principal component."""
description = """Computes the stress from an elastic strain field.compute_total_strain
limitations are applicable for stress computationGet the
3rd principal component."""
spec = Specification(
description=description,
map_input_pin_spec={
Expand Down
Loading