Execute *scl file f...
 
Notifications
Clear all

Execute *scl file from Matlab

4 Posts
2 Users
0 Reactions
2,858 Views
tinh nguyen
Posts: 2
Topic starter
(@tinh-nguyen)
Barista
Joined: 5 years ago

I get stuck to run a Scripting Command Language file from Matlab. I am trying to read Ls- dyna results (by using "SCL") and to process it in Matlab.

Please help me! Thanks in advance.

3 Replies




Negative Volume
Posts: 665
Admin
(@negativevolume)
CEO
Joined: 6 years ago

Hi @tinh-nguyen

Have you tried using ls-prepost cfiles to script the export of ls-dyna results to something that Matlab can use like a .csv file? This is the way that I normally do it. Is this an option for you or do you want to know how to directly pull results from the results using Matlab only?

Reply
2 Replies
tinh nguyen
(@tinh-nguyen)
Joined: 5 years ago

Barista
Posts: 2

Hi @negativevolume

Thanks a lot for your suggestion.

In my research, I am trying to make a program in Matlab which calls Ls-dyna for analysis. After that, this program also imports Ls-dyna results to process it. I get stuck to write a code (Matlab) to import the result data of Ls-dyna into Matlab. I have never tried using ls-prepost cfiles before, is it possible to solve it with cfiles?

Kind regard,

Tinh

Reply
Negative Volume
Admin
(@negativevolume)
Joined: 6 years ago

CEO
Posts: 665

@tinh-nguyen

Very cool. I'm not sure if there is any way to directly import results from a .binout / .ascii files into Matlab, but do share if you figure it out. 

Cfiles are written as an echo whenever you are working in LS-PrePost, so every action that you do in PrePost has a script based command. What I have done traditionally is go through PrePost and plot / save the data that you want to post-process as a .csv, or whatever file format you'd like, and then copy and save the resulting .cfile in your file directory to retain the commands used to plot everything. You can open and modify these .cfiles as a .txt file, they are pretty simple. 

As a test, you can then test the cfile by opening PrePost and dragging the cfile into the window and clicking start. It should run through everything you did before. Now, the use of these really comes by removing the specific paths in the .cfile for opening .binouts and save locations because by default without paths, it will look for and save files in the location of the .cfile. So you can use Matlab to copy these .cfiles to specific folders and run them which will provide you with a file that you can then open in Matlab. 

Let me know if you need more clarification / help with this. It's an extremely useful tool when post-processing multiple simulations the same way. 

Reply







Share: