Skip to content

Latest commit

 

History

History
 
 

anchor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
   This program can be employed to drive a quite general Kriging-type
method of interpolating unstructured data (see NO-ANCHORING OPTION
below), but first: an explanation of what prompted it at NASA Ames
Research Center, from the program header:

INTRODUCTION:

   Anchoring refers to determining corrections for low-fidelity
calculations from a limited number of more expensive higher-fidelity
calculations.  Where the high-fidelity "observations" are available,
the corrected results should match, while far away from them the
adjustments should be essentially zero.

   This application is prompted by the need to correct Euler calculations
of aerodynamic lift and drag coefficients using a limited number of more
costly Navier-Stokes solutions.  It is implemented in a general enough way
that it may find other uses.

   The data points are treated as unstructured, and the interpolation
method is a form of Kriging known as Optimal Interpolation.  Since both
the low and high fidelity datasets are being interpolated, it may seem
that the datasets should have independent variance estimates. However,
only low-fidelity error estimates are meaningful because it is actually
DIFFERENCES between high and low fidelity data that are involved in the
second set of interpolations.  The same estimates are applied to all
points of a given dataset, meaning they're crude at best.  Provision is
made for specifying different error variances for the different functions
(originally assumed to be comparable).

ASSUMPTIONS:

   o  Allow for any number of coordinate dimensions and any number of
      functions at each point.
   o  Read and write one data point per line; count the number of input
      data points by reading to EOF.
   o  Outputs are assumed to be desired as a rectangular table defined by a
      list of coordinates in each dimension (original design; this version
      can alternatively read an unstructured list of target points at which
      to interpolate, in which case derivative outputs are not an option).
      For rectangular-table mode, the table coordinates are read from the
      control file, with each dimension starting on a new line.
      For the arbitrary-list-of-points-at-which-to-interpolate mode, those
      target points are read one tuple per line until EOF from the file
      indicated on the control line following some meaningful rectangular
      table definition (acting as a place holder, but ignored after being
      read).  This line is skipped if the table definition is to be used,
      but it must be present.
   o  Results are tabulated in Fortran order (first coordinate varying
      first, etc.) if they are in rectangular table form, else they are
      tabulated in the input target point order.  Plottable results are
      also written in Tecplot format with POINT order.  The file name is
      derived from the tabulation name by adding ".Tec.dat".  This file
      includes any high-fidelity points as a second zone.

OUTLINE:

   o  A short control file specifies file names & interpolation parameters.
      It is read from standard input.
   o  Interpolate the lo-fi functions at the hi-fi coordinates and at the
      target coordinates (concatenated to do both in one call).
   o  Interpolate the  (hi-fi - lo-fi) function differences at the target
      output coordinates.
   o  Add the interpolated corrections to the lo-fi functions evaluated at
      the target coordinates.

NO-ANCHORING OPTION:

   If the high fidelity file name is "none", only initial interpolations of
   the low-fi data are performed.  This provides a way of testing control
   inputs on one set of interpolations, and/or performing Kriging-type
   interpolation within a single dataset (the "low-fi" data) without the
   "anchoring" idea in the picture.

SAMPLE CONTROL FILE:

   ------------------------------------------------------------------------
   ANCHOR Control File
   ------------------------------------------------------------------------
   2  3              ! # coordinates and # functions
   Mach Alpha        ! coordinate names
   CL CD CM          ! function names
   cbaero.dat        ! low fidelity data input file
   overflow.dat      ! high fidelity data input file or "none"
   anchored.dat      ! output results file (structured table | just a list)
   derivatives.dat   ! output derivatives (plottable) or "none"
   1                 ! target point mode: 1 = rectangular table; 2 = list
   14  52            ! dimens. of output table, mode = 1; coords. follow:
   0.5 0.7 0.9 0.95 1.05 1.1 1.2 1.6 2.0 2.5 3.0 4.0 6.0 8.0
   0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110
   115 120 125 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158
   160 162 164 166 168 170 172 174 176 176 180
   target.dat        ! file name of target pts., mode=2; ignore if mode=1
   ------------------------------------------------------------------------
   Interpolation Controls
   ------------------------------------------------------------------------
   40                ! # nearest neighbors used for each interpolation
   4.   40.          ! data correlation lengths in coordinate space
   G    G            ! correlation functions: G = Gaussian, L = Linear
   0.1               ! adaptation control in [0, ~0.5]; 0 = no adaptation
   1.e-6 1.e-6 1.e-6 ! function error variances >= 0
   ------------------------------------------------------------------------
   Interpolation Controls
   ------------------------------------------------------------------------
   40                ! # nearest neighbors used for each interpolation
   4.   40.          ! data correlation lengths in coordinate space
   G    G            ! correlation functions: G = Gaussian, L = Linear
   0.1               ! adaptation control in [0, ~0.5]; 0 = no adaptation
   0.0   0.0   0.0   ! function error variances >= 0