OpenFAST
Wind turbine multiphysics simulator
Macros | Functions
outputstream.c File Reference
#include "outputstream.h"
Include dependency graph for outputstream.c:

Macros

#define GITVERSION   PROGVERSION
 

Functions

MAP_ERROR_CODE get_iteration_output_stream (MAP_OutputType_t *y_type, MAP_OtherStateType_t *other_type, char *map_msg, MAP_ERROR_CODE *ierr)
 
MAP_ERROR_CODE write_summary_file (InitializationData *init, MAP_ParameterType_t *paramType, Domain *data, char *map_msg, MAP_ERROR_CODE *ierr)
 
MAP_ERROR_CODE write_cable_library_information_to_summary_file (FILE *file, Domain *domain)
 Writes all cable properties defined in the MAP input file: More...
 
MAP_ERROR_CODE write_node_type_to_summary_file (const int num_col, const int count_to_four, const NodeType node_type, bstring line)
 writes the node type. More...
 
MAP_ERROR_CODE write_node_header_to_summary_file (const int num_col, const int count_to_four, const int node_num, bstring line)
 header for the node block. More...
 
MAP_ERROR_CODE write_node_x_position_to_summary_file (const int num_col, const int count_to_four, VarTypePtr *x_pos, bstring line)
 writes the node x global displacement (position) to the node output block. More...
 
MAP_ERROR_CODE write_node_y_position_to_summary_file (const int num_col, const int count_to_four, VarTypePtr *y_pos, bstring line)
 writes the node y global displacement (position) to the node output block. More...
 
MAP_ERROR_CODE write_node_z_position_to_summary_file (const int num_col, const int count_to_four, VarTypePtr *z_pos, bstring line)
 writes the node z global displacement (position) to the node output block. More...
 
MAP_ERROR_CODE write_node_mass_information_to_summary_file (const int num_col, const int count_to_four, VarType *point_mass, bstring line)
 writes the node point mass value to the output block. More...
 
MAP_ERROR_CODE write_node_buoyancy_information_to_summary_file (const int num_col, const int count_to_four, VarType *point_buoy, bstring line)
 writes the volumetric displacement of the buoyancy module to the node output block. More...
 
MAP_ERROR_CODE write_node_x_sum_force_to_summary_file (const int num_col, const int count_to_four, VarTypePtr *x_sum_force, bstring line)
 writes the x-direction sum force to the node output block. More...
 
MAP_ERROR_CODE write_node_y_sum_force_to_summary_file (const int num_col, const int count_to_four, VarTypePtr *y_sum_force, bstring line)
 writes the y-direction sum force to the node output block. More...
 
MAP_ERROR_CODE write_node_z_sum_force_to_summary_file (const int num_col, const int count_to_four, VarTypePtr *z_sum_force, bstring line)
 writes the z-direction sum force to the node output block. More...
 
MAP_ERROR_CODE write_node_information_to_summary_file (FILE *file, Domain *domain, char *map_msg, MAP_ERROR_CODE *ierr)
 write the complete node block to the summary file More...
 
MAP_ERROR_CODE write_line_information_to_summary_file (FILE *file, Domain *domain)
 write the complete line block to the summary file More...
 
MAP_ERROR_CODE write_expanded_input_file_to_summary_file (FILE *file, InitializationData *init_data)
 prints the expanded MAP input file. More...
 
MAP_ERROR_CODE fopen_s (FILE **f, const char *name, const char *mode)
 

Function Documentation

◆ get_iteration_output_stream()

MAP_ERROR_CODE get_iteration_output_stream ( MAP_OutputType_t y_type,
MAP_OtherStateType_t other_type,
char *  map_msg,
MAP_ERROR_CODE *  ierr 
)
Parameters
y_typeoutput type, native C struct MAP_OutputType_t
other_typeother state type, native C struct MAP_OtherStateType_t
map_msgerror message
ierrerror code
Here is the caller graph for this function:

◆ write_cable_library_information_to_summary_file()

MAP_ERROR_CODE write_cable_library_information_to_summary_file ( FILE *  file,
Domain domain 
)

Writes all cable properties defined in the MAP input file:

       Cable Type          : {value}
       Diameter     [m]    : {value}
       Mass Density [kg/m] : {value}
       EA           [N]    : {value}
       omega        [N/m]  : {value}
       CB                  : {value}
       
Parameters
filefile where string is being dumped to
domaininternal state data Domain
Todo:
include new properties for the LM model

◆ write_expanded_input_file_to_summary_file()

MAP_ERROR_CODE write_expanded_input_file_to_summary_file ( FILE *  file,
InitializationData init_data 
)

prints the expanded MAP input file.

This can be used as a check to make sure the repeat flags are correctly interpreted.

Parameters
filefile where string is being dumped to
init_datainitialization output type, native C struct MAP_InitOutputType_t

◆ write_line_information_to_summary_file()

MAP_ERROR_CODE write_line_information_to_summary_file ( FILE *  file,
Domain domain 
)

write the complete line block to the summary file

                       | Line 1
                       | ---------------------------------------
       Material        |  Material
       Lu        [m]   |  0.000
       Lb        [m]   |  0.000
       H         [N]   |  0.000
       V         [N]   |  0.000
       T         [N]   |  0.000
       Alpha     [deg] |  0.000
       HAnch     [N]   |  0.000
       VAnch     [N]   |  0.000
       TAnch     [N]   |  0.000
       AlphaAnch [deg] |  0.000
       L^2-Norm        |  0.000
       Function Evals  |  0
       Jacobian Evals  |  0
       Term. criteria  |  0
       
