Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

PhysBCUtil.H

Go to the documentation of this file.
00001 /* _______              __
00002   / ___/ /  ___  __ _  / /  ___
00003  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004  \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 
00007 // PhysBCUtil.H
00008 
00009 //
00010 // This software is copyright (C) by the Lawrence Berkeley
00011 // National Laboratory.  Permission is granted to reproduce
00012 // this software for non-commercial purposes provided that
00013 // this notice is left intact.
00014 // 
00015 // It is acknowledged that the U.S. Government has rights to
00016 // this software under Contract DE-AC03-765F00098 between
00017 // the U.S.  Department of Energy and the University of
00018 // California.
00019 //
00020 // This software is provided as a professional and academic
00021 // contribution for joint exchange. Thus it is experimental,
00022 // is provided ``as is'', with no warranties of any kind
00023 // whatsoever, no support, no promise of updates, or printed
00024 // documentation. By using this software, you acknowledge
00025 // that the Lawrence Berkeley National Laboratory and
00026 // Regents of the University of California shall have no
00027 // liability with respect to the infringement of other
00028 // copyrights by any part of this software.
00029 //
00030 // Dan Martin, Fri, Jan 14, 2000
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 // include support for *IBC stuff from AMRGodunov, for use with
00042 // PatchGodunov-derived stuff
00043 #ifdef NEW_ADVECTION
00044 #include "PhysIBC.H"
00045 #endif
00046 
00047 
00049 
00057 class PhysBCUtil
00058 {
00059 
00060 public:
00061   /*@ManMemo: this will access the ParmParse database using the
00062     physBC prefix and use it to define the physical BC types (hi 
00063     and lo) in each direction.  The BC type "custom" will imply
00064     that the BC is a somewhat nonstandard one, but that the 
00065     derived class will know what to do with it. */
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   // BC on stream function (used when computing stream func. from vorticity)
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   // contains the enumerated values for the lo-end BC
00267   Tuple<int, SpaceDim> m_loBC;
00268 
00269   // contains the enumerated values for the hi-end BC
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 

Generated on Wed Jun 2 13:53:35 2004 for Chombo&INSwithParticles by doxygen 1.3.2