Jump to content
moeller

Read binary result file, compute data and use as result file in HyperView

Recommended Posts

Hello everyone,

 

I want to create a script, which takes data from binary files (e.g. binout from LS-Dyna, it stores curve data), computes it (e.g. find the maximum value of a curve) and create a result file, which can be used in HyperView (e.g. as a result for a contour plot). To be more specific, I want to create a contour plot for spot weld elements, which contains maximum values (constant over time) of spot weld forces, which are given in a binary output file from LS-Dyna.

 

I did not find an easy solution for this task, therefor I tried to break it down. This describes my plan backwards from the finish to the start:

- To create a contour plot from custom data, I can use an XML file, which defines my datatype (see "HyperWorks Result Math/Creating New Datatypes")

- To access data, which will be used for the new datatype, I can create a TCL Plugin or use TCL commands respectively

- The data is contained in a binary file. I want to either use HW TCL commands to access the LS-Dyna binary output directly or use the commands to access an Altair Binary Format file (ABF), which might be easier

- If I want to use the ABF file, I have to translate the LS-Dyna binary output file via HGTRANS first

 

Further applications could be the storage of the computed values as *.csf file, therefor I am really interested in the reading of this data.

 

Since I am really new to this topic, I would need some opinions and tips for this.

 

Makes the whole process sense or is there an easier way?

 

Which TCL or HW TCL commands can I use to access data in a binary file (LS-Dyna Binout or ABF)?

 

Thank you.

 

Update 1:

I wrote a script to access curves, which are plotted in HyperGraph, and store them in a database array. Then I write the data into a CSV file, to evaluate it with Excel.

I think this was the easy part.

 

The next question is, how do I read curve data from binary files? Can anyone help?

 

Edited by moeller

Share this post


Link to post
Share on other sites

Finnaly i understand that your work needs tons of tasks.

I wonder why hyperview cannot read that bin file, forces you to read by tcl? It is not supported by HV?

Share this post


Link to post
Share on other sites

If there is an easier solution, I am happy to try it.

 

I can read the Binout file with HyperGraph and plot the curves. Each curve describes a value for an element. That works fine and that is the normal process. But I want to work with the maximum values of each element, since this is what needs to be checked during post processing.

 

I would like to have this data in some kind of table, where for each spot weld element the different maximum forces (axial, shear, moment) are available. On the one hand I could use this data for a contour plot or to query it quickly for evaluation.

 

Therefor I tried to figure out, where to get this data from. I don't need the curves, but maybe I have to open them first to process them into the table I am looking for. The other option, the one I described in my first post, is to read the data directly from the Binout file.

Share this post


Link to post
Share on other sites
1 hour ago, moeller said:

Thank you for your quick reply.

How can I export max values of curves?

 

By tcl, you have to look up relevant commands in HW reference help

Share this post


Link to post
Share on other sites

Well that is what I meant initially. I think it is possible, to write it all in TCL and XML as described in my first post.

When you said, HV can export max values, I thought you meant there exists a function, I did not find before.

 

But to create a TCL script for it, is what I meant with

Quote

- To access data, which will be used for the new datatype, I can create a TCL Plugin or use TCL commands respectively

 

I found commands and scripts, which work with curve data, which is opened in HyperGraph.

If anyone knows how to access curve data directly from binary files, I would love to know it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...