InputsComputeStress2#

class ansys.dpf.core.operators.result.compute_stress_2.InputsComputeStress2(op: ansys.dpf.core.dpf_operator.Operator)#

Bases: ansys.dpf.core.inputs._Inputs

Intermediate class used to connect user inputs to compute_stress_2 operator.

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.compute_stress_2()
>>> my_scoping = dpf.Scoping()
>>> op.inputs.scoping.connect(my_scoping)
>>> my_streams_container = dpf.StreamsContainer()
>>> op.inputs.streams_container.connect(my_streams_container)
>>> my_data_sources = dpf.DataSources()
>>> op.inputs.data_sources.connect(my_data_sources)
>>> my_requested_location = str()
>>> op.inputs.requested_location.connect(my_requested_location)
>>> my_strain = dpf.FieldsContainer()
>>> op.inputs.strain.connect(my_strain)

Overview#

connect

Connect any input (an entity or an operator output) to any input pin of this operator.

scoping

Allows to connect scoping input to the operator.

streams_container

Allows to connect streams_container input to the operator.

data_sources

Allows to connect data_sources input to the operator.

requested_location

Allows to connect requested_location input to the operator.

strain

Allows to connect strain input to the operator.

Import detail#

from ansys.dpf.core.operators.result.compute_stress_2 import InputsComputeStress2

Property detail#

property InputsComputeStress2.scoping: ansys.dpf.core.inputs.Input[ansys.dpf.core.scoping.Scoping]#

Allows to connect scoping input to the operator.

The element scoping on which the result is computed.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.compute_stress_2()
>>> op.inputs.scoping.connect(my_scoping)
>>> # or
>>> op.inputs.scoping(my_scoping)
property InputsComputeStress2.streams_container: ansys.dpf.core.inputs.Input[ansys.dpf.core.streams_container.StreamsContainer]#

Allows to connect streams_container input to the operator.

Needed to get mesh and material ids. Optional if a data_sources have been connected.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.compute_stress_2()
>>> op.inputs.streams_container.connect(my_streams_container)
>>> # or
>>> op.inputs.streams_container(my_streams_container)
property InputsComputeStress2.data_sources: ansys.dpf.core.inputs.Input[ansys.dpf.core.data_sources.DataSources]#

Allows to connect data_sources input to the operator.

Needed to get mesh and material ids. Optional if a streams_container have been connected.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.compute_stress_2()
>>> op.inputs.data_sources.connect(my_data_sources)
>>> # or
>>> op.inputs.data_sources(my_data_sources)
property InputsComputeStress2.requested_location: ansys.dpf.core.inputs.Input[str]#

Allows to connect requested_location input to the operator.

Average the Elemental Nodal result to the requested location.

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.compute_stress_2()
>>> op.inputs.requested_location.connect(my_requested_location)
>>> # or
>>> op.inputs.requested_location(my_requested_location)
property InputsComputeStress2.strain: ansys.dpf.core.inputs.Input[ansys.dpf.core.fields_container.FieldsContainer | ansys.dpf.core.field.Field]#

Allows to connect strain input to the operator.

Field/or fields container containing only the elastic strain field (element nodal).

Returns:

An Input instance for this pin.

Return type:

input

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.compute_stress_2()
>>> op.inputs.strain.connect(my_strain)
>>> # or
>>> op.inputs.strain(my_strain)

Method detail#

InputsComputeStress2.__str__()#
InputsComputeStress2.connect(inpt)#

Connect any input (an entity or an operator output) to any input pin of this operator.

Searches for the input type corresponding to the output.

Deprecated since version Deprecated: in favor of explicit output-to-input connections.

InputsComputeStress2.__call__(inpt)#
InputsComputeStress2.__getitem__(item) Input#