Closed bloughran618 closed 3 years ago
The binary format of the .db file is different from the .rst file, and ANSYS doesn't publish the headers of the database file like they do with the result files. I'll ask around and see if they're fine with exposting that sort of functionality.
It actually won't be too long until there's a better interface that allows for more direct extraction of data via MAPDL directly to Python. With luck it will be released by 2020R1/2020R2. For now, I'll look into the feasibility of a database reader.
Ok, please let me know if you are able to figure out the .db headers, I think it would be very beneficial to be able to parse the .db information into python without having to use an APDL macro.
Thanks!
Probably won't support this since ANSYS doesn't plan on directly parsing/reading database files. I'm limited by what's placed in the header files in the unified install (i.e. public interfaces).
I was interested in extracting information from an existing .db file using pyansys, such as node position or the node/element numbers of a given component. Is there a way to do parse this directly from the .db file using pyansys, similar to the way you can parse the frequencies from the .rst file with
result=pyansys.read_binary(path)
freqs = result.time_values
Or would the best way to do something like this be to use
ansys = pyansys.Mapdl(run_location=path)
ansys.nlist(arguments)
ansys.cmlist(arguments)
I would rather parse the data from the .db file directly, since that would save the time of invoking ansys. Is there a method to do this?