OpenFAST
Wind turbine multiphysics simulator
Functions/Subroutines
wamit_interp Module Reference

WAMIT_Interp module. More...

Functions/Subroutines

subroutine, public wamit_interp2d_cplx (InCoord, DataSet2D, WvFreq1, WvDir1, LastIndex, OutForce, ErrStat, ErrMsg)
 This subroutine takes the complex valued QTF dataset and interpolates for the desired coordinate in (Omega,WaveDir) space. More...
 
subroutine, public wamit_interp3d_cplx (InCoord, DataSet3D, WvFreq1, WvDir1, WvDir2, LastIndex, OutForce, ErrStat, ErrMsg)
 This subroutine takes the complex valued QTF dataset and interpolates for the desired coordinate in (Omega,WaveDir,WaveDir) space. More...
 
subroutine, public wamit_interp4d_cplx (InCoord, DataSet4D, WvFreq1, WvFreq2, WvDir1, WvDir2, LastIndex, OutForce, ErrStat, ErrMsg)
 This subroutine takes the complex valued QTF dataset and interpolates for the desired coordinate in (Omega,Omega,WaveDir, WaveDir) space. More...
 
subroutine interp2d_withindx_cplx (InCoord, InData2D, Indx_Lo, Indx_Hi, posLo, posHi, InterpVal)
 This subroutine takes a complex valued 2D dataset (InData2D) with the positions and indices of the bounding box and performs 3-D linear interpolation to estimate the value of the dataset at InCoord. More...
 
subroutine interp3d_withindx_cplx (InCoord, InData3D, Indx_Lo, Indx_Hi, posLo, posHi, InterpVal)
 This subroutine takes a complex valued 3D dataset (InData3D) with the positions and indices of the bounding box and performs 3-D linear interpolation to estimate the value of the dataset at InCoord. More...
 
subroutine interp4d_withindx_cplx (InCoord, InData4D, Indx_Lo, Indx_Hi, posLo, posHi, InterpVal)
 This subroutine takes a complex valued 4D dataset (InData4D) with the positions and indices of the bounding box and performs 4-D linear interpolation to estimate the value of the dataset at InCoord. More...
 
subroutine calcisoparcoords (InCoord, posLo, posHi, isopc)
 This subroutine calculates the iosparametric coordinates, isopc, which is a value between -1 and 1 (for each dimension of a dataset) indicating where InCoord falls between posLo and posHi. More...
 

Detailed Description

WAMIT_Interp module.

This module is used for interpolating the QTFs used in the WAMIT and WAMIT2 modules of HydroDyn.

Function/Subroutine Documentation

◆ calcisoparcoords()

subroutine wamit_interp::calcisoparcoords ( real(siki), dimension(:), intent(in)  InCoord,
real(siki), dimension(:), intent(in)  posLo,
real(siki), dimension(:), intent(in)  posHi,
real(siki), dimension(:), intent(out)  isopc 
)
private

This subroutine calculates the iosparametric coordinates, isopc, which is a value between -1 and 1 (for each dimension of a dataset) indicating where InCoord falls between posLo and posHi.

Parameters
[in]incoordArranged as (x, y)
[in]poslocoordinate values associated with Indx_Lo
[in]poshicoordinate values associated with Indx_Hi

◆ interp2d_withindx_cplx()

subroutine wamit_interp::interp2d_withindx_cplx ( real(siki), dimension(2), intent(in)  InCoord,
complex(siki), dimension(:,:), intent(in)  InData2D,
integer(intki), dimension(2), intent(in)  Indx_Lo,
integer(intki), dimension(2), intent(in)  Indx_Hi,
real(siki), dimension(2), intent(in)  posLo,
real(siki), dimension(2), intent(in)  posHi,
complex(siki), intent(out)  InterpVal 
)
private

This subroutine takes a complex valued 2D dataset (InData2D) with the positions and indices of the bounding box and performs 3-D linear interpolation to estimate the value of the dataset at InCoord.

It does not check that indices are valid or that the bounding box is non-degenerate (i.e., that posHi /= posLo)

This method is described here: http://www.colorado.edu/engineering/CAS/courses.d/AFEM.d/AFEM.Ch11.d/AFEM.Ch11.pdf

Parameters
[in]incoordArranged as (x, y)
[in]indata2dArranged as Index 1= x, Index 2= y.
[out]interpvalThe interpolated value of DataSet2D at InCoord
[in]poslocoordinate values associated with Indx_Lo
[in]poshicoordinate values associated with Indx_Hi
[in]indx_loindex associated with lower bound of dimension 1 where x(xIndx_lo) <= InCoord(1) <= x(xIndx_hi)
[in]indx_hiindex associated with upper bound of dimension 1 where x(xIndx_lo) <= InCoord(1) <= x(xIndx_hi)

◆ interp3d_withindx_cplx()

