How to correctly open multiple binout files using DPF-Core?
In LS-Dyna, different data is frequently stored in different binout files (binout0000, 0001, 0003..).
The very simple code:
def select_binout_files(): file_paths = filedialog.askopenfilename( title="Select Files", filetypes=[("All files", "*.*")] ) return file_paths filepath = select_binout_files() filepath = filepath.replace('/binout', '\\binout') dsb = dpf.DataSources() dsb.set_result_file_path(filepath, 'binout') model = dpf.Model(dsb) results = model.results for attr in dir(results): if attr[0] != '_': print(attr)
should print all the attributes present in the results class. print(results) yields the correct list of expected results to be found in all the binouts, but, in the 'for' loop instead, most of the other available results (print(results)) are not attributes of the class. Glstat and others are present, but most putputs cannot be retrieved. What is the way to go?
Answers
-
@Ramdane or @Paul Profizi - another DPF for you, gents!
0 -
As a follow up, I dived into the DPF code on Github (https://github.com/ansys/pydpf-core/tree/master/src/ansys/dpf/core/operators/result). It is possible that the extraction of the missing data, such as swforc is not yet supported?
0