Using Exodus sizing function with Trelis 17.1 or later

Hi, I have been using user-defined sizing function information in Cubit/Trelis for several years; however, beginning with Trelis 17.1 this no longer seems to work. I am wondering whether this is a bug or if I should be using a different method for adding the sizing function information to an existing mesh. I had previously used simple Python scripts make use of netCDF4 and numpy. Things still seem to work as expected in Trelis 17.0, but when I try the same methods in Trelis 17.1 I get a segmentation fault. I have put together a simple example that demonstrates the issue, including a README that explains how to run the example. I would appreciate any information on how to solve this problem.

Thanks,
Charles
sizing-test.tar.gz (2.0 KB)

Charles, we are taking a look at this.

One of the engineers asked: Is he installing numpy and netcdf into python? Is he using the python that we install with Cubit?

@charlesw – Python made some changes with how it installed modules via pip – I believe this occurred between our 17.0 and 17.1 releases. You might try our updated instructions from this forum post (specifically, see my comment)
Adding NumPy and other extra Python modules to Trelis

Hi, I am using the system-installed Python and packages (Fedora 30), completely external to Trelis. Actually, when I tried Python 2, I may have had to install my own netCDF4 (probably using pip), but for Python 3 I was using the system versions. I am not at the Linux machine right now, but I can send you the versions later.

Thanks,
Charles

To follow up on my previous information, I have tried this with both Python 2.7.18 and Python 3.7.7. With Python 2.7.18 I am using:
numpy 1.16.4 (system installed)
netCDF4 1.5.3 (locally installed using pip)

With Python 3.7.7 I am using:
numpy 1.16.4 (system installed)
netCDF4 1.3.1 (system installed)

Thanks for your help, and please let me know if you need additional information.

Thanks,
Charles

Hi Charles,

We test multiple variations on exodus sizing functions nightly. I am not clear yet on what is different between your case and the examples in our test suite. I am digging into this.

Here are a couple of simple examples from our test suite. I ran these examples with Coreform 2020.2. I would expect no differences with Trelis 17.1 based on the passing tests. As you note in your journal file the large exodus format is on by default in Cubit. These examples should be using the large format.

I am not an expert Paraview user. What filters do you set to visualize the sizing functions?

Example with surface tris

reset
#{model = "tapered_bar.3.e"}
import mesh geometry 'tapered_bar.3.e' block all use nodeset sideset feature_angle 135.00 linear deformed time 2.400  merge
delete mesh vol all propagate

import sizing function 'tapered_bar.3.e' block all variable 'eqps' time 2.400 
vol all sizing function type exodus min_size 0.0001 max_size 0.0005 inverse_map

surf all scheme trimesh
mesh surf all

image

Simple hex mesh

reset

import mesh geom 'hex-field.e'
del mesh
import sizing function 'hex-field.e' block all variable "Elevation"

surface 2 sizing function exodus min_size .005 max_size .1
surface 2 scheme pave
mesh surface 2
volume 1 scheme sweep source surface 2 target surface 6
mesh vol 1

image

Thanks,
Karl

@karl – it appears that the sizing function is being written as a field (nodal) variable directly into the Exodus files. In ParaView (see below) you’ll need to make sure to check the box next to the cell_size variable (middle left), then select the colormap to use cell_size (top middle).

@charlesw – it appears that the cell-size is being set to (almost) zero. I would bet that this might be the reason why Cubit is seg-faulting.

If you look at the actual values of the sizing function they are not zero, but Paraview is interpreting them that way. I am now wondering if it’s how I’m putting the sizing information into the Exodus file. Do you know if anything changed in Exodus file format?

Thanks,
Charles

It appears that there is some difference between the file formats for Trelis 17.0 and 17.1, as well as between the small Exodus and large Exodus formats. So far, the only one that I can visualize properly (that will show the field data correctly) in Paraview is the 17.0 small Exodus format. Here is what ncdump -k tells me:

ncdump -k trelis-17.0/mesh_nosizing_small_exodus.exo
classic

ncdump -k trelis-17.0/mesh_nosizing_large_exodus.exo
64-bit offset

ncdump -k trelis-17.1/mesh_nosizing_small_exodus.exo
64-bit offset

ncdump -k trelis-17.1/mesh_nosizing_large_exodus.exo
64-bit offset

Do you have a sample Exodus file containing field data I could look at? That might tell me what the important difference is.

Thanks,
Charles

A further followup from what I posted above. In addition to Paraview not reading the field data correctly, it appears that Trelis is also unable to read it, except for the case of the small Exodus file (classic) produced using Trelis 17.0 (both 17.0 and 17.1 can read this file). There seems to be a difference in how nodal variables are defined between the classic and 64-bit offset files. I’m not sure yet what this difference might be.

Thanks,
Charles

Did you get the file I sent you via Jira? The forum wouldn’t let me upload it. I know that someone on our side has to validate the reply out of Jira.

Thanks,
Karl

No. I’ve never used Jira before. Is it something I would need to install?

Thanks,
Charles

p.s. I haven’t had a chance to look at this issue for the last few days, but I’m hoping to have a chance before Christmas.

You should just get an email. I requested that the email be approved.

I haven’t received it yet, but I’ll keep an eye out for it.

Thanks,
Charles

Hi Karl,

I have been out of the office for a while and I would still like to get this resolved. Can you provide me with a small sample file (containing field data) that works correctly?

Thanks,
Charles

Hi Charles,

Would you email me karl@coreform.com and I will send you some files with the exodus sizing that we are using in our tests.

Thanks,
Karl

Hi Karl,

Did my e-mail request go through? I sent it on January 13 (New Zealand time). If not, let me know and I’ll send it again.

Thanks,
Charles

Charles,

Did you send the email to support@coreform.com? I do not see any submitted tickets associated with you.

– Greg

Hi Greg,
I had previously sent the e-mail to Karl, but I have now sent it to support@coreform.com. Thanks for your help, and let me know if you need any more info.

Thanks,
Charles

Hi Greg and Karl,
Did you get my e-mail to support@coreform.com last week? If I have a sample file I hope I can resolve my issue.
Thanks,
Charles