OpenFAST
Wind turbine multiphysics simulator
Functions/Subroutines
elastodyn_io Module Reference

This module contains file I/O routines and data validation routines. More...

Functions/Subroutines

subroutine ed_readinput (InputFileName, MeshFile, InputFileData, ReadAdmVals, BD4Blades, Default_DT, OutFileRoot, ErrStat, ErrMsg)
 This subroutine reads the input file and stores all the data in the ED_InputFile structure. More...
 
subroutine ed_validateinput (InputFileData, BD4Blades, Linearize, ErrStat, ErrMsg)
 This subroutine validates the input file data. More...
 
subroutine readbladeinputs (BldFile, MeshFile, ReadAdmVals, InputFileData, UnEc, ErrStat, ErrMsg)
 This routine reads the data from the blade and mesh inputs files. More...
 
subroutine readbladefile (BldFile, BladeKInputFileData, ReadAdmVals, UnEc, ErrStat, ErrMsg)
 This routine reads a blade input file. More...
 
subroutine readblademeshfilead (BladeKInputFileMesh, MeshFile, UnEc, ErrStat, ErrMsg)
 This routine reads in the AeroDyn v14.00.00 input file to get the blade discretization used in the structural dynamics module. More...
 
subroutine readfurlfile (FurlFile, InputFileData, UnEc, ErrStat, ErrMsg)
 This routine reads the furling file input and converts units as appropriate. More...
 
subroutine readtowerfile (TwrFile, InputFileData, ReadAdmVals, UnEc, ErrStat, ErrMsg)
 This routine reads the tower file input. More...
 
subroutine readprimaryfile (InputFile, InputFileData, BldFile, FurlFile, TwrFile, OutFileRoot, UnEc, ErrStat, ErrMsg)
 This routine reads in the primary ElastoDyn input file and places the values it reads in the InputFileData structure. More...
 
subroutine alloc_blademeshinputproperties (BladeKInputFileMesh, ErrStat, ErrMsg)
 This routine allocates arrays for the blade mesh properties from the input file. More...
 
subroutine alloc_bladeinputproperties (BladeKInputFileData, AllocAdams, ErrStat, ErrMsg)
 This routine allocates arrays for the blade properties from the input file. More...
 
subroutine alloc_towerinputproperties (InputFileData, AllocAdams, ErrStat, ErrMsg)
 This routine allocates arrays for the tower properties from the input file. More...
 
subroutine validatebladedata (BladeKInputFileData, ErrStat, ErrMsg)
 This routine checks the blade file input data for errors. More...
 
subroutine validatemodeshapecoeffs (Coeffs, ShpDesc, ErrStat, ErrMsg)
 This routine checks that the mode shape coefficients add to 1.0, within numerical tolerance (currently 0.0015). More...
 
subroutine validatetowerdata (InputFileData, ErrStat, ErrMsg)
 This routine checks the tower file input data for errors. More...
 
subroutine validatefurldata (InputFileData, ErrStat, ErrMsg)
 This routine validates the furling inputs. More...
 
subroutine validateprimarydata (InputFileData, BD4Blades, Linearize, ErrStat, ErrMsg)
 This routine validates the inputs from the primary input file. More...
 

Detailed Description

This module contains file I/O routines and data validation routines.

Function/Subroutine Documentation

◆ alloc_bladeinputproperties()

