PyDPF-Core is unable to extract results for the explicit dynamic analysis
Hello,
I have both static and explicit dynamic analyses in a single ANSYS Mechanical file, as illustrated in the attached image. While I can extract the static analysis results using PyDPF-Core, I’m unable to do the same for the explicit dynamic analysis. When I print the model, only one time step appears, corresponding to the static analysis. How can I extract dynamic results?
DPF Time/Freq Support:
Number of sets: 1
Cumulative Time (s) LoadStep Substep
1 1.000000 1 1 1
I also tried LS-DYNA instead of explicit dynamic and throw the following error:
DPFServerException: ResultInfoProvider:4<-lsdyna::d3plot::result_info_provider:5<-error code 3:D3plotReader encounters an error when open C because the path is not found
Answers
-
Here is the list of supported result files:
https://dpf.docs.pyansys.com/version/stable/
Result files from the "Explicit Dynamics" component cannot be post-processed by DPF. However, you should be able to read .d3plot and .binout files coming from LS-Dyna. Here's an example: https://dpf.docs.pyansys.com/version/stable/examples/14-lsdyna/00-lsdyna_operators.html#sphx-glr-examples-14-lsdyna-00-lsdyna-operators-py0 -
Thanks for your comment. I used LS-DYNA and when I printed the model it through the following error:
DPFServerException: ResultInfoProvider:4<-lsdyna::d3plot::result_info_provider:5<-error code 3:D3plotReader encounters an error when open C because the path is not found
Any idea?
0 -
Are you able to run the example I shared ? I believe the error message occurs when you're trying to use your own d3plot, correct? Based on the error message it seems that the path to the d3plot file is not understood, I'd recommend defining it through os.path.
0 -
Yes, I am able to run the example you shared. I am using os.path to load the d3plot file. I am able to print 'ds' but for the model return the error I mentioned in original post. My d3plot file size is 32KB however, there is a d3plot01 file which is 35MB. What is d3plot01? Here is my code:
path0 = os.getcwd()
d3plot = os.path.join(path0, "d3plot")
print(os.path.exists(d3plot))ds = dpf.DataSources()
ds.set_result_file_path(d3plot[0], "d3plot")
ds.add_file_path(d3plot[3], "actunits")
print(ds)model = dpf.Model(ds)
print(model)0 -
@Ayush Kumar would you happen to know what could be the problem here? Many thanks
1 -
@hbolandi DPF doesn't support Explicit Dynamics System - it uses Autodyn solver behind the scenes.
But DPF does support LS-Dyna, looking at your code,
d3plot
variable is a path and trying to access the first index of the path is the issue. Please try the following:path0 = os.getcwd() d3plot = os.path.join(path0, "d3plot") print(os.path.exists(d3plot)) act_units = os.path.join(path0, "file.actunits") ds = dpf.DataSources() ds.set_result_file_path(d3plot, "d3plot") ds.add_file_path(act_units , "actunits") print(ds) model = dpf.Model(ds) print(model)
1 -
@Ayush Kumar Thanks a lot! It worked.
1