Skip to content

Commit f63617f

Browse files
update operators (#951)
Co-authored-by: rlagha <[email protected]>
1 parent e689987 commit f63617f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1640
-350
lines changed

docs/source/_static/dpf_operators.html

Lines changed: 63 additions & 77 deletions
Large diffs are not rendered by default.

src/ansys/dpf/core/operators/geo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .rotate_in_cylindrical_cs_fc import rotate_in_cylindrical_cs_fc
2-
from .rotate_in_cylindrical_cs import rotate_in_cylindrical_cs
32
from .rotate import rotate
3+
from .rotate_in_cylindrical_cs import rotate_in_cylindrical_cs
44
from .rotate_fc import rotate_fc
55
from .to_polar_coordinates import to_polar_coordinates
66
from .spherical_to_cartesian_fc import spherical_to_cartesian_fc

src/ansys/dpf/core/operators/result/accu_eqv_creep_strain.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ class accu_eqv_creep_strain(Operator):
7373
read_beams : bool, optional
7474
Elemental nodal beam results are read if this
7575
pin is set to true (default is false)
76+
split_shells : bool, optional
77+
If the requested_location pin is not
78+
connected, this pin forces elemental
79+
nodal shell and solid results to be
80+
split if this pin is set to true
81+
(default is false)
7682
7783
7884
Examples
@@ -103,6 +109,8 @@ class accu_eqv_creep_strain(Operator):
103109
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
104110
>>> my_read_beams = bool()
105111
>>> op.inputs.read_beams.connect(my_read_beams)
112+
>>> my_split_shells = bool()
113+
>>> op.inputs.split_shells.connect(my_split_shells)
106114
107115
>>> # Instantiate operator and connect inputs in one line
108116
>>> op = dpf.operators.result.accu_eqv_creep_strain(
@@ -116,6 +124,7 @@ class accu_eqv_creep_strain(Operator):
116124
... requested_location=my_requested_location,
117125
... read_cyclic=my_read_cyclic,
118126
... read_beams=my_read_beams,
127+
... split_shells=my_split_shells,
119128
... )
120129
121130
>>> # Get output data
@@ -134,6 +143,7 @@ def __init__(
134143
requested_location=None,
135144
read_cyclic=None,
136145
read_beams=None,
146+
split_shells=None,
137147
config=None,
138148
server=None,
139149
):
@@ -160,6 +170,8 @@ def __init__(
160170
self.inputs.read_cyclic.connect(read_cyclic)
161171
if read_beams is not None:
162172
self.inputs.read_beams.connect(read_beams)
173+
if split_shells is not None:
174+
self.inputs.split_shells.connect(split_shells)
163175

164176
@staticmethod
165177
def _spec():
@@ -272,6 +284,16 @@ def _spec():
272284
document="""Elemental nodal beam results are read if this
273285
pin is set to true (default is false)""",
274286
),
287+
26: PinSpecification(
288+
name="split_shells",
289+
type_names=["bool"],
290+
optional=True,
291+
document="""If the requested_location pin is not
292+
connected, this pin forces elemental
293+
nodal shell and solid results to be
294+
split if this pin is set to true
295+
(default is false)""",
296+
),
275297
},
276298
map_output_pin_spec={
277299
0: PinSpecification(
@@ -349,6 +371,8 @@ class InputsAccuEqvCreepStrain(_Inputs):
349371
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
350372
>>> my_read_beams = bool()
351373
>>> op.inputs.read_beams.connect(my_read_beams)
374+
>>> my_split_shells = bool()
375+
>>> op.inputs.split_shells.connect(my_split_shells)
352376
"""
353377

354378
def __init__(self, op: Operator):
@@ -391,6 +415,10 @@ def __init__(self, op: Operator):
391415
accu_eqv_creep_strain._spec().input_pin(22), 22, op, -1
392416
)
393417
self._inputs.append(self._read_beams)
418+
self._split_shells = Input(
419+
accu_eqv_creep_strain._spec().input_pin(26), 26, op, -1
420+
)
421+
self._inputs.append(self._split_shells)
394422

395423
@property
396424
def time_scoping(self):
@@ -627,6 +655,30 @@ def read_beams(self):
627655
"""
628656
return self._read_beams
629657

658+
@property
659+
def split_shells(self):
660+
"""Allows to connect split_shells input to the operator.
661+
662+
If the requested_location pin is not
663+
connected, this pin forces elemental
664+
nodal shell and solid results to be
665+
split if this pin is set to true
666+
(default is false)
667+
668+
Parameters
669+
----------
670+
my_split_shells : bool
671+
672+
Examples
673+
--------
674+
>>> from ansys.dpf import core as dpf
675+
>>> op = dpf.operators.result.accu_eqv_creep_strain()
676+
>>> op.inputs.split_shells.connect(my_split_shells)
677+
>>> # or
678+
>>> op.inputs.split_shells(my_split_shells)
679+
"""
680+
return self._split_shells
681+
630682

631683
class OutputsAccuEqvCreepStrain(_Outputs):
632684
"""Intermediate class used to get outputs from

src/ansys/dpf/core/operators/result/accu_eqv_plastic_strain.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ class accu_eqv_plastic_strain(Operator):
7373
read_beams : bool, optional
7474
Elemental nodal beam results are read if this
7575
pin is set to true (default is false)
76+
split_shells : bool, optional
77+
If the requested_location pin is not
78+
connected, this pin forces elemental
79+
nodal shell and solid results to be
80+
split if this pin is set to true
81+
(default is false)
7682
7783
7884
Examples
@@ -103,6 +109,8 @@ class accu_eqv_plastic_strain(Operator):
103109
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
104110
>>> my_read_beams = bool()
105111
>>> op.inputs.read_beams.connect(my_read_beams)
112+
>>> my_split_shells = bool()
113+
>>> op.inputs.split_shells.connect(my_split_shells)
106114
107115
>>> # Instantiate operator and connect inputs in one line
108116
>>> op = dpf.operators.result.accu_eqv_plastic_strain(
@@ -116,6 +124,7 @@ class accu_eqv_plastic_strain(Operator):
116124
... requested_location=my_requested_location,
117125
... read_cyclic=my_read_cyclic,
118126
... read_beams=my_read_beams,
127+
... split_shells=my_split_shells,
119128
... )
120129
121130
>>> # Get output data
@@ -134,6 +143,7 @@ def __init__(
134143
requested_location=None,
135144
read_cyclic=None,
136145
read_beams=None,
146+
split_shells=None,
137147
config=None,
138148
server=None,
139149
):
@@ -160,6 +170,8 @@ def __init__(
160170
self.inputs.read_cyclic.connect(read_cyclic)
161171
if read_beams is not None:
162172
self.inputs.read_beams.connect(read_beams)
173+
if split_shells is not None:
174+
self.inputs.split_shells.connect(split_shells)
163175

164176
@staticmethod
165177
def _spec():
@@ -272,6 +284,16 @@ def _spec():
272284
document="""Elemental nodal beam results are read if this
273285
pin is set to true (default is false)""",
274286
),
287+
26: PinSpecification(
288+
name="split_shells",
289+
type_names=["bool"],
290+
optional=True,
291+
document="""If the requested_location pin is not
292+
connected, this pin forces elemental
293+
nodal shell and solid results to be
294+
split if this pin is set to true
295+
(default is false)""",
296+
),
275297
},
276298
map_output_pin_spec={
277299
0: PinSpecification(
@@ -349,6 +371,8 @@ class InputsAccuEqvPlasticStrain(_Inputs):
349371
>>> op.inputs.read_cyclic.connect(my_read_cyclic)
350372
>>> my_read_beams = bool()
351373
>>> op.inputs.read_beams.connect(my_read_beams)
374+
>>> my_split_shells = bool()
375+
>>> op.inputs.split_shells.connect(my_split_shells)
352376
"""
353377

354378
def __init__(self, op: Operator):
@@ -391,6 +415,10 @@ def __init__(self, op: Operator):
391415
accu_eqv_plastic_strain._spec().input_pin(22), 22, op, -1
392416
)
393417
self._inputs.append(self._read_beams)
418+
self._split_shells = Input(
419+
accu_eqv_plastic_strain._spec().input_pin(26), 26, op, -1
420+
)
421+
self._inputs.append(self._split_shells)
394422

395423
@property
396424
def time_scoping(self):
@@ -627,6 +655,30 @@ def read_beams(self):
627655
"""
628656
return self._read_beams
629657

658+
@property
659+
def split_shells(self):
660+
"""Allows to connect split_shells input to the operator.
661+
662+
If the requested_location pin is not
663+
connected, this pin forces elemental
664+
nodal shell and solid results to be
665+
split if this pin is set to true
666+
(default is false)
667+
668+
Parameters
669+
----------
670+
my_split_shells : bool
671+
672+
Examples
673+
--------
674+
>>> from ansys.dpf import core as dpf
675+
>>> op = dpf.operators.result.accu_eqv_plastic_strain()
676+
>>> op.inputs.split_shells.connect(my_split_shells)
677+
>>> # or
678+
>>> op.inputs.split_shells(my_split_shells)
679+
"""
680+
return self._split_shells
681+
630682

631683
class OutputsAccuEqvPlasticStrain(_Outputs):
632684
"""Intermediate class used to get outputs from

src/ansys/dpf/core/operators/result/compute_stress.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@
1111

1212

1313
class compute_stress(Operator):
14-
"""Computes the stress from an elastic strain field.Only some 3-D
15-
elements (only hexa, tetra, pyramid and wedge) and integration
16-
schemes are supported. Only isotropic materials are supported.
17-
Material nonlinearity is not supported. Only constant materials
18-
are supported. All coordinates are global coordinates. All units
19-
need to be consistent.
14+
"""Computes the stress from an elastic strain field.compute_total_strain
15+
limitations are applicable for stress computation
2016
2117
Parameters
2218
----------
@@ -97,13 +93,8 @@ def __init__(
9793

9894
@staticmethod
9995
def _spec():
100-
description = """Computes the stress from an elastic strain field.Only some 3-D
101-
elements (only hexa, tetra, pyramid and wedge) and
102-
integration schemes are supported. Only isotropic
103-
materials are supported. Material nonlinearity is not
104-
supported. Only constant materials are supported. All
105-
coordinates are global coordinates. All units need to be
106-
consistent."""
96+
description = """Computes the stress from an elastic strain field.compute_total_strain
97+
limitations are applicable for stress computation"""
10798
spec = Specification(
10899
description=description,
109100
map_input_pin_spec={

src/ansys/dpf/core/operators/result/compute_stress_1.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111

1212

1313
class compute_stress_1(Operator):
14-
"""Computes the stress from an elastic strain field.Only some 3-D
15-
elements (only hexa, tetra, pyramid and wedge) and integration
16-
schemes are supported. Only isotropic materials are supported.
17-
Material nonlinearity is not supported. Only constant materials
18-
are supported. All coordinates are global coordinates. All units
19-
need to be consistent.Get the 1st principal component.
14+
"""Computes the stress from an elastic strain field.compute_total_strain
15+
limitations are applicable for stress computationGet the 1st
16+
principal component.
2017
2118
Parameters
2219
----------
@@ -97,13 +94,9 @@ def __init__(
9794

9895
@staticmethod
9996
def _spec():
100-
description = """Computes the stress from an elastic strain field.Only some 3-D
101-
elements (only hexa, tetra, pyramid and wedge) and
102-
integration schemes are supported. Only isotropic
103-
materials are supported. Material nonlinearity is not
104-
supported. Only constant materials are supported. All
105-
coordinates are global coordinates. All units need to be
106-
consistent.Get the 1st principal component."""
97+
description = """Computes the stress from an elastic strain field.compute_total_strain
98+
limitations are applicable for stress computationGet the
99+
1st principal component."""
107100
spec = Specification(
108101
description=description,
109102
map_input_pin_spec={

src/ansys/dpf/core/operators/result/compute_stress_2.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111

1212

1313
class compute_stress_2(Operator):
14-
"""Computes the stress from an elastic strain field.Only some 3-D
15-
elements (only hexa, tetra, pyramid and wedge) and integration
16-
schemes are supported. Only isotropic materials are supported.
17-
Material nonlinearity is not supported. Only constant materials
18-
are supported. All coordinates are global coordinates. All units
19-
need to be consistent.Get the 2nd principal component.
14+
"""Computes the stress from an elastic strain field.compute_total_strain
15+
limitations are applicable for stress computationGet the 2nd
16+
principal component.
2017
2118
Parameters
2219
----------
@@ -97,13 +94,9 @@ def __init__(
9794

9895
@staticmethod
9996
def _spec():
100-
description = """Computes the stress from an elastic strain field.Only some 3-D
101-
elements (only hexa, tetra, pyramid and wedge) and
102-
integration schemes are supported. Only isotropic
103-
materials are supported. Material nonlinearity is not
104-
supported. Only constant materials are supported. All
105-
coordinates are global coordinates. All units need to be
106-
consistent.Get the 2nd principal component."""
97+
description = """Computes the stress from an elastic strain field.compute_total_strain
98+
limitations are applicable for stress computationGet the
99+
2nd principal component."""
107100
spec = Specification(
108101
description=description,
109102
map_input_pin_spec={

src/ansys/dpf/core/operators/result/compute_stress_3.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111

1212

1313
class compute_stress_3(Operator):
14-
"""Computes the stress from an elastic strain field.Only some 3-D
15-
elements (only hexa, tetra, pyramid and wedge) and integration
16-
schemes are supported. Only isotropic materials are supported.
17-
Material nonlinearity is not supported. Only constant materials
18-
are supported. All coordinates are global coordinates. All units
19-
need to be consistent.Get the 3rd principal component.
14+
"""Computes the stress from an elastic strain field.compute_total_strain
15+
limitations are applicable for stress computationGet the 3rd
16+
principal component.
2017
2118
Parameters
2219
----------
@@ -97,13 +94,9 @@ def __init__(
9794

9895
@staticmethod
9996
def _spec():
100-
description = """Computes the stress from an elastic strain field.Only some 3-D
101-
elements (only hexa, tetra, pyramid and wedge) and
102-
integration schemes are supported. Only isotropic
103-
materials are supported. Material nonlinearity is not
104-
supported. Only constant materials are supported. All
105-
coordinates are global coordinates. All units need to be
106-
consistent.Get the 3rd principal component."""
97+
description = """Computes the stress from an elastic strain field.compute_total_strain
98+
limitations are applicable for stress computationGet the
99+
3rd principal component."""
107100
spec = Specification(
108101
description=description,
109102
map_input_pin_spec={

0 commit comments

Comments
 (0)