> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# workflow_energy_per_component class

**Namespace:** [Ans.DataProcessing.operators.result](https://developer.synopsys.com/docs/dpf/dpf-mechanical/api/Ans.DataProcessing/operators/result)

## Summary

Calculates the cumulated energy per component (Named Selection). For cyclic and multistage models, the expansion will be automatically done.

available inputs: `time_scoping` (Scoping) (optional), `mesh_scoping` (Scoping, ScopingsContainer) (optional), `energy_type` (Int32) (optional), `streams_container` (StreamsContainer), `data_sources` (DataSources), `named_selection1` (string) (optional), `named_selection2` (string) (optional)

available outputs: `component_energy` (FieldsContainer), `component_energy_percentage` (FieldsContainer), `component_total_energy` (FieldsContainer), `component_total_energy_percentage` (FieldsContainer), `component_strain_energy` (FieldsContainer), `component_strain_energy_percentage` (FieldsContainer), `component_kinetic_energy` (FieldsContainer), `component_kinetic_energy_percentage` (FieldsContainer)

## Example

```python theme={null}
op = workflow_energy_per_component()

op = workflow_energy_per_component(time_scoping=my_time_scoping,mesh_scoping=my_mesh_scoping,energy_type=my_energy_type,streams_container=my_streams_container,data_sources=my_data_sources,named_selection1=my_named_selection1,named_selection2=my_named_selection2)
```

## Class Information

| Property | Value |
| - | - |
| Namespace | `Ans.DataProcessing.operators.result` |
| Assembly | `Ans_Dpf_FEMutils_dll_cs` |
| Base Class | `Ans.DataProcessing.internal_objects.BaseOperator` |

## Inputs

### time\_scoping

**Type:** *LinkableInput*

### mesh\_scoping

When the input is a scoping, it is treated as the master scoping. All named selections will intersect with it. When the input is a scopings container, named selections will not be needed.

**Type:** *LinkableInput*

### energy\_type

Type of energy to be processed: (0: Strain + Kinetic energy (default), 1: Strain energy, 2: Kinetic energy, 3: All energy types)

**Type:** *LinkableInput*

### streams\_container

**Type:** *LinkableInput*

### data\_sources

**Type:** *LinkableInput*

### named\_selection1

Named Selections. Intersection of all  Named Selections with the master scoping will be done.

**Type:** *LinkableInput*

### named\_selection2

Named Selections. Intersection of all  Named Selections with the master scoping will be done.

**Type:** *LinkableInput*

## Outputs

### component\_energy

**Type:** *LinkableOutput*

### component\_energy\_percentage

**Type:** *LinkableOutput*

### component\_total\_energy

**Type:** *LinkableOutput*

### component\_total\_energy\_percentage

**Type:** *LinkableOutput*

### component\_strain\_energy

**Type:** *LinkableOutput*

### component\_strain\_energy\_percentage

**Type:** *LinkableOutput*

### component\_kinetic\_energy

**Type:** *LinkableOutput*

### component\_kinetic\_energy\_percentage

**Type:** *LinkableOutput*

## Constructors

#### Constructor

```python theme={null}
workflow_energy_per_component()
```

#### Constructor

```python theme={null}
workflow_energy_per_component(time_scoping, mesh_scoping, energy_type, streams_container, data_sources, named_selection1, named_selection2, config)
```

**Parameters:**

* `time_scoping` (*object*)
* `mesh_scoping` (*object*)
* `energy_type` (*object*)
* `streams_container` (*object*)
* `data_sources` (*object*)
* `named_selection1` (*object*)
* `named_selection2` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
workflow_energy_per_component(config)
```

**Parameters:**

* `config` (*OperatorConfig*)

## Methods

## Properties

#### inputs

**Type:** *InputSpec*

```python theme={null}
# Get or set the property
value = obj.inputs
obj.inputs = new_value
```

#### outputs

**Type:** *OutputSpec*

```python theme={null}
# Get or set the property
value = obj.outputs
obj.outputs = new_value
```

#### defaultConfig

**Type:** *Config*

```python theme={null}
# Get the property (read-only)
value = obj.defaultConfig
```
