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.
@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.
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.
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
@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).
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?
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:
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.
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?
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.