Time scoping issue in Mechanical Scripting when trying to access transient thermal solution

Anon Member Posts: 4
First Comment
edited July 8 in Structures

I have generated a transient thermal solution in Mechanical and I'm trying to use scripting to analyse the solution at each time point. However,I can't seem to retrieve the entire range through my code. I get this error:

TEMP:149<-mapdl::rth::TEMP:150<-failed to read nodal results from the rst file

The following code is I think the minimal code that reproduces the error on my end:

analysis = model.Analyses[0]
dataSources = dpf.DataSources(analysis.ResultFileName)

scoping_op = dpf.operators.scoping.on_named_selection()
scoping = scoping_op.outputs.getmesh_scoping()

time_provider = dpf.operators.metadata.time_freq_provider()
timeList = time_provider.outputs.time_freq_support.GetData().TimeFreqs.Data

time_scoping = dpf.Scoping()
time_scoping.Location = dpf.locations.time_freq_sets
time_scoping.Ids = range(1, len(timeList) +1)

u = dpf.operators.result.temperature()

myRes_fields = u.outputs.fields_container.GetData()

Everything works fine if I limit the time scoping range to (time coord. are correct too):
time_scoping.Ids = range(1, 123)

In my case the full range is 292 time points (len(timeList) == 292), which is reflected in the tabular data of the Solution.

Note that both of these fail in the same way too:
time_scoping.Ids = range(1, 124)
time_scoping.Ids = range(10, 133)

Any insight as to why this is happening?


  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 78
    First Anniversary Solution Developer Community of Practice Member Ansys Employee 5 Likes

    @Anon are you storing results at all time points?

    Are you using outres commands to control frequency of result storage?

    @Ramdane any idea?

  • Anon
    Anon Member Posts: 4
    First Comment

    Yes, I'm storing at all time points.

    I don't know what you mean by outres commads so I think that is a no.

    Here are my analysis settings