Download Latest Version geomlib.tar.gz (58.3 kB)
Email in envelope

Get an email when there's a new version of CFD Utilities

Home / NEQAIR_Integration
Name Modified Size InfoDownloads / Week
Parent folder
README 2022-05-19 13.8 kB
build 2020-02-25 851 Bytes
neqair_integration.f90 2020-02-25 67.1 kB
Totals: 3 Items   81.8 kB 0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Program NEQAIR_Integration Description:

First Words:

Most of the documentation here applies to the original form that worked with
a single output from NEQAIR per line of sight, namely the radiance at a body
point integrated over all wavelengths.  This usage is expected to remain the
most common, so the original coding is retained as far as possible.  A major
extension here treats NEQAIR's more bulky outputs showing wave length regions
with spectral radiances computed for many wavelengths.  Either intensity.out
or intensity_scanned.out files are treated. Only one of these (not both) is
expected in each /LINE-* directory for which NEQAIR has been run, and their
presence or absence in /LINE-1 is determined automatically. If neither file
is present, the original single-radiance-per-line case is assumed.

Introduction (Original Form):

This somewhat specialized application is a companion to HEMISPHERES_OF_SIGHT
and NEQAIR_DATA, NEQAIR being a radiative heating solver long used at NASA
Ames Research Center.  Each run of NEQAIR operates on one line of sight's
worth of real gas flow data to compute the radiance impinging on some body
surface point of a hypersonic vehicle in the direction of that line.  Most
often, this line is normal to the body, and then a 1-D flow assumption is
made to compute a "tangent-slab" approximation to integrating the effect of
all possible lines of sight, giving an upper-bound estimate of the radiative
heat flux at that body point.  Approximating all possible lines of sight
reaching a body point requires much more work.

Typical atmospheric entry vehicles are relatively simple convex bodies, any
point of which can be "seen" by flow field radiation coming from all of the
directions defined by a hemisphere centered at the point, tangent to the
body.  HEMISPHERES_OF_SIGHT produces a discretization of such a hemisphere
at the specified body point(s) in the form of straight lines that have been
intersected with the outer boundary of the computational volume grid.  The
surface triangulation of points on that outer boundary associated with a
given body point, along with NEQAIR radiance results for each line of sight,
are gathered by this utility which then performs full angular integration
with respect to solid angle to give a more thorough estimate of the radiative
heat flux at the body point, the accuracy of which depends on the coarseness
of the underlying hemisphere triangulation.

Further Preliminary Details:

Consider a run of HEMISPHERES_OF_SIGHT for a pair of body points on the aft
parachute cone centerline, using "parachute" as the identifier.  Since both
points have y = 0, only half a hemisphere is needed.  This contains two of
the underlying discretized quadrants, suitably transformed.  Two sets of
three files are produced as follows:

   parachute.1.hemi.dat      ! Transformed/unintersected/2-zone Tecplot file
   parachute.1.boundary.dat  ! Intersected form of the above triangulation
   parachute.1.lines.g       ! PLOT3D file of all 1x1xnk intersected lines

   parachute.2.hemi.dat      ! Repeat for body point 2 ...
   parachute.2.boundary.dat
   parachute.2.lines.g

Also, the initial triangulated quadrant centered in (0,0,0) is saved as:

   unit_hemi_quadrant_vertices.dat

Alternative nomenclature from USLOS or SLOS rather than HEMISPHERES_OF_SIGHT:

Only one set of hemisphere lines is produced per run of USLOS or SLOS:

   transformed_unit_hemi.dat ! Transformed/unintersected/2-zone triangulation
                             ! centered on the body point
   intersected_boundary.dat  ! Intersected form of the above triangulation
   los.g                     ! 1x1xnk lines of sight in PLOT3D format

Plottable radiance datasets:

   radiance_normal_components.dat  ! On the intersected boundary surface
   radiance_normal_hemi.dat        ! On the unintersected hemisphere surface

