HTX - Manual 68899344
HTX - Manual 68899344
General Information
HTX is a computational tool for 3-D solid conduction heat transfer analysis. HTX uses a
structured finite volume scheme to solve the transient energy conservation equation. HTX is
written in FORTRAN 90. It can operate independently with user-specified boundary conditions,
or it can exchange heat transfer and temperature data with CFD codes such as WIND.
Current Capabilities
CGNS format is used for all data input/output, using calls to the CGNS library subroutines,
except as explained in the next subsection. On the initial run, a single .cgns file contains grid
information. During the computation, temperature field data are written to the same
“casefile.cgns” in both cell-centered format for restarting the calculation, and in cell-vertex
format, which is generally preferred for graphical display.
Exchange of temperature and heat transfer data with another code, along solid/fluid boundaries,
is implemented using the SDI library routines. The Wind-US code has been modified to include
the SDI library for exchanging surface data. The user can specify any of the zone sides (imin,
imax, etc.) for data interchange. Typically the WIND code will read surface temperature data,
and write surface heat transfer data to an “sdifile.” HTX will read these heat transfer data, and
write surface temperature data. The process is iterated until both codes converge to a steady
solution. For specifying variable temperature data along a surface, a separate code may be
supplied to generate the necessary interface information via the SDI library. Each interface is
named and the exchange mode is specified in the Namelist input file.
The initial sdifile, consisting of surface grid and temperature data, is written by HTX. For the
initial HTX run, constant-value approximations to the surface temperatures and heat transfer rate
can be specified. The sdifile must contain a surface’s grid data before its field data can be written.
Boundary conditions
Boundary conditions can be specified for any number of “faces,” or sections of a block side. If
the number of faces is not specified, the default value is one. The following boundary conditions
are operational:
Multiblocking
Currently, any number of zones (blocks) can be read from the casefile.cgns. The blocks can be in
any (i,j,k) orientation with respect to one another. Zone interfacing is contiguous (one-to-one).
The code will run with multiple zones, but as data exchange across “communication” boundaries
is not yet operational, only single block operation is recommended. SDI is hard-coded for zone
number one only.
Material Properties
Material properties are specified in the input file as constant and the same for all zones.
Timestepping
Currently, constant time steps are specified in the input file. Future revisions will include
maximum stable timestepping, and local maximum stable timestepping, in order to speed
convergence of steady-state calculations.
Getting Started
To run HTX, first set up a run directory containing the following files:
To compile HTX use the makefile in the source directory, modified as needed to invoke your
compiler. Type “make,” and then copy htx.exe to your run directory. The source directory must
contain the pre-compiled CGNS and SDI library files libcgns.a and libsdi.a, and the CGNS
header file cgnslib_f.h. The library files in the source distribution will probably not work on your
machine, but will need to be recompiled from their respective sources. To remove all previously
compiled object and module files and start over, type “make clean.”
NAMELIST Input
NAMELIST RUN:
NAMELIST PROPERTIES
NAMELIST BOUND_CONS
lilj, lilk, liuj, liuk Limiting gridlines for each lower I boundary face
ljli, ljlk, ljui, ljuk Limiting gridlines for each lower J boundary face
lkli, lklj, lkui, lkuj Limiting gridlines for each lower K boundary face
uilj, uilk, uiuj, uiuk Limiting gridlines for each upper I boundary face
ujli, ujlk, ujui, ujuk Limiting gridlines for each upper J boundary face
ukli, uklj, ukui, ukuj Limiting gridlines for each upper K boundary face
li_temp Constant temperature for libc=2 for each lower I boundary face
li_q Constant heat flux for libc=4 for each lower I boundary face
ui_temp, ui_q, lj_temp, lj_q, uj_temp, uj_q, lk_temp, lk_q, uk_temp, uk_q Simlarly for other
faces
NAMELIST SDI_IO:
Defaults in parentheses
Choices in brackets
b_zone(1)%ljbc(1)=4,
b_zone(1)%lj_q(1)=0.0,
b_zone(1)%lkbc(1)=3,
b_zone(1)%lk_q(1)=0.0,
b_zone(1)%uibc(1)=3,
b_zone(1)%ui_q(1)=0.0,
b_zone(1)%ujbc(1)=2,
b_zone(1)%ukbc(1)=3,
b_zone(1)%uk_q(1)=0.0,
/
_______________________________________________________________________
On the initial run, casefile.cgns contains grid node coordinates and boundary indices, including
connectivity data for multi-zone calculations. The casefile.cgns can be written using Gridgen.
The SDI (Surface Data Interface) library is used to provide a means to communicate with another
application at a common surface. Each code must refer to the same Interface Name. For HTX this
is the interface(nsdi) character string for each interface nsdi=1,num_sdi and num_sdi is the total
number of interfaces.
Example applications which set a variable temperature and/or heat flux on an interface can be
found in the cases directory under 2DNOZZLE and jpl_slice. For 2DNOZZLE, the specified
temperature and heat flux are specified on the grid nodes, so they can be communicated directly
to the surface. In the program SDI_add_Q_T.f90, the HTX NAMELIST is read to determine the
interface information. For the jpl_slice example, the specified temperature is not on the surface
nodes, so must be interpolated to these nodes before communicating the data via the SDI calls. In
SDI_add_Touter.f90 a separate input file “htx_touter.inp” is called to read a NAMELIST for
setting up the interface data. See the FORTRAN source for an example of how the
communication is accomplished.
The Wind-US code can also communicate with the HTX code by setting the mode to CHT in the
TTSPEC block and specifying the surfaces which will send/receive data from HTX. In the
example below, the interface involves six surfaces and the communication will occur every 10
iterations:
TTSPEC
type temperature
mode CHT
update interval 10
zone 1
surface jmax
zone 2
surface jmax
zone 3
surface jmax
zone 4
surface jmax
zone 5
surface jmax
zone 6
surface jmax
ENDTTSPEC
There is no requirement that the surface nodes be coincident between Wind-US and HTX, so an
interpolation code is required to transfer the data between the two interfaces. For the
interpolation coefficients to be generated, the HTX surface node coordinates must be created
before any communication can take place. Therefore, an init argument to the HTX command is
required to create the coordinate data, i.e. “htx.exe init” will create the coordinate data for the
interfaces.
At each “update interval” Wind-US will execute the script “run_cht.pl”. This script must be in
the directory where Wind-US was started. Example scripts are provided for each test case. The
major function is to
An example of the Perl script “run_cht.pl” is shown below where the SDI surface is called
“htx_1”.
#!/usr/bin/perl
#====================================================================
===========
=comment
Runs a specified CHT code, and performs interpolations between the flow surface
and the solid surface.
=cut
#====================================================================
===========
use strict;
use warnings;
#-------------------------------------------------------------------------------
# User Options
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Local Variables
#-------------------------------------------------------------------------------
my $cmd;
#-------------------------------------------------------------------------------
# Create solid CGF file (if needed)
#-------------------------------------------------------------------------------
if (not -e ".sdi/$solid.cgf") {
print ".sdi/$solid.cgf doesn't exist, creating...";
$cmd = "$cht_create_surface_cmd 1>>$cht_out 2>&1";
system($cmd);
print "ok\n";
}
#-------------------------------------------------------------------------------
# Interpolate from $flowcgf -> $solidcgf
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Run CHT code
#-------------------------------------------------------------------------------
print "ok\n";
#-------------------------------------------------------------------------------
# Interpolate from $solid -> $flow
#-------------------------------------------------------------------------------
#EOF