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 "PhysIBC.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(int a_dir) const;
00147
00149 virtual basicVelBC* uStarBC(bool a_isViscous = true) const;
00150
00152 virtual DomainGhostBC* viscousRefluxBC(int a_dir) const;
00153
00154 #ifdef NEW_ADVECTION
00155
00156 virtual PhysIBC* advectionVelIBC() const;
00157 #endif
00158
00160
00162 virtual DomainGhostBC* diffusiveBC(int a_scalarType) const;
00163
00165 virtual DomainGhostBC* scalarTraceBC(int a_scalarType) const;
00166
00168 virtual DomainGhostBC* scalarDiffusionSolveBC(int a_scalarType) const;
00169
00171 virtual DomainGhostBC* scalarRefluxSolveBC(int a_scalarType) const;
00172
00173 #ifdef NEW_ADVECTION
00174
00175 virtual PhysIBC* scalarTraceIBC(int a_scalarType) const;
00176 #endif
00177
00179 virtual DomainGhostBC* lambdaBC() const;
00180
00181 #ifdef NEW_ADVECTION
00182
00183 virtual PhysIBC* lambdaTraceIBC() const;
00184 #endif
00185
00187
00189 virtual basicVelBC* viscousSrcBC() const;
00190
00192 virtual basicVelBC* diffusiveSrcBC(int scalarType) const;
00193
00194
00195 virtual DomainGhostBC* streamFunctionBC(const Interval& a_comps) const;
00196
00197
00199
00201 void Dx(const Real a_dx);
00202
00204 Real Dx() const;
00205
00207 void Time(const Real a_time);
00208
00210 Real Time() const;
00211
00213 int loBC(int a_dir) const;
00214
00216 int hiBC(int a_dir) const;
00217
00219 int getBC(int a_dir, const Side::LoHiSide& a_side) const;
00220
00222
00227 virtual void computeBoundaryDt(Real& a_dt, Real a_cfl, Real a_dx) const;
00228
00229
00230
00231
00232 protected:
00234 virtual DomainGhostBC* basicPressureBC(bool a_isHomogeneous) const;
00235
00236
00238 virtual DomainGhostBC* basicGradPressureBC() const;
00239
00241 virtual basicVelBC* basicCCVelBC(bool a_isHomogeneous,
00242 bool a_isViscous) const;
00243
00244
00246 virtual void basicCCVelBC(DomainGhostBC& a_newBC,
00247 bool a_isHomogeneous,
00248 bool a_isViscous,
00249 int a_velComponent,
00250 Interval& a_interval) const;
00251
00252
00254 virtual basicEdgeVelBC* basicECVelBC(bool a_isHomogeneous,
00255 bool a_isViscous,
00256 bool a_isSingleComponent) const;
00257
00258
00260 virtual DomainGhostBC* basicScalBC(bool a_isHomogeneous,
00261 int a_scalType) const;
00262
00264 virtual void setBCs();
00265
00266
00267 Tuple<int, SpaceDim> m_loBC;
00268
00269
00270 Tuple<int, SpaceDim> m_hiBC;
00271
00272
00273 private:
00275 Real m_dx;
00276
00278 Real m_time;
00279
00281 PhysBCUtil(const PhysBCUtil& rhs);
00282
00284 virtual PhysBCUtil& operator=(const PhysBCUtil& rhs);
00285
00286
00287
00288 };
00289
00290 #endif
00291
00292