00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _PhysBCUtil_H_
00033 #define _PhysBCUtil_H_
00034
00035 #include "GhostBC.H"
00036 #include "Tuple.H"
00037 #include "ParmParse.H"
00038 #include "LoHiSide.H"
00039 #include "basicVelBC.H"
00040
00041
00042
00043 #ifdef NEW_ADVECTION
00044 #include "OldPhysIBC.H"
00045 #endif
00046
00047
00049
00057 class PhysBCUtil
00058 {
00059
00060 public:
00061
00062
00063
00064
00065
00066 PhysBCUtil();
00067
00069 virtual ~PhysBCUtil();
00070
00072 enum BCType {
00074 bogusBC = -1,
00076 SolidWall,
00078 Inflow,
00080 Outflow,
00082 Symmetry,
00084 noShear,
00086 Custom,
00088 NUM_PHYS_BC_TYPES};
00089
00090
00091
00093 virtual PhysBCUtil* newPhysBCUtil() const;
00094
00096
00098 virtual DomainGhostBC* MacPressureBC() const;
00099
00101 virtual DomainGhostBC* gradMacPressureBC() const;
00102
00104 virtual DomainGhostBC* LevelPressureBC() const;
00105
00107 virtual DomainGhostBC* gradPiBC() const;
00108
00110 virtual DomainGhostBC* SyncProjBC() const;
00111
00113 virtual DomainGhostBC* gradESyncBC() const;
00114
00116 virtual DomainGhostBC* FreestreamCorrBC() const;
00117
00119 virtual DomainGhostBC* gradELambdaBC() const;
00120
00122 virtual DomainGhostBC* InitialProjBC() const;
00123
00125 virtual DomainGhostBC* gradInitialProjCorrBC() const;
00126
00127
00129
00131 virtual basicVelBC* viscousVelBC() const;
00132
00134 virtual basicVelBC* tracingVelBC() const;
00135
00137 virtual basicEdgeVelBC* advectionVelBC() const;
00138
00140 virtual basicEdgeVelBC* edgeVelBC() const;
00141
00143 virtual basicVelBC* uDelUBC(bool a_isViscous) const;
00144
00146 virtual DomainGhostBC* viscousSolveBC() const;
00147
00148
00150 virtual DomainGhostBC* viscousSolveBC(int a_dir) const;
00151
00153 virtual basicVelBC* uStarBC(bool a_isViscous = true) const;
00154
00156 virtual DomainGhostBC* viscousRefluxBC(int a_dir) const;
00157
00158 #ifdef NEW_ADVECTION
00159
00160 virtual OldPhysIBC* advectionVelIBC() const;
00161 #endif
00162
00164
00166 virtual DomainGhostBC* diffusiveBC(int a_scalarType) const;
00167
00169 virtual DomainGhostBC* scalarTraceBC(int a_scalarType) const;
00170
00172 virtual DomainGhostBC* scalarDiffusionSolveBC(int a_scalarType) const;
00173
00175 virtual DomainGhostBC* scalarRefluxSolveBC(int a_scalarType) const;
00176
00177 #ifdef NEW_ADVECTION
00178
00179 virtual OldPhysIBC* scalarTraceIBC(int a_scalarType) const;
00180 #endif
00181
00183 virtual DomainGhostBC* lambdaBC() const;
00184
00185 #ifdef NEW_ADVECTION
00186
00187 virtual OldPhysIBC* lambdaTraceIBC() const;
00188 #endif
00189
00191
00193 virtual basicVelBC* viscousSrcBC() const;
00194
00196 virtual basicVelBC* diffusiveSrcBC(int scalarType) const;
00197
00198
00199 virtual DomainGhostBC* streamFunctionBC(const Interval& a_comps) const;
00200
00201
00203
00205 void Dx(const Real a_dx);
00206
00208 Real Dx() const;
00209
00211 void Time(const Real a_time);
00212
00214 Real Time() const;
00215
00217 int loBC(int a_dir) const;
00218
00220 int hiBC(int a_dir) const;
00221
00223 int getBC(int a_dir, const Side::LoHiSide& a_side) const;
00224
00226
00231 virtual void computeBoundaryDt(Real& a_dt, Real a_cfl, Real a_dx) const;
00232
00233
00234
00235
00236 protected:
00238 virtual DomainGhostBC* basicPressureBC(bool a_isHomogeneous) const;
00239
00240
00242 virtual DomainGhostBC* basicGradPressureBC() const;
00243
00245 virtual basicVelBC* basicCCVelBC(bool a_isHomogeneous,
00246 bool a_isViscous) const;
00247
00248
00250 virtual void basicCCVelBC(DomainGhostBC& a_newBC,
00251 bool a_isHomogeneous,
00252 bool a_isViscous,
00253 int a_velComponent,
00254 Interval& a_interval) const;
00255
00256
00258 virtual basicEdgeVelBC* basicECVelBC(bool a_isHomogeneous,
00259 bool a_isViscous,
00260 bool a_isSingleComponent) const;
00261
00262
00264 virtual DomainGhostBC* basicScalBC(bool a_isHomogeneous,
00265 int a_scalType) const;
00266
00268 virtual void setBCs();
00269
00270
00271 Tuple<int, SpaceDim> m_loBC;
00272
00273
00274 Tuple<int, SpaceDim> m_hiBC;
00275
00276
00277 private:
00279 Real m_dx;
00280
00282 Real m_time;
00283
00285 PhysBCUtil(const PhysBCUtil& rhs);
00286
00288 virtual PhysBCUtil& operator=(const PhysBCUtil& rhs);
00289
00290
00291
00292 };
00293
00294 #endif
00295
00296