    

 ## On this page

  

 

 # result:compute stress Z

 Last update: 31.07.2026 

**Version: 0.0.0**

## Description

Computes the stress from an elastic strain field. compute\_total\_strain limitations are applicable for stress computation Get the ZZ normal component (22 component).

## Inputs

This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation. Some inputs are required, while others are optional and provide additional configuration. Each parameter is detailed in the sections that follow the table.

Pin numberNameStatusExpected type(s)**1**[scoping](#input_1)[`scoping`](../../core-concepts/dpf-types.md#scoping)**3**[streams\_container](#input_3)[`streams_container`](../../core-concepts/dpf-types.md#streams-container)**4**[data\_sources](#input_4)[`data_sources`](../../core-concepts/dpf-types.md#data-sources)**9**[requested\_location](#input_9)[`string`](../../core-concepts/dpf-types.md#standard-types)**10**[strain](#input_10)Required[`fields_container`](../../core-concepts/dpf-types.md#fields-container), [`field`](../../core-concepts/dpf-types.md#field)<a id="input_1"></a>

### scoping (Pin 1)

- **Required:** No
- **Expected type(s):** [`scoping`](../../core-concepts/dpf-types.md#scoping)

The element scoping on which the result is computed.

<a id="input_3"></a>

### streams\_container (Pin 3)

- **Required:** No
- **Expected type(s):** [`streams_container`](../../core-concepts/dpf-types.md#streams-container)

Needed to get mesh and material ids. Optional if a data\_sources have been connected.

<a id="input_4"></a>

### data\_sources (Pin 4)

- **Required:** No
- **Expected type(s):** [`data_sources`](../../core-concepts/dpf-types.md#data-sources)

Needed to get mesh and material ids. Optional if a streams\_container have been connected.

<a id="input_9"></a>

### requested\_location (Pin 9)

- **Required:** No
- **Expected type(s):** [`string`](../../core-concepts/dpf-types.md#standard-types)

Average the Elemental Nodal result to the requested location.

<a id="input_10"></a>

### strain (Pin 10)

- **Required:** Yes
- **Expected type(s):** [`fields_container`](../../core-concepts/dpf-types.md#fields-container), [`field`](../../core-concepts/dpf-types.md#field)

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

## Outputs

This table lists the output pins for this operator. Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing. Each output is detailed in the sections that follow the table.

Pin numberNameExpected type(s)0[fields\_container](#output_0)[`fields_container`](../../core-concepts/dpf-types.md#fields-container)<a id="output_0"></a>

### fields\_container (Pin 0)

- **Expected type(s):** [`fields_container`](../../core-concepts/dpf-types.md#fields-container)

The computed result fields container (elemental nodal).

## Configurations

This operator supports [configuration options](../../core-concepts/operator-configurations.md) that modify its behavior.

### [mutex](../../core-concepts/operator-configurations.md#mutex)

- **Expected type(s):** [`bool`](../../core-concepts/dpf-types.md#standard-types)
- **Default value:** false

If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

### [run\_in\_parallel](../../core-concepts/operator-configurations.md#run_in_parallel)

- **Expected type(s):** [`bool`](../../core-concepts/dpf-types.md#standard-types)
- **Default value:** true

Loops are allowed to run in parallel if the value of this config is set to true.

## Scripting

This operator can be accessed through scripting interfaces using these identifiers.

**Category**: result

**Plugin**: live post

**Scripting name**: compute\_stress\_Z

**Full name**: result.compute\_stress\_Z

**Internal name**: compute\_stress\_Z

**License**: None

## Examples

These examples demonstrate how to use this operator in different programming environments. Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.

C++```cpp
#include "dpf_api.h"

ansys::dpf::Operator op("compute_stress_Z"); // operator instantiation
op.connect(1, my_scoping);
op.connect(3, my_streams_container);
op.connect(4, my_data_sources);
op.connect(9, my_requested_location);
op.connect(10, my_strain);
ansys::dpf::FieldsContainer my_fields_container = op.getOutput<ansys::dpf::FieldsContainer>(0);

```

CPython```python
import ansys.dpf.core as dpf

op = dpf.operators.result.compute_stress_Z() # operator instantiation
op.inputs.scoping.connect(my_scoping)
op.inputs.streams_container.connect(my_streams_container)
op.inputs.data_sources.connect(my_data_sources)
op.inputs.requested_location.connect(my_requested_location)
op.inputs.strain.connect(my_strain)
my_fields_container = op.outputs.fields_container()

```

IPython```python
import mech_dpf
import Ans.DataProcessing as dpf

op = dpf.operators.result.compute_stress_Z() # operator instantiation
op.inputs.scoping.Connect(my_scoping)
op.inputs.streams_container.Connect(my_streams_container)
op.inputs.data_sources.Connect(my_data_sources)
op.inputs.requested_location.Connect(my_requested_location)
op.inputs.strain.Connect(my_strain)
my_fields_container = op.outputs.fields_container.GetData()

```

  
## Changelog

- Version 0.0.0: Initial release.