| 1 |
# Creating nonconformal interface mesh for Exodus files |
| 2 |
|
| 3 |
This document describes how to create the nonconformal interface mesh |
| 4 |
for meshes stored in Exodus files. |
| 5 |
|
| 6 |
The overall procedure is |
| 7 |
1. Create nonconforming volume mesh in mesh generator of your choice |
| 8 |
2. Create sidesets for both sides of the nonconformal interface |
| 9 |
* Remember the names of the sideset for future step |
| 10 |
3. Export mesh in Exodus format |
| 11 |
* Ensure there are no mesh vertices in common between the two sides |
| 12 |
of the interface. |
| 13 |
4. Pass the name of the Exodus file, the names of corresponding sidesets |
| 14 |
(from Step 2), and the filenames the output will be written to to |
| 15 |
the executable `nc_generator` |
| 16 |
|
| 17 |
Details for each step are given below. |
| 18 |
|
| 19 |
The usage of `nc_generator` is: |
| 20 |
|
| 21 |
``` |
| 22 |
nc_generator input_fname sideset_names output_fname output_fname2 |
| 23 |
``` |
| 24 |
|
| 25 |
The `sideset_names` is a list of pairs of sideset names. The |
| 26 |
pairs are separated by semicolons, and the two names within each |
| 27 |
pair are separated by a colon. Leading and trailing whitespace is |
| 28 |
removed from the sideset names (to allow for more readable formatting). |
| 29 |
|
| 30 |
The process of computing the nonconformal interface may modify the |
| 31 |
coordinates of the nodes in the sideset (to ensures the boundaries of |
| 32 |
the two sidesets are coincident everywhere). |
| 33 |
`output_fname` is the name of the file the input mesh will be written |
| 34 |
to, with updated coordinates. |
| 35 |
`output_fname2` is the name of a new Exodus file that contains only the |
| 36 |
nonconformal interface mesh and the information relating it to the |
| 37 |
sidesets in `output_fname`. |
| 38 |
|
| 39 |
Examples: |
| 40 |
``` |
| 41 |
nc_generator input.exo foo:bar output.exo output_surface.exo |
| 42 |
``` |
| 43 |
will create a nonconformal interface between sidesets `foo` and `bar`. |
| 44 |
`output.exo` contains the same mesh as `input.exo` with updated |
| 45 |
coordinates`. The nonconformal interface mesh is in `output_surface.exo` |
| 46 |
|
| 47 |
``` |
| 48 |
nc_generator input.exo "foo : bar" output.exo output_surface.exo |
| 49 |
``` |
| 50 |
|
| 51 |
is equivalent (the whitespace will be removed). |
| 52 |
|
| 53 |
To specify more than one sideset |
| 54 |
|
| 55 |
``` |
| 56 |
nc_generator input.exo foo:bar;abc:def output.exo output_surface.exo |
| 57 |
``` |
| 58 |
|
| 59 |
will generate nonconformal interfaces between sidesets `foo` and `bar`, |
| 60 |
as well as between `abc` and `def`. |
| 61 |
An equivalent (but more readable) invocation is |
| 62 |
|
| 63 |
``` |
| 64 |
nc_generator input.exo foo:bar ; abc:def output.exo output_surface.exo |
| 65 |
``` |
| 66 |
|
| 67 |
`nc_generator` will throw an error if the sidesets do not exist. |
| 68 |
It does *not* verify that the nodes on sideset pairs lie the same surface |
| 69 |
(because this is very difficult to do for arbitrary geometries). |
| 70 |
It is recommended that the user visualize the `output.exo` in a |
| 71 |
visualization program (ex. Paraview) and verify the newly created |
| 72 |
interface mesh is located where they expect it do be (see below for |
| 73 |
the name of the interface mesh). |
| 74 |
|
| 75 |
|
| 76 |
## Steps 1 and 2 |
| 77 |
|
| 78 |
At the end of this step, you should have a mesh with at least two |
| 79 |
blocks and one pair of coincident faces |
| 80 |
(one face of the first block should be |
| 81 |
coincident with one face of the second block). We will assume the |
| 82 |
meshes on the coincident faces are nonconformal for generality, |
| 83 |
(although this is not required, this package has been tested and |
| 84 |
works on conformal meshes). |
| 85 |
|
| 86 |
There are (at least) two ways to get CAD-based mesh generators to |
| 87 |
generate nonconformal meshes: |
| 88 |
1. Create nonconformal geometry |
| 89 |
2. Create two geometries, mesh them independently, and combine the |
| 90 |
results (for example, using the `ejoin` program from SEACAS) |
| 91 |
|
| 92 |
Option 1 is CAD program specific. In Solidworks, this can be |
| 93 |
done by creating two Extrusion features and unchecking the "Merge Result" |
| 94 |
option for the second one. This will create two separate volume object |
| 95 |
in the CAD file, which the mesher can then mesh independently. |
| 96 |
|
| 97 |
Option 2 can be accomplished by creating two separate CAD models with |
| 98 |
coincident faces, or by creating a single CAD model and exporting |
| 99 |
some of the entities to one file and the remaining entities to another, |
| 100 |
if the CAD software supports this. |
| 101 |
|
| 102 |
Note that Option 1 is more general than Option 2 for the following |
| 103 |
reason: Option 2 requires the nonconformal interface to partition |
| 104 |
the geometry (ie. each geometric entity must exist on exactly one |
| 105 |
of the CAD models), otherwise the combined mesh will have overlapping |
| 106 |
volume meshes. This can be worked around by disabling meshing of |
| 107 |
certain volumes in either of the CAD models, but this may create |
| 108 |
additional nonconformal faces. |
| 109 |
|
| 110 |
In either case, you must create two sidesets for each nonconformal |
| 111 |
faces, one for each side of the face. You must also remember the |
| 112 |
names given to the sidesets. While it might be more convenient to |
| 113 |
refer to sidesets by number rather than name, some mesh generators |
| 114 |
(Pointwise) do not output sidesets any recognizable order, so it |
| 115 |
is impossible to know what the sidesets numbers in the exported |
| 116 |
Exodus file will be. |
| 117 |
|
| 118 |
## Step 3 |
| 119 |
|
| 120 |
When exporting the mesh to an Exodus file, there is one important |
| 121 |
criteria that must be satisifed: there can be no mesh vertices |
| 122 |
in common between the faces on the nonconformal interface. |
| 123 |
This can occur with Option 1 (above) if the CAD geometry uses the |
| 124 |
same geometric vertices as part of both volumes (ie. the CAD model |
| 125 |
is non-manifold and two geometric faces are created with the same |
| 126 |
geometric vertices). |
| 127 |
|
| 128 |
One solution to this problem is to export |
| 129 |
the volume meshes to two separate files and then use `ejoin` |
| 130 |
to combine them into one file. In Pointwise, you can select |
| 131 |
Blocks in List View and then do the usual `File -> Export CAE` and |
| 132 |
it will export only the selected blocks. |
| 133 |
|
| 134 |
# Step 4 |
| 135 |
|
| 136 |
This is the step where the nonconformal interface mesh is created. |
| 137 |
The information required is: |
| 138 |
|
| 139 |
* The name of the input Exodus file |
| 140 |
* For each nonconformal interface, a pair of names that identify the two sideset created in Step 2 |
| 141 |
* A filename to write the updated version of the input Exodus file to |
| 142 |
* A filename to write a new Exodus file to (containing the nonconformal interface mesh) |
| 143 |
|
| 144 |
|
| 145 |
The second output mesh will contain one new volume block for each nonconformal |
| 146 |
interface, as well as global attributes giving the names of the sidesets |
| 147 |
on the first output mesh that form the interface. The attribute names are |
| 148 |
|
| 149 |
``` |
| 150 |
ci7Hl3_interface$i_sideset_names |
| 151 |
``` |
| 152 |
|
| 153 |
where `$i` goes from 0 to the number of sideset pairs minus 1. The values |
| 154 |
are |
| 155 |
|
| 156 |
``` |
| 157 |
$name1\t$name2 |
| 158 |
``` |
| 159 |
|
| 160 |
where `$name1` is the name of the first sideset in the pair and `$name2` |
| 161 |
is the name of the second sideset in the pair. Note that the number of |
| 162 |
sideset pairs is equal to the number of blocks in the file. |
| 163 |
|
| 164 |
|
| 165 |
The block name will be computed as: |
| 166 |
|
| 167 |
``` |
| 168 |
ci7Hl3_nonconformal_interface_$name1_and_$name2 |
| 169 |
``` |
| 170 |
|
| 171 |
The part topology with `SHELL_TRI3`, |
| 172 |
and will contain a unique set of nodes (ie. the nodes are not shared |
| 173 |
with the volumes block associated with the sidesets). |
| 174 |
Currently, the mesh is not fully connected, in that there is one set of |
| 175 |
nodes and elements for each face on the first sideset. The adjacent |
| 176 |
face on the first sideset has a different set of nodes and elements |
| 177 |
(some of the nodes are coincident with the ones on adjacent faces). |
| 178 |
|
| 179 |
The newly created blocks have an `Attribute` field defined on the elements, which |
| 180 |
specifies the faces on the left and right sidesets that each shell |
| 181 |
element is contained in. The name of the field is |
| 182 |
|
| 183 |
``` |
| 184 |
ci7Hl3_nonconformal_interface_gid_field |
| 185 |
``` |
| 186 |
|
| 187 |
There are 4 values per element, and they are: |
| 188 |
|
| 189 |
`sideset 1 element GID, sideset 1 face ordinal, sideset 2 element GID, |
| 190 |
sideset 2 face ordinal`. |
| 191 |
|
| 192 |
These values can be used to match with the Exodus sideset information |
| 193 |
in the first output mesh, |
| 194 |
(which IOSS stores in the `element_side` field on each `SideBlock`. |
| 195 |
Currently the values are stored as `double`s, because IOSS does not support |
| 196 |
integer-valued `Attribute` fields. This may change when IOSS support |
| 197 |
improves. |
| 198 |
|
| 199 |
Note that all names associated with the nonconformal interface have the |
| 200 |
prefix `ci7Hl3`, which was generated randomly. The intention is that |
| 201 |
this will prevent name collisions with other blocks and fields, and also |
| 202 |
provide an easy means of filtering blocks when they are loaded by the |
| 203 |
solver. |