20#include "panukl_par.h"
22PAR_FILE::PAR_FILE(
void ){
Clean (); }
24PAR_FILE::~PAR_FILE(
void ){}
43 File =
fopen( FileName,
"r" );
46 fprintf( stderr,
"[.PAR] file open error to reading (%s)\n", FileName );
77 File =
fopen( FileName,
"w" );
80 fprintf( stderr,
"[.PAR] file open error to writing (%s)\n", FileName );
84 fprintf( File,
"# Panukl main program configuration file\n");
85 fprintf( File,
"%s # input data file (grid with wake)\n",
DAT_file );
86 fprintf( File,
"%s # output file (input for Press program)\n",
PAN_file );
87 fprintf( File,
"%6.2f # alfa - angle of attack [deg]\n",
dAlfa );
88 fprintf( File,
"%6.2f # beta - sideslip angle [deg]\n",
dBeta );
89 fprintf( File,
"%6.2f # P - roll rate [rad/s]\n",
dP );
90 fprintf( File,
"%6.2f # Q - pitch rate [rad/s]\n",
dQ );
91 fprintf( File,
"%6.2f # R - yaw rate [rad/s]\n",
dR );
92 fprintf( File,
"%3d # type of linear system solver (1-LAPACK OPTIMIZED, 0-NOT OPTIMIZED)\n",
iProc );
93 fprintf( File,
"%6.3f # Mach number\n",
dMach );
94 fprintf( File,
"%3d # ACD file flag\n",
iACD );
95 if(
iACD)fprintf( File,
"%s # propeller data configuration file (input)\n",
ACD_file );
static FILE * fopen(const char *filename, const char *mode)
Cross-platform function to fopen function that supports UTF-8 encoded name.
static void ClipFileName(char *string)
Clipping of the ending blanc characters of "string".
static int ReadComm(FILE *stream)
Function to read of a comment till the end of line. It returns 0 or EOF if it is performed.
static int ReadStr(FILE *stream, char *Par)
Function to read the new line from FILE "stream" and to store it in table of char "Par"....
static int ReadPar(FILE *stream, const char *Format, void *Par)
Function to read one variable. The type of variable depends on Format, compatible with stdio library.
int iProc
type of linear system solver (1-LAPACK OPTIMIZED, 0-NOT OPTIMIZED)
double dAlfa
angle of attack [deg]
int iACD
flag of using the propellers data configuration file (0-no file, 1-file present)
int WritePAR(char *Filename)
writes parameters file
char ACD_file[256]
optional input file - propellers data configuration file [.ACD]
double dBeta
sideslip angle [deg]
char DAT_file[256]
input file - mesh + wake data file [.DAT]
double dP
roll rate [rad/s]
double dQ
pitch rate [rad/s]
char PAR_file[256]
current parameters file [.PAR]
int ReadPAR(char *FileName)
reads parameters file
void Clean()
cleans local variables
double dR
yaw rate [rad/s]
char PAN_file[256]
output file - doublet distribution file [.PAN]