HCELL
Fluid Flow in an H-shaped Region
HCELL
is a FORTRAN77 program which
solves the time-dependent Navier Stokes equations in a
two-dimensional region called the "H Cell".
As time increases, other flow parameters may be varied as well.
For this code, the flow parameter that can vary is the magnitude
of the inflow specified at the left boundary.
The program stores the results of each timestep in a file.
Each solution may be thought of as a "snapshot" of the gradual
evolution of the flow field over time.
In a typical run, 500 such files might be created. One set of
such data is stored as
the TCELL flow dataset.
A collection of snapshot files may be analyzed to seek a small
underlying basis of fundamental flows. This basis may be used
to approximate the entire set, or indeed to generate a reduced basis
program that can quickly and cheaply compute new flow solutions
whose flow parameters vary in small ways from those of the original
set. Programs that can be used for such an analysis include
CVT_BASIS and
POD_BASIS.
The "H-Cell" region is an H-shaped region.
+----------------------------+
| : : |
row 3 | (3,1) :(3,2): (3,3) |
| : : |
+--------------+.....+-------+
| |
row 2 empty |(2,2)| empty
| |
+--------------+.....+-------+
| : : |
row 1 | (1,1) :(1,2): (1,3) |
| : : |
+----------------------------+
col 1 col 2 col 3
Usage:
-
hcell
-
runs the program, reading the file "up000.txt" for
the initial values of the horizontal and vertical
velocities, and the pressure, at each node. Output files
include the series "up001.txt", "up002.txt" and so on,
containing flow quantities at successive time steps.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
HCELL is available in
a FORTRAN77 version.
Related Data and Programs:
BUMP,
a FORTRAN90 program which
solves a fluid flow problem
in a channel including a bump which obstructs and redirects the flow.
CVT_BASIS_FLOW,
a FORTRAN90 program which
extracts dominant solution modes from a set of flow solutions
using CVT methods.
HCELL_FLOW_DISPLAY,
a MATLAB program which
can plot the data
produced by HCELL.
HCELL_STEADY,
a FORTRAN77 program which
solves the time-independent
or "steady" Navier Stokes equations in an H-cell region.
INOUT,
a FORTRAN77 program which
solves the Navier Stokes equations in the "In-Out" region.
MHD_CONTROL,
a FORTRAN90 program which
tries to control the evolution of an MHD system so that a particular
state is achieved.
MHD_FLOW,
a FORTRAN90 program which
models the evolution of an MHD system.
NAST2D,
a C++ program which
computes the pressure
and velocity for a Navier Stokes flow.
TCELL
a FORTRAN77 program which
solves the Navier Stokes equations in the T-Cell region.
POD_BASIS_FLOW,
a FORTRAN90 program which
extracts dominant solution modes from a set of flow solutions
using POD methods.
Author:
Hyun-Chun Lee,
Ajou University, Korea,
in collaboration
with Max Gunzburger, Janet Peterson, and John Burkardt.
Reference:
-
Max Gunzburger,
Finite Element Methods for Viscous Incompressible Flows,
A Guide to Theory, Practice, and Algorithms,
Academic Press, 1989,
ISBN: 0-12-307350-2,
LC: TA357.G86.
Source Code:
-
hcell.f, an initial draft of the
program, with no treatment of the boundary conditions.
-
hcell.sh,
commands to compile, link and load the source code.
-
hregion_01.f,
a first complete draft of the program.
-
hregion_02.f,
a second draft which includes setting one reference pressure,
and a correction to the inflow/outflow boundary conditions.
-
hregion_03.f,
draft #3 includes a routine to write velocities to a
TECPLOT file.
-
hregion_03.sh,
commands to compile, link and load the program.
-
hregion_03_output.txt,
printed output from a run of the program.
-
hregion_04.f,
draft #4 included corrections to the UBDRY routine,
which fixed an outlet that wasn't letting out, and
dropped an extra pressure condition that was accidentally
causing problems in the velocity equation in the extreme
upper right node.
-
hregion_04.sh,
commands to compile, link and load the program.
-
hregion_04_output.txt,
printed output from a run of the program.
-
hregion_05.f,
draft #5 implements the refinement scheme by setting
NREFINE as a parameter, and computing all other variables
directly from there.
-
hregion_05.sh,
commands to compile, link and load the program.
Examples and Tests:
-
xy3.txt,
the coordinates of the nodes associated with linear elements;
-
xy6.txt,
the coordinates of the nodes associated with quadratic elements;
-
up000.txt,
a text file containing data to be used as the initial value
of the solution;
-
p100.txt,
a file of pressure information at time step 100, suitable for
plotting with "xy3.txt" and HCELL_CONTOUR_PLOT;
-
uv100.txt,
a file of velocity information at time step 100, suitable for
plotting with "xy6.txt" and HCELL_VECTOR_PLOT;
-
uv100.tec,
a TECPLOT file containing the velocities at time step 100;
There are six sets of inflow and outflow vents in the flow region.
A basis flow profile is specified for each set of vents. However,
for each vent group I, there is also a multiplier BETA(I)
which can be used to modulate the flow strength. To perform
parameter studies, it was decided to consider datasets, each of
which contained seven different settings for all the BETA's.
(Thus, such a dataset contains 42 numbers.) Datasets were generated
in a variety of ways:
-
canon_06_07.txt,
the "canonical basis vectors", plus a vector which is entirely 1;
-
cvt_06_07.txt,
a set generated by
CVT_DATASET;
-
ham_06_07.txt,
a set generated by
HAMMERSLEY_DATASET;
-
lcen_06_07.txt,
a set generated by
LATIN_CENTER_DATASET;
-
lcvt_06_07.txt,
a "latinized CVT" set generated by applying the
LATINIZE program to the CVT_06_07.TXT file;
-
uni_06_07.txt,
a set generated by
UNIFORM_DATASET;
-
uni_06_10.txt,
a set of 10 points, generated by
UNIFORM_DATASET, and using a different seed;
List of Routines:
-
MAIN is the main program for HCELL.
-
CH_IS_DIGIT returns .TRUE. if a character is a decimal digit.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DAXPY adds a multiple of one vector to another.
-
DDOT forms the dot product of two vectors.
-
DGBFA factors a double precision band matrix by elimination.
-
DGBSL solves a double precision band linear system.
-
DGEFA factors a double precision matrix by gaussian elimination.
-
DGESL solves the double precision system
-
DIGIT_INC increments a decimal digit.
-
DIGIT_TO_CH returns the character representation of a decimal digit.
-
DSCAL scales a vector by a constant.
-
ELEMENT_NODE_BANDWIDTH determines the bandwidth associated with the grid.
-
ELEMENT_NODE_WRITE writes the element node list to a file.
-
FILE_NAME_INC generates the next file name in a series.
-
HCELL_DOF_COUNT determines the number of degrees of freedom in the region.
-
HCELL_DOF_SET assigns degrees of freedom to each node.
-
HCELL_ELEMENT_COUNT determines the number of elements in the region.
-
HCELL_ELEMENT_NODE determines the nodes that make up each element.
-
HCELL_NODE_NUM determines the number of nodes in the region.
-
HCELL_NODE_XY assigns coordinates to each node.
-
IDAMAX finds the vector element of largest magnitude.
-
NODE_EPS creates an EPS file containing an image of the nodes.
-
NSTOKE solves the Navier-Stokes equations using Taylor-Hood elements.
-
P_WRITE writes the pressures values for a given timestep to a file.
-
QUAD_A_SET sets quadrature information for the assembly routine.
-
R8_HUGE returns a "huge" double precision number.
-
REFBSP evaluates a linear basis functions on the reference triangle.
-
REFQBF evaluates quadratic basis functions on the reference triangle.
-
SETGRD sets up the grid for the problem.
-
TRANS transforms data between the reference and physical elements.
-
UBDRY evaluates the boundary conditions.
-
UV_READ returns an initial value for the solution coefficient vector.
-
UV_WRITE writes the velocity values for a given timestep to a file.
-
XY3_WRITE writes the coordinates of nodes of 3-node triangles to a file.
-
XY6_WRITE writes the coordinates of nodes of 6-node triangles to a file.
You can go up one level to
the FORTRAN77 source codes.
Last revised on 13 November 2006.