Update 50000+ node coordinates

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello,

 

In Hypermesh I would like to update the node coordinates of the nodes of a certain component in my model (new coordinates based on results of some simulation). I have a separate text file with per node ID the new coordinates. With TCL, I want to go through this list and update the node coordinate, using *setvalue  or *nodemodify. However, either of these commands take ~100 [ms] per node to update. Since I have more than 50,000 nodes, this will take too long. Exporting the model to a text file and editing it there is the current workaround but not preferable: I need a hypermesh file with the correct node coordinates and (very important, and the main source of my problem) the connection with the geometry.

So, I thought to use threads. However, this does not seem to work in Hypermesh. If I run the example file from some TCL book (which runs fine in the normal TCL shell) nothing happens: threads are created and destroyed but if I send something to the thread to be evaluated, nothing happens.

Can anyone help me how I can modify the coordinates of multiple nodes at the same time by using some kind of parallel processing?

 

Edit: I also tried *setvalue with multiple nodes on a mark but then all nodes get the same coordinate. For example:

*createmark nodes 1 1 2 3

*setvalue nodes mark=1 coordinates ='[list {0.0 0.0 0.0} {0. 0.1 0.1} {0.0 0.1 0.2}'  (without the '' but otherwise it was not shown in this message)

results in all 3 nodes having coordinate 0.0 0.0 0.0

 

 

Kind regards,

Loesje

Tagged:

Answers

  • Adriano_Koga
    Adriano_Koga
    Altair Employee
    edited August 2020

    Did you try importing a new model and overwritting its coordinates? It would be much easier.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2020

    What do you mean by: importing a new model and overwriting the coordinates? in what sense importing and overwriting?

     

    Already found what you mean: the  Import solver deck tabs shows the possibility to import nodes only and with Fe overwrite, the coordinates are overwritten. I didn't think for a second about this possibility. Thank you very much. It does not solve the parallel processing problem (still need that for another purpose, ie new topic) but it does solve THIS problem very well.

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited October 2020

    Direct update within Hypermesh is very slow.

    So I think the doable method is exporting your model into text format (HMASCII for example) and update node coordinates by a script. When done, you import again into Hypermesh.