- Example 1: Get the maximum over time of the total deformation.
- Example 2: Get the average total deformation on all time steps.
Example 1: Equivalent Stress
The method here is quite simple, as we will only need to use thedpf.operators.result.stress_von_mises() operator. We simply have to provide the following inputs:
- The data sources: this is simply the result file.
- The time scoping: here we will use the first result set.



Example 2: Equivalent Stress on Named Selection
Let’s imagine we have a named selection in the model to identify some specific elements. We’d like to plot the Equivalent Stress again, but only on this Named Selection:



Example 3: Scaled Equivalent Stress on Named Selection
Now we’d like to use the result created in Example 2 but also scale the values by a specified amount. Again, this can be done natively in Mechanical through inserting a User-Defined Result scoped to the Named Selection and with the following expression: SEQV*Val where Val is the scale value.

- Use the
math.scale()operator to scale the results - Add a section in the detail’s view of the Python Result so that the user can define the scale value.


this.GetCustomPropertyByPath("Group 1/Scale Value").Value As for the scale operator, we just need to connect it both to the scale value and to the output field of the equivalent stress operator. The script is as follows:

Example 4: Scaled Equivalent Stress on two Named Selections with two different scale values
Here we’d like to get on the same plot the following result:- For nodes belonging to Named Selection n°1, scale the equivalent stress result by value N1.
- For nodes belonging to Named Selection n°2, scale the equivalent stress result by value N2.

- Scaled stress for NS1
- Scaled stress for NS2.
