24#ifndef _PANUKL_STRUCT_H_
25#define _PANUKL_STRUCT_H_
37#define MaxWakePanelNumber 1000
38#define MaxWakesNumber 1000
245 void DeleteINP(
void );
246 void DeleteDAT(
void );
247 void DeleteDATw(
void );
main class for PANUKL input and output files manipulation
int ReadIN1(FILE *File)
reads [.inp] data from stream FILE - data written as panels
void InitCommon(void)
initialization of commonly used arrays
double * dSs_cpr0
strip wetted area
int ReadINP(char *FileName)
reads [.inp] file from pathname FileName
int WriteDAT(char *FileName)
writes [.dat] file to pathname FileName
double * dRhs
right hand side vector input - result on output (Nww2)
double * dCzi
strip lift coeffcient
double dZca25
z coordinate of reference point for moment calculation (usually 0.25 MAC)
int WriteInpFromPanels(char *FileName, int iScale=0)
writes [.inp] file to pathname FileName - data stored in panels
double * dSig
source (singularity) value
static int ReadObjs(std::ifstream &f, std::vector< MS2_OBJ > &Objs, int N1=0, float fVer=VERSION)
Reads objects from stream (ifstream object) f, with offset by N1 panels.
int iMaxPanelNumber
number of body (airplane) panels
int iLiczw
number of wake strips
int * iNnww
array containing upper surface panels neighbouring with the wake iNnww[i,j] i - strip number j=1...
int iLiczp
number of wake panels
double * dCyr
"y" force coefficient acting on the strip
double dCa
mean aerodynamic chord (MAC)
void WriteObjs(FILE *f)
Writes objects.
void Points2Panels(void)
converts nodes (std::vector<VECTOR_3D>) to panels (std::vector<PANEL>)
int WriteInpFromPoints(char *FileName, int iScale=0)
writes [.inp] file to pathname FileName - data stored in nodes
int ReadObjs(FILE *f)
Reads objects.
double * dQz
tangential undisturbed velocity - z coordinate
double * dCpp
pressure coefficient
void Corner2Points(int *iD, VECTOR_3D *P)
assigns panel corner P to node number iD
int * iNeigh
neighbours numbers array (Nww2,8)
double * dX
main grid (+ wake for Panukl) X[i,j,k], i=panel number, j=corner number, k=coordinate number
double * dCpr
normal force coefficient acting on the strip
double * dXw
wake grid (Xw[i,j,k])
double * dMach
lacal panel Mach number
double * dVv2
square of total velocity on the panel
double * dSss
panels areas
~GRID_ARRAYS(void)
destructor
double * dCzr
"z" force coefficient acting on the strip
int iNww
= iN + iLiczp; # airplane + wake (up)
double * dVyd
"y" component of induced velocity (from doublet distribution)
int * iKw
info about side body wake neighbours iKw[i,j] i - side body-wake neighbour number,...
char File_DAT_date[100]
date and time of mesh with wake file
static int ReadObjs(FILE *f, std::vector< MS2_OBJ > &Objs, int N1=0, float fVer=VERSION)
Reads objects from stream (FILE) f, with offset by N1 panels.
int * iNkw
numbers of panels in Xkw (wake grid)
double dXca25
x coordinate of reference point for moment calculation (usually 0.25 MAC)
void Panels2Points(void)
converts panels (std::vector<PANEL>) to nodes (std::vector<VECTOR_3D>)
double * dAi
coefficient array (N x Nww)
double * dCxi
induced drag coeffcient (from strip)
char File_INP_date[100]
date and time of mesh file
int iNww2
= iNww + iLiczw; # airplane + wake (up) + wake (down 1 panel/strip)
std::vector< MS2_OBJ > Objs
Objects (MS2_OBJ) vector.
int ReadDATw(char *FileName)
reads [.dat] file from pathname FileName - body and wake panels stored in separated arrays (for visua...
int WriteWyn(char *FileName)
writes results array to pathname FileName
int ReadWyn(char *FileName)
reads results array from pathname FileName
double dWsp_sk
scale factor (default: 1)
char TXTfile[256]
pathname of [.txt] file
void InitForPress(void)
initialization of arrays used by Press program
int * iNpas
number of panels in the wake strip [liczw]
void DeleteWyn(void)
erases results objects
int iMaxWakesNumber
maximum of numbers of wake strips
void Array2Panels(void)
converts array (double X[i,j,k]) to panels (std::vector<PANEL>)
std::vector< PANEL > Panels
panels array
double * dVzd
"z" component of induced velocity (from doublet distribution)
double * dQy
tangential undisturbed velocity - y coordinate
void InitRob(void)
initialization of scratch arrays
double * dXkw
side body-wake neighbours (panels)
std::vector< VECTOR_3D > Points
nodes array
int iMaxBodyNeighbours
number of side body-wake neighbours
void Panels2Array(void)
converts panels (std::vector<PANEL>) to array (double X[i,j,k])
double * dSs_rzut
projection areas of panels on plane xy
double * dVxd
"x" component of induced velocity (from doublet distribution)
float fVer
version number of data file [.inp] format: from data file on input, defined in VERSION on output
double * dRh
working area (N)
int iNw
= iN + iLiczw; # airplane + wake (up) (1 panel/strip)
int iNw2
= iNw + iLiczw; # airplane + wake (up+down) (1 panel/strip)
int iMaxWakePanelNumber
maximum number of panels in wake strip
int * iIpas
wake panels numbers in the strip [liczw, MaxWakePanelNumber]
double * dVVVV
undisturbed velocity
int ReadDAT(char *FileName, int iProg)
reads [.dat] file from pathname FileName - body and wake panels stored in dX array iProg: 1 initial...
void SupWyn(void)
computes data for sides centers
double * dCxr
"z" force coefficient acting on the strip
int iNwyn
current number of rows of pdWyniki array
double * pdWyniki[23]
results array - 22 variables x number of panels
double * dQx
tangential undisturbed velocity - x coordinate
double * dCmr
twisting moment coefficient acting on the strip
void InitForPanukl(void)
initialization of arrays used by PANUKL (main program)
double * dSs_cpr
strip area
int iMwyn
current number of columns of pdWyniki array (<=22)
GRID_ARRAYS(void)
default constructor
char File_TXT_date[100]
date and time of results file
int ReadIN2(FILE *File)
reads [.inp] data from stream FILE - data written as nodes
Simple I/O functions class.
class with overloaded "new" operator initializing object with zeros
Vector 3D class - vector manipulation.
This file contains some smart I/O functions.
This file contains some smart functions, operators, macros for safe initializing end erasing the memo...
This file contains declaration of PANEL class.
#define VERSION
VERSION of the data file [.inp] format currently is equal to 4.00
structure that contains data of main airplane objects (wings, fuselage)
std::string Name
name of the object (e.g. "main wing")
std::string NameID
nameID - global object name
int n2
the last panel number in the object
int n1
the first panel number in the object
int ID
global number of the object (e.g. several subobjects with the same ID make up one gobal object)
int iActive
a flag - if the object is active mesh is created
int iType
typw of the object (0 - wing, 1 - fuselage)
int DivNo
number of chord division points
int DivType
chord division type ( see MS2DivType )
int SurfType
wing surface to create ( see MS2WingSurf : WS_ALL = 0, WS_TOP = 1, WS_BOTTOM = 2 )
int iClosingRib
closing rib flag - see MS2WingRibType