Selection of nodes is making me cry

Using Coreform Cubit 2025.8 on FC42, I have a geometry which only exists as a mesh (exodus) and I need to create some nodesets. I have done something very similar in the past (Importing of an Exodus file) and in this case I want to select the nodes which lie within a radius of 32 units of the origin, so I use the select nodes with syntax, in my particular case I used
select nodes with ((x_coord * x_coord) + (y_coord * y_coord) <= 31.5*31.5
Which worked great, when I add these to a nodeset, they never get added despite being selected, and the select command highlighting them in GUI

So I tried something more direct

create nodeset 1
nodeset 1 nodes with ((x_coord * x_coord) + (y_coord * y_coord) <= 31.5*31.5 

Runs, but produces no nodes in the nodeset. I’ve attached the exodus file so you can share my pain.

Apparently through the tears I didn’t click the file upload button, https://www.filemail.com/d/nexyfxmmilgmxzz

Hi @makeclean,

When I start needing to work with those sorts of complex logic cases, I like to switch to the Python API:

# Your existing journal file contents...
...
...
# Drop this in:
#!python
ns_nodes = []
N = cubit.get_entities( "node" )
for nid in N:
  x,y,z = cubit.get_nodal_coordinates( nid )
  if (x**2 + y**2) <= 31.5**2:
    ns_nodes.append( nid )

cubit.cmd( f"nodeset 1 node {cubit.get_id_string( ns_nodes )}" )

#!cubit
1 Like

Hi @makeclean,
have you already tried

nodeset 1 add node with ((x_coord * x_coord) + (y_coord * y_coord) <= 31.5*31.5)

?
Works on my machine.

1 Like

Yeah, tried that, see the console output below…

Cubit>nodeset 1 add node with ((x_coord * x_coord) + (y_coord * y_coord) <= 31.5*31.5)
ERROR: Attempted to create empty nodeset; removing nodeset 1
Journaled Command: nodeset 1 add node with ( ( x_coord * x_coord ) + ( y_coord * y_coord ) <= 31.5 * 31.5 )

Cubit>create nodeset 1
Nodeset 1 created.
Journaled Command: create nodeset 1

Cubit>nodeset 1 add node with ((x_coord * x_coord) + (y_coord * y_coord) <= 31.5*31.5)
Journaled Command: nodeset 1 add node with ( ( x_coord * x_coord ) + ( y_coord * y_coord ) <= 31.5 * 31.5 )

Cubit>

Resultant nodeset is empty.

Can also confirm that @gvernon your approach doesnt work for me either, notably the contents of ns_nodes is correct, but the nodes do not get added to the nodeset.

Note in the case of @Norbert_Hofbauer, like my original case instead of using nodeset 1 add if I instead do select node with ((x_coord * x_coord) + (y_coord * y_coord) <= 31.5*31.5) then the nodes are selected as in my original example, but when adding these to the nodeset, Cubit fails to do so.


Result of the select node ...

Hmmm… that’s odd, it consistently works for me:

Which option did you use to import the Exodus file, Mesh Geometry, Free Mesh, or Lite?

I hadn’t tried different import options, but I used lite

Works fine with free mesh - bizzare - why is that?

Lite mesh is a bare-bones “I just want to visualize the mesh” functionality, meant for when you don’t need all the “object” capabilities of Coreform Cubit which take (relatively) considerable time & memory to initialize. Here’s a documentation link:

The more you know, thanks chaps. Could I suggest for the next release a little warning message is added?

1 Like