How to plot set of elements in cgx

Hi.

I have a body that is divided into grains (I used Neper and then Neper2Abaqus). Those grains are basically just sets of elements. Here is an example of one such grain:

*Elset, Elset=poly1
570, 635, 636, 637, 700, 701, 702, 765, 766, 767, 830, 831, 832, 894, 895, 896, 
959, 960, 2000, 2065, 2066, 2067, 2130, 2131, 2132, 2195, 2196, 2197, 2260, 2261, 2262, 2324, 
2325, 2326, 2389, 2390

So my question is: is there a way to plot that set (for example poly1 ) in CGX? I tried something but it didn’t work (every time it says that plot: set:poly1 does not exist ). Are these sets even saved in the output file?

To start with, make sure you read the sets in question into the cgx session.

read poly1.nam inp

For the first set, plot e poly1 r should plot the elements in poly1 in red. Use plus for additional sets.

An example from my own files:

# Read the mesh and sets.
read all.msh inp
read fix1.nam inp
read fix2.nam inp
read load.sur inp
read bl.nam inp
read tl.nam inp
read p1.nam inp
read p2.nam inp
read core.nam inp

# Show the elements with specific colors.
plot e Etl g
plus e Ebl b
plus e Ep1 n
plus e Ep2 n
plus e Ecore y

how can i create these .nam files? Is there a way to create them for all grains automatically?

That depends on the preprocessor you use.

I tend to use cgx to define geometry and meshes.
Mainly because it is pretty good at creating regular hex meshes.
In this case, creating the .nam files is easy:

send <setname> abq nam

Having taken a quick look at the documentation for Neper, it seems like you need to use the -elset option when using its meshing module.

Thank for the advise. I’ll try to do that. Also can you send an example of that .nam file?

A .nam file as generated by cgx is essentially:

** Names based on p1
*NSET,NSET=Np1 
3, 
4, 
5, 
6, 
7, 
8, 
** more node numbers, one per line...
78429, 
*ELSET,ELSET=Ep1 
1, 
2, 
3, 
4, 
5, 
6, 
7, 
** more element numbers, one per line...