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 "OldPhysIBC.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() 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   // BC on stream function (used when computing stream func. from vorticity)
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   // contains the enumerated values for the lo-end BC
00271   Tuple<int, SpaceDim> m_loBC;
00272 
00273   // contains the enumerated values for the hi-end BC
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 

Generated on Wed Jan 19 17:51:26 2005 for Chombo&INSwithParticles by doxygen1.2.16