subroutine wamit_interp::interp3d_withindx_cplx ( real(siki), dimension(3), intent(in)  InCoord,
complex(siki), dimension(:,:,:), intent(in)  InData3D,
integer(intki), dimension(3), intent(in)  Indx_Lo,
integer(intki), dimension(3), intent(in)  Indx_Hi,
real(siki), dimension(3), intent(in)  posLo,
real(siki), dimension(3), intent(in)  posHi,
complex(siki), intent(out)  InterpVal 
)
private

This subroutine takes a complex valued 3D dataset (InData3D) with the positions and indices of the bounding box and performs 3-D linear interpolation to estimate the value of the dataset at InCoord.

It does not check that indices are valid or that the bounding box is non-degenerate (i.e., that posHi /= posLo)

This method is described here: http://www.colorado.edu/engineering/CAS/courses.d/AFEM.d/AFEM.Ch11.d/AFEM.Ch11.pdf

Parameters
[in]incoordArranged as (x, y, z)
[in]indata3dArranged as Index 1= x, Index 2= y, Index 3= z.
[out]interpvalThe interpolated value of DataSet3D at InCoord
[in]posloxyz (coordinate) values associated with Indx_Lo
[in]poshixyz (coordinate) values associated with Indx_Hi
[in]indx_loindex associated with lower bound of dimension 1 where x(xIndx_lo) <= InCoord(1) <= x(xIndx_hi)
[in]indx_hiindex associated with upper bound of dimension 1 where x(xIndx_lo) <= InCoord(1) <= x(xIndx_hi)

◆ interp4d_withindx_cplx()

subroutine wamit_interp::interp4d_withindx_cplx ( real(siki), dimension(4), intent(in)  InCoord,
complex(siki), dimension(:,:,:,:), intent(in)  InData4D,
integer(intki), dimension(4), intent(in)  Indx_Lo,
integer(intki), dimension(4), intent(in)  Indx_Hi,
real(siki), dimension(4), intent(in)  posLo,
real(siki), dimension(4), intent(in)  posHi,
complex(siki), intent(out)  InterpVal 
)
private

This subroutine takes a complex valued 4D dataset (InData4D) with the positions and indices of the bounding box and performs 4-D linear interpolation to estimate the value of the dataset at InCoord.

It does not check that indices are valid or that the bounding box is non-degenerate (i.e., that posHi /= posLo)

This method is described here: http://rjwagner49.com/Mathematics/Interpolation.pdf

Parameters
[in]incoordArranged as (x1, x2, x3, x4 )
[in]indata4dArranged as Index 1= x1, Index 2= x2, Index 3= x3, Index 4= x4.
[out]interpvalThe interpolated value of InData4D at InCoord
[in]poslocoordinate values associated with Indx_Lo
[in]poshicoordinate values associated with Indx_Hi
[in]indx_loindex associated wtih lower bound of dimension 1 where x(xIndx_lo) <= InCoord(1) <= x(xIndx_hi)
[in]indx_hiindex associated wtih upper bound of dimension 1 where x(xIndx_lo) <= InCoord(1) <= x(xIndx_hi)

◆ wamit_interp2d_cplx()

