Mesh Extrusion and Mirroring¶
In nek5000/tools
, there is a code n2to3.f
that can be compiled with your
local fortran compiler (preferably not g77).
By running this code, you can extend two dimensional domains to
three dimensional ones with a user-specified number of levels in the
\(z\)-direction. Such a mesh can then be modified using the mesh modification
approach. Assuming you have a valid two-dimensional mesh, n2to3
is straightforward
to run. Below is a typical session, upon typing n2to3
the user is prompted at the command line
Input old (source) file name:
h2e
Input new (output) file name:
h3e
input number of levels: (1, 2, 3,... etc.?):
16
input z min:
0
input z max:
16
input gain (0=custom,1=uniform,other=geometric spacing):
1
This is for CEM: yes or no:
n
Enter Z (5) boundary condition (P,v,O):
v
Enter Z (6) boundary condition (v,O):
0
this is cbz: v O <---
320 elements written to h3e.rea
FORTRAN STOP
In this context CEM stands for computational electromagnetics, a spin-off of the original Nek5000 code.
The domain in which the fluid flow/heat transfer problem is solved consists of two distinct subdomains. The first subdomain is that part of the region occupied by fluid, denoted \(\Omega_f\), while the second subdomain is that part of the region occupied by a solid, denoted \(\Omega_s\). These two subdomains are depicted in Fig. 31. The entire domain is denoted as \(D=\Omega_f \cup \Omega_s\). The fluid problem is solved in the domain \(\Omega_f\), while the temperature in the energy equation is solved in the entire domain; the passive scalars can be solved in either the fluid or the entire domain.
We denote the entire boundary of \(\Omega_f\) as \(\partial \Omega_f\), that part of the boundary of \(\Omega_f\) which is not shared by \(\Omega_s\) as \(\overline{\partial \Omega_f}\), and that part of the boundary of \(\Omega_f\) which is shared by \(\Omega_s\). In addition, \(\partial \Omega_{s}, \overline{\partial \Omega_s}\) are analogously defined. These distinct portions of the domain boundary are illustrated in Fig. 31. The restrictions on the domain for Nek5000 are itemized below.
- The domain \(\Omega=\Omega_f \cup \Omega_s\) must correspond either to a planar (Cartesian) two-dimensional geometry, or to the cross-section of an axisymmetric region specified by revolution of the cross-section about a specified axis, or by a (Cartesian) three-dimensional geometry.
- For two-dimensional and axisymmetric geometries, the boundaries of both subdomains, \(\partial \Omega_f\) and \(\partial \Omega_s\), must be representable as (or at least approximated by) the union of straight line segments, splines, or circular arcs.
- Nek5000 can interpret a two-dimensional image as either a planar Cartesian geometry, or the cross-section of an axisymmetric body. In the case of the latter, it is assumed that the \(y\)-direction is the radial direction, that is, the axis of revolution is at \(y=0\). Although an axisymmetric geometry is, in fact, three-dimensional, Nek5000 can assume that the field variables are also axisymmetric ( that is, do not depend on azimuth, but only \(y\), that is, radius, \(x\), and \(t\) ), thus reducing the relevant equations to “two-dimensional” form.
Fully general three-dimensional meshes generated by other softwares packages can be input to preNek as imported meshes.