The error :EPPL1:587<-component_selector_fc:596<-eig_values_fc:594<-strain_from_voigt_fc:595<-EPPL:593<-Source operator "lsdyna::d3plot::EPPL" not found:line 103
The database_extent_binary keyword:
I'll let @Ayush Kumar comment further, but my understanding is that this operator cannot handle d3plots files. From the PyDPF-Core help (which is here more complete that the Mech DPF one), the operator plastic strain principal 1 can only read h5dpf files:
For plastic strains, only plastic strain eqv seems available for d3plot files.
@Yao Lu,
The dpf.operators.result.plastic_strain_principal_1()operator is implemented for MAPDL results file.
dpf.operators.result.plastic_strain_principal_1()
For LS-Dyna results, you can extract the strain tensor and then use principal invariants code to get the max principal strain. Below is an example in PyDPF, you can adapt it for Mechanical with Minimal changes.
Please note the following code is tested with Ansys 2025R2
from ansys.dpf import core as dpf server = dpf.start_local_server(ansys_path=r"C:\Program Files\ANSYS Inc\v252") ds = dpf.DataSources() d3plot = r"D:\…\d3plot" actunits = r"D:\…\file.actunits" ds.set_result_file_path(d3plot, "d3plot") ds.add_file_path(actunits, "actunits") model = dpf.Model(ds) tfs = dpf.Scoping() tfs.ids = range(1, model.metadata.time_freq_support.n_sets + 1) strain = dpf.operators.result.total_strain(data_sources=ds, time_scoping=tfs) strain_fc = strain.outputs.fields_container.get_data() # Principal Strain strain_prin = dpf.operators.invariant.principal_invariants_fc(fields_container=strain_fc) strain_prin_f = strain_prin.outputs.fields_eig_1.get_data()[0] print(strain_prin_f) # Max. Prin. strain for EID 586 print(strain_prin_f.get_entity_data_by_id(586))
@Yao Lu to your other question of converting d3plot to h5dpf. Yes, you can. Refer to this post below for converting RST file to h5dpf, you can use the same method for LS-Dyna result files with some modifications:
How can I convert a file.rst to h5dpf format?
Hi Pernelle Marone-Hitz
Thanks for the comments.That really helps me find out my problem.
But here comes a new problem:Can we convert the d3plot into h5dpf with pyansys?
I seldom tried this type of data format.