The ID.n.hemi.dat files are for visual inspection.  The ID.n.lines.g files
contain 2 x nnodes "blocks" of dimensions 1 x 1 x nk, where nnodes is the
number of vertices in one quadrant of the triangulated hemisphere.  Each
ID.n.lines.g is input to FLOW_INTERP along with temperature and species
number density volume data and the associated volume grid (half the full
volume in this case, but both halves if any body point is off the y = 0
centerline).  The ...boundary.dat files are retrieved here, but NEQAIR_DATA
and then NEQAIR have to be run first.

For body point 1, parachute.1.lines.g and parachute.1.lines.f are passed to
NEQAIR_DATA, which produces lines in the form expected by NEQAIR, named
LOS-1.dat, LOS-2.dat, ..., LOS-m.dat where m = 2*nnodes in this case, or
4*nnodes for an off-center body point.

NOTE:  Treating more than one body point at a time with HEMISPHERES_OF_SIGHT
       and subsequent NEQAIR steps is not recommended, so the point number
       in the nomenclature is highly likely to be 1 (only).  The later USLOS
       and SLOS eliminate this unnecessary aspect of the nomenclature, but
       the integration allows for both forms.  Their output lines of sight
       are written to los.g.

A shell script can then run NEQAIR on all lines associated with one body
point, with its tangent-slab integration step turned off, producing sub-
directories /LINE-1, /LINE-2, ..., /LINE-m each containing a neqair.out
file with a radiance value on the last line.  (Common edge points are
retained in the quadrants to simplify the quadrature performed here, at the
cost of some repeated NEQAIR runs.)

If more than one body point is in the picture, each needs to be in its own
subdirectory because the LOS-*.dat files and /LINE-* subdirectory names do
not carry the ID along.  See the NOTE above.

Adjustments For Radiometer Cone Angle < 90 degrees:

If HEMISPHERES_OF_SIGHT has been used with a cone angle less than 90 deg.
entered as a 4th number (say 35.) on the body point x/y/z line, the lines
processed by NEQAIR_DATA should be those written to the additional file
cone.35.00.parachute.1.lines.g.  These are the only lines for which NEQAIR
needs to be run.  The angle calculations used to determine which hemisphere
lines to suppress are used here to read NEQAIR results for those lines only,
and to zero the radiance values for the remainder.  The quadrature can then
proceed over the whole hemispherical triangulation as before.

Provision is also made for examining a cone angle smaller than the cone angle
for which NEQAIR runs are in hand.  However, note that the smaller the cone
angle, the denser the underlying discretization can and should be for reason-
able resolution.

NEQAIR_INTEGRATION Procedure (Original Form; Cone Angle = 90 degrees):

For one body point, at the level above subdirectories /LINE-1, /LINE-2, ...
the user of this program enters the relevant ID and body point number (say
parachute and 1).  File parachute.1.boundary.dat is read in a loop over (2)
zones.  For each zone, nnodes lines are processed by extracting a radiance
value from the last line of the appropriate /LINE-*/neqair.out file into
the %f(1,:) elements of the zone/quadrant triangulation's function array
to match its %xyz(1:3,:) coordinates, followed with a call to low-level
subroutine solid_angle_quadrature_3 to produce a measure of radiative heat
flux at the body point for that quadrant/zone.  The sum over all quadrants
for one body point is the final heat flux for that body point.

Extensions For Distinguishing Wavelength Dependencies:

Wavelength-dependent integrations w.r.t. solid angle are saved as the file
integrations.dat, along with one radiance per line further described below.
The main complication is that storing all the data in intensity.out or
intensity_scanned.out could require vast amounts of memory. Ensuring a
common set of wavelengths for all regions of all lines, and storing only
one line's worth of data at a time is far more efficient (thanks to Brett
Cruden for this insight).  The added complexity is isolated as much as
possible so that the original scheme for which solid_angle_quadrature_3 was
written can be retained.  Both the original and the extended schemes allow
radiometer cone angles less than 90 (meaning NEQAIR output data are present
for only a subset of hemisphere lines) and possibly further analyses with
cone angles specified as smaller than the cone angle of the data.  The same
choice of zeroing function values for lines outside the indicated cone angle
simplifies the integrations in all cases. For each line, an integration
w.r.t. wavelength produces a radiance saved as /LINE-*/radiance.out, and
these can be integrated w.r.t. solid angle as a check that should match the
original integration scheme for single radiances produced by NEQAIR.
In /LINE-1 (only) the file line-1.cumulative.dat contains the partial
integrals w.r.t. wavelength for each common uniform wavelength.
Any radiance.out files in /LINE-* should be deleted before a run intended
to process intensity[_scanned].out files, because the program automates
the type of integration performed according to the files found in /LINE-1.

