Working with results
Result extraction in Mechanical relies on DPF result operators connected to the current analysis result file.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import mech_dpf
import Ans.DataProcessing as dpf
mech_dpf.setExtAPI(ExtAPI)
analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
ds = dpf.DataSources()
ds.SetResultFilePath(analysis.ResultFileName)
stress_op = dpf.operators.result.stress()
stress_op.inputs.data_sources.Connect(ds)
fc = stress_op.outputs.fields_container.GetData()
field = fc[0]
Was this page helpful?