You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix description of the gridded bathymetry data format in docs (#134)
* fix description of the gridded bathymetry data format
* Modify Docs about 2D topography sizing
Made a note in the section on refinement regions that automatic sizing can be done with a topography included and created a link. Modified the sizing discussion in the 3D meshing section to say that it can be sued to size 2D meshes.
* Add tl;dr
Added a section to the beginning of the index and the introduction that outlines what can be done with HOHQMesh. [These are the same. Should find out how to "include" a file in markdown to have just one copy]
* Update introduction.md
Fix a typo
* Update README.md
Add the tl;dr to the front page, too.
* Update README.md
Fix links
* Update the-model.md
Fix a formatting error
* Update introduction.md
Fix file names.
* Restructure model definition
Move and add model blocks used in the 3D meshing to the description of the model.
* More doc edits
Make changes sugersted by Andrew, plus a few more, including formatting changes.
---------
Co-authored-by: David Kopriva <[email protected]>
Co-authored-by: DavidAKopriva <[email protected]>
Copy file name to clipboardExpand all lines: Documentation/docs/introduction.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,30 @@
1
+
2
+
# TL;DR. What you can do with HOHQMesh<aname="WhatToDo"></a>
3
+
4
+
To use HOHQMesh to generate all-quadrilateral meshes with arbitrary order boundary elements you use a [control file](the-controlfile.md) to
5
+
6
+
- Define a [`MODEL`](the-model.md#TheModel) consisting of
7
+
- An optional closed outer [boundary curve](the-model.md#Boundaries) made up of one or a chain of curved segments defined by primitives like straight [line segments](the-model.md#EndPointsLine), [circular arcs](the-model.md#CircularArc), [elliptic arcs](the-model.md#ParametricEqn), [splines](the-model.md#Spline), or [equations](the-model.md#ParametricEqn)
8
+
- Zero or more closed inner boundary curves defined in the same way
9
+
- Zero or more internal boundary curves that define boundaries for multiple material applications
10
+
- An optional bottom [topography](three-dimensional-hexahedral-meshes.md#Topography) defined either in functional form or from a file to use to [refine](three-dimensional-hexahedral-meshes.md#SizingTopography) a 2D mesh around bottom features. (For example for shallow water equation computations.)
11
+
12
+
- Tell it how to mesh the model with a [`CONTROL_INPUT`](the-control-input.md) section to control the meshing process by
13
+
- Setting [run parameters](the-control-input.md#RunParameters) that specify where to write the results, specify the mesh and plot file formats and the polynomial order of the boundary curves
14
+
- Setting a [background grid](the-control-input.md#BackgroundGrid) size to specify the largest element size desired
15
+
- Setting how the mesh should be [smoothed](the-control-input.md#Smoother)
16
+
- Defining optional [refinement regions](the-control-input.md#RefinementRegions) to allow manual refinement of the mesh to emphasize specific regions not indicated by the boundary curves or topography.
17
+
18
+
HOHQMesh will automatically generate a mesh with curved elements sized according to the geometry, like the curvature of the boundary curves and bottom topography, and the distance between boundary curves. It will generate a mesh that is symmetric about a symmetry line if segments of the outer boundary are defined as [symmetry boundaries](the-model.md#Symmetry).
19
+
20
+
Additionally, you can generate an all [hexahedral](three-dimensional-hexahedral-meshes) mesh by extruding a quadrilateral mesh by
21
+
22
+
-[Simple extrusion](three-dimensional-hexahedral-meshes.md#Extrusion) along a coordinate direction
23
+
-[Simple rotation](three-dimensional-hexahedral-meshes.md#Rotation) about an axis
24
+
-[Sweeping](three-dimensional-hexahedral-meshes.md#Sweeping) a quadrilateral mesh along a curve and optionally [scaling](three-dimensional-hexahedral-meshes.md#Scaling) the width along the way
25
+
26
+
One can have the bottom of a hexahedral mesh follow a prescribed [topography](three-dimensional-hexahedral-meshes.md#Topography) defined in functional form or from data. A 3D mesh can also be [sized](three-dimensional-hexahedral-meshes.md#SizingTopography) according to the curvature of the bottom topography.
27
+
1
28
# Introduction
2
29
3
30
Multidomain spectral methods, of which spectral element methods (SEMs) are a subclass, were introduced by Patera (for elliptic and parabolic equations) and by Kopriva (for hyperbolic systems) to increase the efficiency of spectral methods and to apply them to complex geometries. Although somewhat controversial at the time -- questions were raised whether it was wise to not use the highest order polynomial possible for a given number of degrees of freedom -- the methods have become so commonly used within the community that the updated book by Canuto et al. is subtitled “Fundamentals in Single Domains.”
<palign = "center"> Fig. 19. Two refinement centers and a refinement line</p>
75
75
76
+
Mesh sizing is done automatically according to the curvature of boundary curves and the curvature of a bottom topography that can be supplied. See the section on [topography](the-model.md#SizingTopography) for more information on the latter.
77
+
76
78
Manual scaling of the mesh size can be performed by including any combination of
77
79
78
80
* Refinement Centers
@@ -127,7 +129,7 @@ Refinement regions are defined within a `REFINEMENT_REGIONS` block, e.g.
127
129
128
130
The ordering of the blocks within the `REFINEMENT_REGIONS` block is arbitrary.
129
131
130
-
###Base Material Definition<aname="BaseMaterialDefinition"></a>
132
+
## Base Material Definition<aname="BaseMaterialDefinition"></a>
131
133
132
134
If the ISM-MM mesh file format is requested to produce multiple material meshes, the material name for a given region is given by the name of the curve bounding it, except for the outermost region. For the outermost region it is necessary to set the background material name in a `MATERIALS` block, e.g.
The two dimensional domain to be meshed can be bounded by at most one exterior boundary curve (which can be composed of a chain of curves), as in 15(a) and 15(b), above, and any number of interior boundary curves that either create holes or interfaces along which element edges are forced to lie. For purely external problems, a rectangular outer boundary can be implicitly included, as shown in 15(c).
8
11
9
12
If no model block is included at all, then a purely Cartesian mesh will be created using parameters set in the control file.
@@ -13,11 +16,15 @@ As an example, the model in Fig. 16 has one outer boundary - the outer triangle
<palign = "center"> Fig. 16. A mesh whose model uses all curve types. Three `END_POINTS_LINE`s for the outer triangle. A `SPLINE_CURVE` for the free-form inner boundary, circles defined by a `PARAMETRIC_EQUATION_CURVE` and by a `CIRCULAR_ARC` curve, and an ellipse defined by an `ELLIPTIC_ARC` curve. (<em>Examples/2D/AllFeatures</em>).</p>
15
18
19
+
### Internal Boundaries<aname="Interfaces"></a>
20
+
16
21
It is also possible to include interface boundaries whose interiors are also meshed. This allows one to force element boundaries along curves and to assign different material properties to each region bounded by them. The property is named by the innermost boundary in which an element lies. An example of a domain with two interface boundaries is shown in Fig. 17. **Right now, interface curves must be defined in the model definition from outer to inner to properly assign material names**. Thus, the innermost circle in Fig. 17 is defined after its enclosing circle. This restriction can be removed by adding code to test whether a given curve lies within another.
<palign = "center"> Fig. 17. Mesh with interior interfaces bounded by circles.</p>
20
25
26
+
### Symmetric Meshes<aname="Symmetry"></a>
27
+
21
28
The mesh generator generates unstructured meshes, and there is no reason in general why a mesh must be symmetric if the model is symmetric. Since symmetry can be a desirable feature, HOHQMesh allows one to define a symmetry boundary about which the mesh will be symmetric by setting boundary names as ":symmetry" (with a colon, so as not to interfere with some other use of the name). The symmetry boundary must be a straight line (no matter how that is defined, see below) and multiple symmetry boundaries must be co-linear. What HOHQMesh does is take a model and mesh it. Then, if one or more of the outer boundary curves are named ":symmetry", that mesh will be reflected about the symmetry line and the result will be a perfectly symmetric mesh, to within rounding error. An example is shown in Fig. 18. If the curve designated as ":symmetry" is not straight, or if any of multiple lines so designated are not co-linear, then an error is posted and the mesh will not be reflected.
@@ -188,6 +195,79 @@ block. Any number of curves can be chained together. The chain itself is also gi
188
195
189
196
Again, the indentation is for readability only, as is the line spacing between the blocks. (Blank lines and lines starting with “%” are ignored.) Also remember that the chain is defined counter-clockwise, and the curves within the chain must be ordered and oriented properly. Chains cannot be chained together. Rem: The use of `PARAMETRIC_EQUATION_CURVE`s in this example predates the addition of the `END_POINTS_LINE` curves, which would be simpler to use here.
190
197
198
+
## Bottom Topography
199
+
200
+
A bottom topography can also be added to the model. The most obvious use is when generating three dimensional meshes, where the bottom follows a given profile. But topography can also be used to size the mesh, which is useful for the solution of two-dimensional shallow water flows.
201
+
202
+
A bottom topography can be defined in one of two ways:
203
+
204
+
* By supplying a functional form, f(x,y)
205
+
* By supplying gridded data in a file
206
+
207
+
### Topography from a Functional Form
208
+
The simplest way to define the bottom topography is with an equation in a `TOPOGRAPHY` block, e.g.,
209
+
210
+
\begin{TOPOGRAPHY}
211
+
eqn = h(x,y) = x^2 + y^2
212
+
sizing = ON \or\ OFF (Optional)
213
+
\end{TOPOGRAPHY}
214
+
215
+
The height function takes two arguments, which are the physical x-y coordinates, unlike the parametric coordinates that define boundary curves. The `sizing` key is optional, with the default being `OFF`.
216
+
217
+
### Topography from Data
218
+
219
+
Alternatively, the bottom topography data can be read in from a file, e.g.,
220
+
221
+
\begin{TOPOGRAPHY}
222
+
data file = path/to/bottom_data.txt
223
+
sizing = ON \or\ OFF (Optional)
224
+
\end{TOPOGRAPHY}
225
+
226
+
The `sizing` key is optional, with the default being `OFF`.
227
+
228
+
From this data, a bicubic interpolation is used to compute the bottom topography information.
229
+
Currently this strategy of bottom topography extrusion relies on *gridded data*. The data file is assumed to come as separate lists of the x coordinate points, with length $n$, the
230
+
y coordinate points, with length $m$, and the z coordinate points where the grid data is ordered slice-by-slice in the y direction, with size $m \times n$. Below a small example is provided to clarify the
231
+
data file format
232
+
233
+
! Header with the number of points in the x and y direction
234
+
75 50
235
+
! x node values
236
+
x1
237
+
...
238
+
x75
239
+
! y node values
240
+
y1
241
+
...
242
+
y50
243
+
! z node values
244
+
z1,1
245
+
z2,1
246
+
...
247
+
z50,1
248
+
z1,2
249
+
...
250
+
z50,2
251
+
...
252
+
z1,75
253
+
...
254
+
z50,75
255
+
256
+
### Sizing the Mesh with Bottom Topography<aname="SizingTopography"></a>
257
+
258
+
When
259
+
260
+
sizing = ON
261
+
262
+
in a TOPOGRAPHY block, e.g.
263
+
264
+
\begin{TOPOGRAPHY}
265
+
eqn = h(x,y) = x^2 + y^2
266
+
sizing = ON
267
+
\end{TOPOGRAPHY}
268
+
269
+
a two-dimensional mesh is sized according to the curvature of the topography, but does not change the z values of the mesh. For an example, see the top portion of [Fig. 26](three-dimensional-hexahedral-meshes.md#SizingTopography).
270
+
191
271
## The Model Definition<aname="TheModel"></a>
192
272
The model (there is at most one) defines the region that is to be meshed. It is marked by
193
273
@@ -221,7 +301,27 @@ Interior interface boundary curves are defined inside the `INTERFACE_BOUNDARIES`
221
301
222
302
Interface boundaries, unlike interior boundaries, do not create holes in model domain or the mesh. _Interface boundaries that are contained (embedded) in other interface boundaries must be defined within the block in order from outer to inner to properly define the material names_. The ordering of interface boundaries that are not embedded in another is not important. (Additions to HOHQMesh to remove this restriction will require code to determine whether or not a given curve is embedded within another, and has not yet been implemented. HOHQMesh essentially uses a painters algorithm to specify the material names.) If interface curves are not being used to delineate material boundaries (i.e. for mesh alignment alone and not with the ISM-MM mesh file format), then the ordering is unimportant.
223
303
224
-
###Example
304
+
Bottom topography, if any, is defined in the `MODEL` inside a `TOPOGRAPHY` block, for either 2D (for sizing purposes) or 3D (to vary the bottom elevation) meshes,
305
+
306
+
\begin{TOPOGRAPHY}
307
+
...
308
+
\end{TOPOGRAPHY}
309
+
310
+
Two types of blocks are relevant only to three-dimensional meshes. They are the
311
+
312
+
\begin{SWEEP_CURVE}
313
+
...
314
+
\end{SWEEP_CURVE}
315
+
316
+
which defines the curve along which a 3D sweep is made. The second is a scale factor
317
+
318
+
\begin{SWEEP_SCALE_FACTOR}
319
+
...
320
+
\end{SWEEP_SCALE_FACTOR}
321
+
322
+
which allows the size of the mesh to vary along a sweep curve. Details on what these blocks do can be found in the [3D Meshing](three-dimensional-hexahedral-meshes.md) section.
323
+
324
+
### Example
225
325
226
326
As an example, the following defines a model that has a single circular outer boundary and three inner circular boundaries. Two of the curves are defined within a CHAIN (even though there is only a single curve within each). One of them is standalone. Note that *between* the blocks, comments can be inserted starting with “%”. As usual, indentation is for the reader’s eyes only.
227
327
Rem: This example also predates the addition of the `CIRCULAR_ARC` curve definition, which could be used to define the circles instead.
Copy file name to clipboardExpand all lines: Documentation/docs/three-dimensional-hexahedral-meshes.md
+10-52Lines changed: 10 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Three Dimensional Hexahedral Meshes
2
-
HOHQMesh can also generate 3D hexahedral meshes by extruding or sweeping a two dimensional mesh. Topography can also be added to the bottom of the domain either through a functional form or from data supplied through a file. Finally, when bottom topography is present, the mesh along the bottom can be sized according to the bottom curvature.
2
+
HOHQMesh can also generate 3D hexahedral meshes by extruding or sweeping a two dimensional mesh. Topography can also be added to the bottom of the domain either through a functional form or from data supplied through a file. Finally, when bottom topography is present, the mesh along the bottom can be sized according to the bottom curvature for either 2D or 3D meshes.
3
3
4
4
To tell the mesher that you want a hex mesh, you add an algorithm block to the `CONTROL_INPUT` block for how the 3D extrusion will be done. Currently there are three:
5
5
@@ -101,52 +101,12 @@ The equation for the scaling is scalar `PARAMETRIC_EQUATION` (as opposed to a `P
<palign = "center"> Fig. 24. Simple Extrusion of a semi-circular mesh with bottom topography</p>
103
103
104
-
When using the `SIMPLE_EXTRUSION` algorithm, bottom topography can be defined in one of two ways:
104
+
The bottom of a three dimensional mesh can vary in height according to a bottom topography. One defines the topography in the [`MODEL`](the-model.md) block in one of two ways:
105
105
106
106
* By supplying a functional form, f(x,y)
107
107
* By supplying gridded data in a file
108
108
109
-
### Topography from a Functional Form
110
-
The simplest way to define the bottom topography is with an equation in a `TOPOGRAPHY` block, e.g.,
111
-
112
-
\begin{TOPOGRAPHY}
113
-
eqn = h(x,y) = x^2 + y^2
114
-
\end{TOPOGRAPHY}
115
-
116
-
The height function takes two arguments, which are the physical x-y coordinates, unlike the parametric coordinates that define boundary curves. Fig. 24 above shows an example of such a bottom topography.
117
-
118
-
### Topography from Data
119
-
Alternatively, the bottom topography data can be read in from a file, e.g.,
120
-
121
-
\begin{TOPOGRAPHY}
122
-
data file = path/to/bottom_data.txt
123
-
\end{TOPOGRAPHY}
124
-
125
-
From this data a bicubic interpolation is used to compute the bottom topography information.
126
-
Currently this strategy of bottom topography extrusion relies on gridded data. The data file is assumed to come as separate lists of the x coordinate points, the
127
-
y coordinate points, and the z coordinate points where the grid data is ordered slice-by-slice in the y direction. Below a small example is provided to clarify the
128
-
data file format
129
-
130
-
! Header with the number of points in the x and y direction
131
-
75 50
132
-
! x node values
133
-
x1
134
-
...
135
-
x75
136
-
! y node values
137
-
y1
138
-
...
139
-
y50
140
-
! z node values
141
-
z1,1
142
-
z2,1
143
-
...
144
-
z75,1
145
-
z1,2
146
-
...
147
-
z75,2
148
-
...
149
-
z75,50
109
+
See the [`MODEL`](the-model.md) section for details. Fig. 24 above shows an example of a bottom topography set with a bottom function, while Figs. 25 and 26 use data to describe Mt. St. Helens.
<palign = "center"> Fig. 26. Simple Extrusion of a semi-circular mesh with a bottom topography and local refinement depending on its curvature</p>
157
117
158
-
Finally, the grid can be sized along the bottom by adding the command
118
+
When
159
119
160
120
sizing = ON
161
121
162
-
to any TOPOGRAPHY block, e.g
122
+
in a TOPOGRAPHY block, e.g.
163
123
164
-
\begin{TOPOGRAPHY}
165
-
data file = path/to/bottom_data.txt
166
-
sizing = ON
167
-
\end{TOPOGRAPHY}
168
-
169
-
It can also be turned `OFF', or the line deleted, to not size the bottom.
124
+
\begin{TOPOGRAPHY}
125
+
eqn = h(x,y) = x^2 + y^2
126
+
sizing = ON
127
+
\end{TOPOGRAPHY}
170
128
171
-
The sizer will then size the grid along the bottom according to the curvature of the topography. An example is shown in Fig. 26.
129
+
the sizer will size the grid along the bottom according to the curvature of the topography for a 3D mesh. An example is shown in Fig. 26. If only a two dimensional mesh is requested, then it is sized according to the curvature, but the z-values of the 2D mesh are not changed, the result looking like the top of Fig. 26.
0 commit comments