History:

03/28/2014  D.A.Saunders  Initial design.
03/31/2014    "     "     Initial testing.
04/02/2014    "     "     Brett Cruden pointed out that only the normal
                          component of radiance is seen by the body point.
02/19/2015    "     "     The screen heat flux dialogue can be partly lost
                          when there are many lines, so write it to a file,
                          results.dat.
02/23/2015    "     "     Save the radiances with the intersected surface
                          triangulation in contourable form, as the file
                          radiance_normal_components.dat.
02/24/2015    "     "     Contours of radiance (normal component) on the
                          intersected surface are hard for some people to
                          interpret, so do likewise for the hemispherical
                          surface as well.  This has been transformed to
                          be centered on the body point, but it can be
                          rotated during the plotting of the contours.
                          The file name is radiance_normal_hemi.dat.
                          (The need is to help design radiometers that
                          might be flown on future missions.)
02/28/2015    "      "    Clarified some of the description above.
03/03/2015    "      "    The twiddling of %numf wasn't quite right.
02/16/2018    "      "    Extended to handle less-than-full-hemisphere data
                          as needed for radiometer studies by Todd White.
02/21/2018    "      "    Allow for integrating over a smaller cone angle
                          than that for which the line of sight radiances
                          are in hand (but keep the data resolution in mind).
04/19/2018    "      "    Start of extensions to allow study of wavelength
                          dependencies as further needed for radiometers.
04/24/2018    "      "    Lots of head-scratching later: ready for testing.
05/17/2018    "      "    (After a hiatus:) Several minor glitches later, it
                          looks promising, although the results are four
                          orders of magnitude too high.
05/18/2018    "      "    Integrate the wavelength quadratures over solid
                          angle w.r.t. wavelength as a check.  Brett says
                          that radiances computed vs. angstroms should be
                          vs. microns, meaning scaling by 1.e-4.  Worse
                          issue: the intensity[_scanned].out files from
                          NEQAIR v14 have duplicate abscissas at the interior
                          region boundaries.  For now, look for these and
                          suppress them.
05/25/2018    "      "    NEQAIR v15 writes radiance results differently.
                          Look for Final or Total on the last line of
                          neqair.out for v14 and v15 respectively, and use
                          two different formatted reads (to avoid parsing).
05/31/2018    "      "    A desired cone angle of 10 deg. didn't work when
                          the data angle was 90 deg.
08/27/2018    "      "    The reading of wavelength regions needed to handle
                          NEQAIR V15's free format.
08/30/2018    "      "    Add sqrt (eps) to the data cone angle to allow for
                          noise in the angle_between_vectors results.
08/31/2018    "      "    Even 10*sqrt (eps) is not enough for a Mars 2020
                          radiometer case.  Go to 0.1 deg.
09/05/2018    "      "    Print doubled W/cm^2 at the end of screen output
                          for centerline/half-hemisphere cases (2 zones).
09/07/2018    "      "    Integration of radiance.out results with desired
                          cone angle < data cone angle needed a fix.
11/09/2018    "      "    The advent of USLOS (unstructured surfaces) and
                          SLOS (structured grid analog of USLOS) required
                          handling of simplified nomenclature for the various
                          files. If the simpler los.g file name is not found,
                          the original nomenclature is handled instead.
02/24/2020    "      "    The vertex weights used in the perform_integrations
                          procedure have not been initialized to zero until
                          now, although it doesn't seem to have hurt so far.

Author:  David Saunders, ERC, Inc./NASA Ames Research Center, CA
                Now with AMA, Inc. at NASA ARC.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Source: README, updated 2022-05-19