Altair Compose - Creating SPCD from .op2 file
Hi all,
I'm facing a problem in a static analysis. I need to export from a global model .op2 node displacement and rotation in order to built a bdf file with SPCD.
These SPCD are then used to run a non linear analysis with a reduced model by imposing displacement and rotation on interface nodes.
I'm not able to get SPCD directly from Hyperview (without passing through excel), so I made a script on compose that uses readcae command.
At the end of the script, there is a csvwrite command that write down a bdf file.
The problem is I can't choose for each column the needed figure precision. I try to be a bit clearer.
In a SPCD command the first colum is the SPCD string (string, the the SPCD ID (integer), the third is the NodeID (integer), the fourth the disp component (integer 1,2,3,4,5,6) and then the value of the corresponding displacement (floting point number).
I'm not able to have 8 figures for each field (Nastran type) and the precision for each field.
Furthermore, I would like to export a bdf file with the string SPCD as first column, then the SPCD ID and so on.
The command cswrite, export only numbers and not strings so I can't introduce a column string SPCD.
I hope it is clear what is my problem.
Any ideas?
Thanks
Answers
-
Hi Giuseppe,
I'm attaching a simple solution transforming all your numbers (and strings) in strings! In that case you can define your precision (integer, float) right before that transformation, that is using num2str function (with its precision).
Once you just have strings, you can simply use a cell instead of a matrix, then using fprintf you can write your text file (in any extension you want).
Note: Of course this is not the only solution available in Compose - Hope it helps you
0 -
Hi Joao,
Thank you very much for your precious advice. I'm going to try it immediately and I'll let you know.
Meanwhile, other solutions/advices are welcome :-)
Thanks
0 -
Giuseppe,
another alteranative could be to use HM directly to get your include file with all relevant informations.
I did prepare a small video showing (I believe) all the major steps you need to go through.
Hope it helps
Thanks
Michele
0 -
Hi Michele,
It could be very helpful. Where can I find this video?
Thanks
0 -
Giuseppe Pavano said:
Hi Michele,
It could be very helpful. Where can I find this video?
Thanks
in mu reply
0 -
Michele,
Wow!! It helps me a lot. I never found this function because usually I see results by changing the interface (Hyperview type). In this interface this function doesn't appear.
I didn't realise I could attach result in Hyperworks directly without switching to hyperview.
Firstly, I didn't see the video cause I had to reload the page, sorry :-)
Thank you very much
0