20#include "panukl_ngh.h"
22NGH_FILE::NGH_FILE(
void ){
Clean(); }
24NGH_FILE::~NGH_FILE(
void ){}
43 File =
fopen( FileName,
"r" );
46 fprintf( stderr,
"[.NGH] file open error to reading (%s)\n", FileName );
72 File =
fopen( FileName,
"w" );
75 fprintf( stderr,
"[.NGH] file open error to writing (%s)\n", FileName );
79 fprintf( File,
"# Neigh program configuration file\n");
80 fprintf( File,
"%d # wake type\n",
iWakeType );
81 fprintf( File,
"%6.2f # trailing edge angle\n",
dAngleTE );
82 fprintf( File,
"%6.2f # neighbour condition angle\n",
dAngleNGH );
83 fprintf( File,
"%6.2f # angle of attack\n",
dAlfa );
84 fprintf( File,
"%6.2f # sideslip angle\n",
dBeta );
85 fprintf( File,
"%6.2f # last panel length (MAC multiplication)\n",
dLastPanel );
86 fprintf( File,
"%s # input grid file\n",
INP_file );
87 fprintf( File,
"%s # output file - grid with wake and neighbours\n",
DAT_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 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.
double dLastPanel
length of wake - MAC multiplicator (default 20)
double dAlfa
angle of attack [deg] - active in case iWakeType = 1,3,4,6
double dAngleTE
angle of trailing edge [deg], which determines wake creation (Kutta-Joukovsky condition)
double dBeta
sideslip angle [deg] - active in case iWakeType = 2,3,5,6
char INP_file[256]
data (mesh) file [.INP] - input
int ReadNGH(char *FileName)
reads parameters [.ngh] file
char NGH_file[256]
name of current [.ngh] file
double dAngleNGH
max. value of angle [deg] (max. 90) between panels for which panels are treated as neighbouring
int iWakeType
Type of wake: 0 - wake paralel to MAC, 1 - wake with downwash due to angle of attack,...
int WriteNGH(char *Filename)
writes parameters [.ngh] file
void Clean(void)
cleans local variables
char DAT_file[256]
data (mesh+wake) file [.DAT] - output