Importing of an Exodus file

Hi

I have some meshes from a colleague, which original from ‘Image Based’ FE problems, where the mesh has been derived from CT scans of materials. He gives me Ensight Gold files, which I import into Paraview, which then exports an exodus file, for me to play with in Cubit/Trelis. This all works fine, and ive done some succesful calculations in the past. Now he’s given me some new files which are much more complicated in terms of material distributions, see below.

It would be convenient to be also to assign mesh blocks according the material distribution, now I know that the exodus file when read in had access to the material id value on each element, if I could access this i could easily add the appropriate elements to blocks.

Its not massively clear if/how I could access the material field to be able to assign properties, all hints appreciated :slight_smile:

Further I was watching a tutorial the other day, which seemed to suggest I could grab nodes to stuff into a nodeset with some spatial based commands, like nodeset 1 add node with z_coord > 17.3, but that doesnt seem to do anything, it reports success but no vertices actually get added to anything.

Thanks

Andy

Sorry little addendum, it would be very useful to be able to select nodes by range, and similarly, useful to be able to select a range of elements (quad, tri, etc) by normal, or maybe even both, select element by normal and with z range

Try this from the command line

draw node with z_coord > 0 and z_coord < 5

You can use any type, x_coord and y_coord are also allowed. You can use this syntax in any command. You can also type this kind of filter into the widgets in the GUI that are expecting a given type.

For more information on these types of operations see the Extended Selection section of the documentation.
https://coreform.com/cubit_help/cubithelp.htm#t=environment_control%2Fentity_selection_and_filtering%2Fextended_entity_specification.htm

Oh thanks thats great! I’ll give that a go, do you have any advice regarding accessing the fields from the exodus file?

Out of curiosity, do you have any suggestions regarding my first question, how to access the field data from the exodus file that trelis seems to know about?

We don’t expose any API for accessing the field data from Exodus. We use the Exodus API internally to assign sizing functions based on field values, but none of the access is exposed through the Cubit API.

@makeclean, you could use the exodus.py from the SEACAS project (which is the open-source project that “owns” Exodus).

SEACAS project: https://github.com/gsjaardema/seacas
exodus.py: https://github.com/gsjaardema/seacas/blob/master/packages/seacas/scripts/exodus3.in.py
exodus.py documentation: If you build the SEACAS library you can find the documentation here: ./docs/exodus.html

I think you have to build SEACAS for the exodus3.in.py to get turned into exodus.py and to be usable, but you might be able to use it as is. You could then import that module into your Cubit session.