How to set node set Ids #288
-
Hello I am working on converting some of my input into exodus format. Now i am stuck with defining node sets. I have some node sets in my own format. To set these into exodus format, I am using the following code node_set_ids = range(1,10)
set_nodes = [5,9]
status = my_exo.put_node_set(1, set_nodes) But unfortunately, it results in a an error saying no set with id 1 is found. I tried to set the node set ids but cannot find a suitable function to do. Can you point me to the necessary setps to do this ? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
When you first define the exodus model, you will tell it how many node sets the model will contain (
Then, for each of those
You can then use your code above to actually output the Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
You might also be interested in using
|
Beta Was this translation helpful? Give feedback.
When you first define the exodus model, you will tell it how many node sets the model will contain (
num_ns
):Then, for each of those
num_ns
nodesets, you tell exodus the ID and count of nodes and distribution factors:You can then use your code above to actually output the
set_nodes
. Somewhat convulted and not really pythonic, but this is driven by the C API...Hope that helps.