subroutine, public wamit_interp::wamit_interp2d_cplx ( real(siki), dimension(2), intent(in)  InCoord,
complex(siki), dimension(:,:), intent(in)  DataSet2D,
real(siki), dimension(:), intent(in)  WvFreq1,
real(siki), dimension(:), intent(in)  WvDir1,
integer(intki), dimension(2), intent(inout)  LastIndex,
complex(siki), intent(out)  OutForce,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This subroutine takes the complex valued QTF dataset and interpolates for the desired coordinate in (Omega,WaveDir) space.

A few important notes concerning this subroutine:

  1. It is complex valued. The values represent the second order wave force as calculated by WAMIT.
  2. The dimenions of DataSet2D are Frequency1 (positive valued) and Wave Direction (degrees).
  3. The wave direction requested might be between end points of wave direction dimension (ie. at 179 degrees when WvDir1(1)=175, WvDir(Dims(3))=-175)
  4. The arrays WvFreq1 and WvDir1 will give the values for each dimension that correspond to each index of DataSet2D.
  5. The data is not necessarily equally spaced in any direction: ie. WvFreq1 may not have uniform spacing between points.
  6. If a point is requested, it can be assumed that it lies within DataSet2D (this is checked before calling this subroutine)
  7. LastIndex contains the index numbers for the lowest bound on the indexes used on the last interpolation. If they are 0, then assume this is the first call to this subroutine.
  8. DataSet2D is complete and not sparse. There are no missing values.
Parameters
[in]incoordArranged as (Omega1, WaveDir1)
[in]dataset2dArranged as Index 1= Omega1, Index 2= WaveDir1.
[in]wvfreq1Frequencies associated with Index 1 of DataSet2D
[in]wvdir1Directions associated with Index 2 of DataSet2D
[in,out]lastindexIndex for the last (Omega1, WaveDir1) used
[out]outforceThe interpolated resulting force from DataSet2D
[out]errstatError status
[out]errmsgError message if ErrStat /= ErrID_None

◆ wamit_interp3d_cplx()

subroutine, public wamit_interp::wamit_interp3d_cplx ( real(siki), dimension(3), intent(in)  InCoord,
complex(siki), dimension(:,:,:), intent(in)  DataSet3D,
real(siki), dimension(:), intent(in)  WvFreq1,
real(siki), dimension(:), intent(in)  WvDir1,
real(siki), dimension(:), intent(in)  WvDir2,
integer(intki), dimension(3), intent(inout)  LastIndex,
complex(siki), intent(out)  OutForce,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This subroutine takes the complex valued QTF dataset and interpolates for the desired coordinate in (Omega,WaveDir,WaveDir) space.

A few important notes concerning this subroutine:

  1. It is complex valued. The values represent the second order wave force as calculated by WAMIT.
  2. The dimenions of DataSet3D are Frequency1 (positive valued), Wave Direction1 (degrees), and Wave Direction2 (degrees).
  3. The wave direction requested might be between end points of wave direction dimension (ie. at 179 degrees when WvDir1(1)=175, WvDir(Dims(3))=-175)
  4. The arrays WvFreq1, WvDir1, and WvDir2, will give the values for each dimension that correspond to each index of DataSet3D.
  5. The data is not necessarily equally spaced in any direction: ie. WvFreq1 may not have uniform spacing between points.
  6. If a point is requested, it can be assumed that it lies within DataSet3D (this is checked before calling this subroutine)
  7. LastIndex contains the index numbers for the lowest bound on the indexes used on the last interpolation. If they are 0, then assume this is the first call to this subroutine.
  8. DataSet4D is complete and not sparse. There are no missing values.
Parameters
[in]incoordArranged as (Omega1, WaveDir1, WaveDir2)
[in]dataset3dArranged as Index 1= Omega1, Index 2= WaveDir1, Index 3= WaveDir2.
[in]wvfreq1Frequencies associated with Index 1 of DataSet3D
[in]wvdir1Directions associated with Index 2 of DataSet3D
[in]wvdir2Directions associated with Index 3 of DataSet3D
[in,out]lastindexIndex for the last (Omega1, WaveDir1, WaveDir2) used
[out]outforceThe interpolated resulting force from DataSet3D
[out]errstatError status
[out]errmsgError message if ErrStat /= ErrID_None

◆ wamit_interp4d_cplx()

subroutine, public wamit_interp::wamit_interp4d_cplx ( real(siki), dimension(4), intent(in)  InCoord,
complex(siki), dimension(:,:,:,:), intent(in)  DataSet4D,
real(siki), dimension(:), intent(in)  WvFreq1,
real(siki), dimension(:), intent(in)  WvFreq2,
real(siki), dimension(:), intent(in)  WvDir1,
real(siki), dimension(:), intent(in)  WvDir2,
integer(intki), dimension(4), intent(inout)  LastIndex,
complex(siki), intent(out)  OutForce,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This subroutine takes the complex valued QTF dataset and interpolates for the desired coordinate in (Omega,Omega,WaveDir, WaveDir) space.

A few important notes concerning this subroutine:

  1. It is complex valued. The values represent the second order wave force as calculated by WAMIT.
  2. The dimenions of DataSet4D are Frequency1 (positive valued), Frequency2 (positive valued), Wave Direction 1 (degrees), and Wave Direction 2 (degrees).
  3. The wave direction requested might be between end points of wave direction dimension (ie. at 179 degrees when WvDir1(1)=175, WvDir(Dims(3))=-175)
  4. The arrays WvFreq1, WvFreq2, WvDir1, and WvDir2 will give the values for each dimension that correspond to each index of DataSet4D.
  5. The data is not necessarily equally spaced in any direction: ie. WvFreq1 may not have uniform spacing between points.
  6. If a point is requested, it can be assumed that it lies within DataSet4D (this is checked before calling this subroutine)
  7. LastIndex contains the index numbers for the lowest bound on the indexes used on the last interpolation. If they are 0, then assume this is the first call to this subroutine.
  8. DataSet4D is complete and not sparse. There are no missing values.
Parameters
[in]incoordArranged as (Omega1, Omega2, WaveDir1)
[in]dataset4dArranged as Index 1= Omega1, Index 2= Omega2, Index 3= WaveDir1, Index 4= Wavedir2.
[in]wvfreq1Frequencies associated with Index 1 of DataSet4D
[in]wvfreq2Frequencies associated with Index 2 of DataSet4D
[in]wvdir1Frequencies associated with Index 3 of DataSet4D
[in]wvdir2Frequencies associated with Index 3 of DataSet4D
[in,out]lastindexIndex for the last (Omega1, Omega2, WaveDir1) used
[out]outforceThe interpolated resulting force from DataSet4D
[out]errstatError status
[out]errmsgError message if ErrStat /= ErrID_None