Parameters
filefile where string is being dumped to
domaininternal state data Domain
Here is the call graph for this function:

◆ write_node_buoyancy_information_to_summary_file()

MAP_ERROR_CODE write_node_buoyancy_information_to_summary_file ( const int  num_col,
const int  count_to_four,
VarType point_buoy,
bstring  line 
)

writes the volumetric displacement of the buoyancy module to the node output block.

Units are in [m^3]:

       B  [m^3]  | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
point_buoyancynode point buoyancy [m^3]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_header_to_summary_file()

MAP_ERROR_CODE write_node_header_to_summary_file ( const int  num_col,
const int  count_to_four,
const int  node_num,
bstring  line 
)

header for the node block.

Prints the node number.

                 | Node {number} Data"
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
node_num
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_information_to_summary_file()

MAP_ERROR_CODE write_node_information_to_summary_file ( FILE *  file,
Domain domain,
char *  map_msg,
MAP_ERROR_CODE *  ierr 
)

write the complete node block to the summary file

                 | Node 1 Data            Node 2 Data            Node 3 Data            Node 4 Data
                 | -------------------------------------------------------------------------------------------
       Type      |  FIX                    CONNECT                VESSEL                 FIX
       X  [m]    |   0.000                  0.000                  0.000                  0.000
       Y  [m]    |   0.000                  0.000                  0.000                  0.000
       Z  [m]    |   0.000                  0.000                  0.000                  0.000
       M  [kg]   |   0.000                  0.000                  0.000                  0.000
       B  [m^3]  |   0.000                  0.000                  0.000                  0.000
       FX [N]    |   0.000                  0.000                  0.000                  0.000
       FY [N]    |   0.000                  0.000                  0.000                  0.000
       FZ [N]    |   0.000                  0.000                  0.000                  0.000
       
Parameters
filefile where string is being dumped to
domaininternal state data Domain
map_msgerror message
ierrerror code
Here is the call graph for this function:

◆ write_node_mass_information_to_summary_file()

MAP_ERROR_CODE write_node_mass_information_to_summary_file ( const int  num_col,
const int  count_to_four,
VarType point_mass,
bstring  line 
)

writes the node point mass value to the output block.

Units are in [kg]:

       M  [kg]  | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
point_massnode point mass [kg]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_type_to_summary_file()

MAP_ERROR_CODE write_node_type_to_summary_file ( const int  num_col,
const int  count_to_four,
const NodeType  node_type,
bstring  line 
)

writes the node type.

Can be VESSEL, CONNECT, or FIX

       Type      |  {VESSEL} 
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
node_typeidentifies the node type as a NONE, CONNECT, FIX, or VESSEL
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_x_position_to_summary_file()

MAP_ERROR_CODE write_node_x_position_to_summary_file ( const int  num_col,
const int  count_to_four,
VarTypePtr x_pos,
bstring  line 
)

writes the node x global displacement (position) to the node output block.

Units are in [m]:

       X  [m]   | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
x_posnode global x position [m]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_x_sum_force_to_summary_file()

MAP_ERROR_CODE write_node_x_sum_force_to_summary_file ( const int  num_col,
const int  count_to_four,
VarTypePtr x_sum_force,
bstring  line 
)

writes the x-direction sum force to the node output block.

Units are in [N]:

       FX [N]   | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
x_sum_forcenode global x sum force (including external forces) [N]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_y_position_to_summary_file()

MAP_ERROR_CODE write_node_y_position_to_summary_file ( const int  num_col,
const int  count_to_four,
VarTypePtr y_pos,
bstring  line 
)

writes the node y global displacement (position) to the node output block.

Units are in [m]:

       Y  [m]   | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
y_posnode global y position [m]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_y_sum_force_to_summary_file()

MAP_ERROR_CODE write_node_y_sum_force_to_summary_file ( const int  num_col,
const int  count_to_four,
VarTypePtr y_sum_force,
bstring  line 
)

writes the y-direction sum force to the node output block.

Units are in [N]:

       FY [N]   | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
y_sum_forcenode global y sum force (including external forces) [N]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_z_position_to_summary_file()

MAP_ERROR_CODE write_node_z_position_to_summary_file ( const int  num_col,
const int  count_to_four,
VarTypePtr z_pos,
bstring  line 
)

writes the node z global displacement (position) to the node output block.

Units are in [m]:

       Z  [m]   | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
z_posnode global z position [m]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_node_z_sum_force_to_summary_file()

MAP_ERROR_CODE write_node_z_sum_force_to_summary_file ( const int  num_col,
const int  count_to_four,
VarTypePtr z_sum_force,
bstring  line 
)

writes the z-direction sum force to the node output block.

Units are in [N]:

       FZ [N]   | {value}
       
Parameters
num_colcolumn number, can be 1, 2, 3, or 4
count_to_fournumber of columns currently printed in the node output block
z_sum_forcenode global z sum force (including external forces) [N]
line_charoutput string terminated with '
'
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_summary_file()

MAP_ERROR_CODE write_summary_file ( InitializationData init_data,
MAP_ParameterType_t param_type,
Domain domain,
char *  map_msg,
MAP_ERROR_CODE *  ierr 
)
Parameters
init_dataMAP internal initialization data structure
param_typeparmeter type, native C struct MAP_ParameterType_t
domaininternal state data Domain
map_msgerror message
ierrerror code