Unstruct2D  1.0
Solution of 2-D Euler- and Navier-Stokes Equations on Unstructured Triangular Grids
 All Classes Files Functions Variables Typedefs Enumerations Macros
bndConds.h
Go to the documentation of this file.
1 //*****************************************************************************
6 //
7 // (c) J. Blazek, CFD Consulting & Analysis, www.cfd-ca.de
8 // Created February 15, 2014
9 // Last modification: July 18, 2014
10 //
11 //=============================================================================
12 //
13 // This program is free software; you can redistribute it and/or
14 // modify it under the terms of the GNU General Public License
15 // as published by the Free Software Foundation; either version 2
16 // of the License, or (at your option) any later version.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 //
27 //*****************************************************************************
28 
29 #ifndef BNDCONDS_H_INCLUDED
30 #define BNDCONDS_H_INCLUDED
31 
32 #include "defs.h"
33 #include "fluidProps.h"
34 #include "geometry.h"
35 #include "precond.h"
36 
42 class BndConds
43 {
44 public:
45 
48  // boundary conditions - external flow
49 
50  bool vortCorr;
52  alpha,
53  pinf,
54  tinf,
55  rhoinf,
56  uinf,
57  vinf,
58  qinf,
59  cl;
61  // boundary conditions - internal flow
62 
64  ttinl,
65  betainl,
66  betaout,
67  p12rat,
68  pout;
70  // functions
71 
72  BndConds();
73  ~BndConds();
74  void AllocateMemory( const Geometry &geometry );
75  void BoundaryConditions( const Geometry &geometry, FluidProps &fluidProps,
76  const Precond &precond );
77  static void Periodic( const Geometry &geometry, CONSVARS var[] );
78  static void Periodic( const Geometry &geometry, PRIMVARS var[] );
79  static void Periodic( const Geometry &geometry, REAL var1[], REAL var2[] );
80  static void Periodic( const Geometry &geometry, int var[] );
81  static void ZeroResiduals( const Geometry &geometry, Equations equsType, CONSVARS rhs[] );
82 
83 private:
84 
85  PRIMVARS *bndVals;
87  // functions
88 
89  BndConds( const BndConds &bndConds ); // override default copy constructor
90  BndConds & operator = (const BndConds &bndConds); // and assignment operator
91  void BcondInflow( const Geometry &geometry, FluidProps &fluidProps, int ibegn, int iendn ) const;
92  void BcondOutflow( const Geometry &geometry, FluidProps &fluidProps, int ibegn, int iendn ) const;
93  void BcondFarfield( const Geometry &geometry, FluidProps &fluidProps,
94  const Precond &precond, int ibegn, int iendn );
95  void BcondWallVisc( const Geometry &geometry, FluidProps &fluidProps, int ibegn, int iendn ) const;
96 };
97 
98 #endif // BNDCONDS_H_INCLUDED
FlowType flowType
Definition: bndConds.h:46
REAL ptinl
Definition: bndConds.h:63
REAL qinf
Definition: bndConds.h:51
void AllocateMemory(const Geometry &geometry)
Definition: bndConds.cpp:79
Definition: fluidProps.h:39
REAL betaout
Definition: bndConds.h:63
bool vortCorr
Definition: bndConds.h:50
REAL vinf
Definition: bndConds.h:51
Definition: bndConds.h:42
BndConds()
Definition: bndConds.cpp:35
REAL uinf
Definition: bndConds.h:51
REAL machinf
Definition: bndConds.h:51
Primitive variables. All quantities are in SI units.
Definition: defs.h:89
REAL ttinl
Definition: bndConds.h:63
Definition: geometry.h:41
REAL pinf
Definition: bndConds.h:51
static void Periodic(const Geometry &geometry, CONSVARS var[])
Definition: periodic.cpp:38
REAL tinf
Definition: bndConds.h:51
FlowType
Types of fluid flow.
Definition: defs.h:36
REAL alpha
Definition: bndConds.h:51
Definition: precond.h:40
REAL cl
Definition: bndConds.h:51
REAL betainl
Definition: bndConds.h:63
REAL pout
Definition: bndConds.h:63
~BndConds()
Definition: bndConds.cpp:67
Conserved variables. All quantities are in SI units.
Definition: defs.h:80
REAL rhoinf
Definition: bndConds.h:51
double REAL
Definition: defs.h:58
static void ZeroResiduals(const Geometry &geometry, Equations equsType, CONSVARS rhs[])
Definition: zeroResiduals.cpp:38
REAL p12rat
Definition: bndConds.h:63
void BoundaryConditions(const Geometry &geometry, FluidProps &fluidProps, const Precond &precond)
Definition: boundaryConditions.cpp:39
Equations
Kind of equations solved.
Definition: defs.h:39