PucklaJ / dynareadout

High-Performance C/C++ library for parsing binary output files and key files of LS Dyna (d3plot, binout, input deck)
zlib License
16 stars 5 forks source link

Unable to read the RWFORC section of a BINOUT file #33

Closed dbrizard closed 10 months ago

dbrizard commented 10 months ago

Dear @PucklaJ

This library is great and very useful. Thank you ! I discovered it recently and am using the Python version. I have no problem to read the nodout section of my binout file. (I was also able read the glstat and rcforc of another binout file ) However, I cannot read the rwforc section of the same binout file !

Here are all the options I tried unsuccessfully:

def fetchSimulationResults(self): """
""" binout = Binout(os.path.join(self.kfile['dirname'], 'binout')) time = np.array(binout.read('nodout/time')) xdispl = np.array(binout.read('nodout/x_displacement'))

XXX problems with rwforc reading:

binout.variable_exists('rwforc/forces/x_force') # false

binout.variable_exists('rwforc/x_force') # kicked out from console...

binout.variable_exists('rwforc/forces') # kicked out...

binout.variable_exists('rwforc/2/time') # false

binout.variable_exists('rwforc/time') # kicked out...

And here is the LS-DYNA model which generates the binout file. Note that I have no problem plotting the rwforc within LS-PrePost, so the section exists !

car6_crash_v21.k.txt main_v21.k.txt

PucklaJ commented 10 months ago

Nice to hear that you like my software. I will have a closer look tomorrow, but by quickly looking at the issue it seems to be same problem I am currently working on #32. I personally have never worked with rwforc, so I will need to have a look at the structure. Thank you for reporting! Feel free to always send me bug reports or requests for improvements.

dbrizard commented 10 months ago

If it can help, there is a small command line utility called ioq released by LSTC in the LSDA archive. Avaialble on LSTC ftp repository. It can help to understand the structure of binout files. Here is what it gives on my binout file:

[me@computer lsopt_car6]$ ioq binout File contains 308144 bytes of data binout > ls nodout
rwforc
binout > cd rwforc binout > ls forces
transducer
binout > cd forces binout > cd d003019 binout > ls normal_force R4 2 time R4 1 x_force R4 2 y_force R4 2 z_force R*4 2 binout > cat time time[0] = 0.04993316904 binout > cat x_force x_force[0] = 25243.53711 x_force[1] = 370856.5 binout >

PucklaJ commented 10 months ago

I fixed the issue. It was the same issue I had with ncforc/master_xxxx/x_force and so one. I might upload a hotfix later, otherwise there will be new release at the end of the month. If there still is an issue just reopen it.