subroutine elastodyn_io::alloc_bladeinputproperties ( type(bladeinputdata), intent(inout)  BladeKInputFileData,
logical, intent(in)  AllocAdams,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine allocates arrays for the blade properties from the input file.

Parameters
[in,out]bladekinputfiledataData for Blade K stored in the module's input file
[in]allocadamsLogical to determine if we should allocate the arrays only used for Adams
[out]errstatError status
[out]errmsgErr message

◆ alloc_blademeshinputproperties()

subroutine elastodyn_io::alloc_blademeshinputproperties ( type(ed_blademeshinputdata), intent(inout)  BladeKInputFileMesh,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine allocates arrays for the blade mesh properties from the input file.

Parameters
[in,out]bladekinputfilemeshData for Blade K stored in the module's input file
[out]errstatError status
[out]errmsgErr msg

◆ alloc_towerinputproperties()

subroutine elastodyn_io::alloc_towerinputproperties ( type(ed_inputfile), intent(inout)  InputFileData,
logical, intent(in)  AllocAdams,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine allocates arrays for the tower properties from the input file.

Parameters
[in,out]inputfiledataAll the data in the ElastoDyn input file
[in]allocadamsDetermines if the columns for Adams data will be read
[out]errstatError status
[out]errmsgError message

◆ ed_readinput()

subroutine elastodyn_io::ed_readinput ( character(*), intent(in)  InputFileName,
character(*), intent(in)  MeshFile,
type(ed_inputfile), intent(out)  InputFileData,
logical, intent(in)  ReadAdmVals,
logical, intent(in)  BD4Blades,
real(dbki), intent(in)  Default_DT,
character(*), intent(in)  OutFileRoot,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This subroutine reads the input file and stores all the data in the ED_InputFile structure.

It does not perform data validation.

Parameters
[in]default_dtThe default DT (from glue code)
[in]inputfilenameName of the input file
[in]meshfileFile that contains the blade mesh information (AeroDyn input file for now) – later this info will be defined in one of the ED input files.
[in]outfilerootThe rootname of all the output files written by this routine.
[out]inputfiledataData stored in the module's input file
[out]errstatThe error status code
[in]readadmvalsDetermines if we should read the Adams-only values
[in]bd4bladesDetermines if we should read the blade values (true=don't read this file; use BeamDyn for blades instead)
[out]errmsgThe error message, if an error occurred

◆ ed_validateinput()

subroutine elastodyn_io::ed_validateinput ( type(ed_inputfile), intent(in)  InputFileData,
logical, intent(in)  BD4Blades,
logical, intent(in)  Linearize,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This subroutine validates the input file data.

Parameters
[in]inputfiledataData stored in the module's input file
[in]bd4bladesDetermines if we should validate the blade values (true=don't validate; use BeamDyn for blades instead)
[in]linearizeFlag indicating glue code wants to linearize this module
[out]errstatThe error status code
[out]errmsgThe error message, if an error occurred

◆ readbladefile()

subroutine elastodyn_io::readbladefile ( character(*), intent(in)  BldFile,
type(bladeinputdata), intent(inout)  BladeKInputFileData,
logical, intent(in)  ReadAdmVals,
integer(intki), intent(in)  UnEc,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine reads a blade input file.

Parameters
[in,out]bladekinputfiledataData for Blade K stored in the module's input file
[in]bldfileName of the blade input file data
[in]readadmvalsLogical to determine if Adams inputs should be read from file
[in]unecI/O unit for echo file. If present and > 0, write to UnEc
[out]errstatError status
[out]errmsgError message

◆ readbladeinputs()

subroutine elastodyn_io::readbladeinputs ( character(*), dimension(:), intent(in)  BldFile,
character(*), intent(in)  MeshFile,
logical, intent(in)  ReadAdmVals,
type(ed_inputfile), intent(inout)  InputFileData,
integer(intki), intent(in)  UnEc,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine reads the data from the blade and mesh inputs files.

This routines assumes that InputFileDataNumBl has already been set.

Parameters
[in,out]inputfiledataInput file data Data for Blade K stored in the module's input file
[in]bldfileThe array of file names containing blade information
[in]meshfileThe file names containing blade mesh information (for now, the aerodyn primary file)
[in]unecI/O unit for echo file. If present and > 0, write to UnEc
[out]errstatThe error ID
[out]errmsgMessage describing error
[in]readadmvalsLogical to determine if Adams inputs should be read from file

◆ readblademeshfilead()

subroutine elastodyn_io::readblademeshfilead ( type(ed_blademeshinputdata), intent(inout)  BladeKInputFileMesh,
character(*), intent(in)  MeshFile,
integer(intki), intent(in)  UnEc,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine reads in the AeroDyn v14.00.00 input file to get the blade discretization used in the structural dynamics module.

Parameters
[in,out]bladekinputfilemeshAll the data in the ElastoDyn input file
[in]meshfileName of the AeroDyn input file data (for mesh)
[in]unecI/O unit for echo file. If present and > 0, write to UnEc
[out]errstatError status
[out]errmsgError message

◆ readfurlfile()

subroutine elastodyn_io::readfurlfile ( character(*), intent(in)  FurlFile,
type(ed_inputfile), intent(inout)  InputFileData,
integer(intki), intent(in)  UnEc,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine reads the furling file input and converts units as appropriate.

Parameters
[in,out]inputfiledataAll the data in the ElastoDyn input file
[out]errstatError status
[in]unecI/O unit for echo file. If present and > 0, write to UnEc
[out]errmsgError message
[in]furlfileName of the furling input file data

◆ readprimaryfile()

subroutine elastodyn_io::readprimaryfile ( character(*), intent(in)  InputFile,
type(ed_inputfile), intent(inout)  InputFileData,
character(*), dimension(maxbl), intent(out)  BldFile,
character(*), intent(out)  FurlFile,
character(*), intent(out)  TwrFile,
character(*), intent(in)  OutFileRoot,
integer(intki), intent(out)  UnEc,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine reads in the primary ElastoDyn input file and places the values it reads in the InputFileData structure.

It opens an echo file if requested and returns the (still-open) echo file to the calling routine. It also returns the names of the BldFile, FurlFile, and TrwFile for further reading of inputs.

Parameters
[out]unecI/O unit for echo file. If > 0, file is open for writing.
[out]errstatError status
[in]inputfileName of the file containing the primary input data
[out]errmsgError message
[out]twrfilename of the file containing tower inputs
[out]furlfilename of the file containing furling inputs
[out]bldfilename of the files containing blade inputs
[in]outfilerootThe rootname of the echo file, possibly opened in this routine
[in,out]inputfiledataAll the data in the ElastoDyn input file

◆ readtowerfile()

subroutine elastodyn_io::readtowerfile ( character(*), intent(in)  TwrFile,
type(ed_inputfile), intent(inout)  InputFileData,
logical, intent(in)  ReadAdmVals,
integer(intki), intent(in)  UnEc,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine reads the tower file input.

Parameters
[out]errstatError status
[in]unecI/O unit for echo file. If present and > 0, write to UnEc
[in]readadmvalsLogical to determine if Adams inputs should be read from file
[out]errmsgError message
[in]twrfileName of the tower input file data
[in,out]inputfiledataAll the data in the ElastoDyn input file

◆ validatebladedata()

subroutine elastodyn_io::validatebladedata ( type(bladeinputdata), intent(in)  BladeKInputFileData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine checks the blade file input data for errors.

Parameters
[in]bladekinputfiledataData for Blade K stored in the module's input file
[out]errstatError status
[out]errmsgError message

◆ validatefurldata()

subroutine elastodyn_io::validatefurldata ( type(ed_inputfile), intent(in)  InputFileData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine validates the furling inputs.

Parameters
[in]inputfiledataAll the data in the ElastoDyn input file
[out]errstatError status
[out]errmsgError message

◆ validatemodeshapecoeffs()

subroutine elastodyn_io::validatemodeshapecoeffs ( real(reki), dimension(:), intent(in)  Coeffs,
character(*), intent(in)  ShpDesc,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine checks that the mode shape coefficients add to 1.0, within numerical tolerance (currently 0.0015).

Parameters
[in]coeffsMode shape coefficients
[in]shpdescDescription of the mode shape for the error message
[out]errstatError status
[out]errmsgError message

◆ validateprimarydata()

subroutine elastodyn_io::validateprimarydata ( type(ed_inputfile), intent(in)  InputFileData,
logical, intent(in)  BD4Blades,
logical, intent(in)  Linearize,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine validates the inputs from the primary input file.

note that all angles are assumed to be in radians in this routine:

Parameters
[in]inputfiledataAll the data in the ElastoDyn input file
[in]bd4bladesUse BeamDyn for blades, thus ignore ElastoDyn blade info
[in]linearizeFlag indicating glue code wants to linearize this module
[out]errstatError status
[out]errmsgError message

◆ validatetowerdata()

subroutine elastodyn_io::validatetowerdata ( type(ed_inputfile), intent(in)  InputFileData,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

This routine checks the tower file input data for errors.

Parameters
[in]inputfiledataData stored in the module's input file
[out]errstatError status
[out]errmsgError message