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 
00042 
00050 class PhysBCUtil
00051 {
00052 
00053 public:
00054   /*@ManMemo: this will access the ParmParse database using the
00055     physBC prefix and use it to define the physical BC types (hi 
00056     and lo) in each direction.  The BC type "custom" will imply
00057     that the BC is a somewhat nonstandard one, but that the 
00058     derived class will know what to do with it. */
00059   PhysBCUtil();
00060 
00062   virtual ~PhysBCUtil();
00063 
00065   enum BCType {
00067     bogusBC = -1,
00069     SolidWall,
00071     Inflow,
00073     Outflow, 
00075     Symmetry,
00077     noShear,
00079     Custom,
00081     NUM_PHYS_BC_TYPES};
00082 
00083 
00084 
00086   virtual PhysBCUtil* newPhysBCUtil() const;
00087 
00089 
00091   virtual DomainGhostBC* MacPressureBC() const;
00092 
00094   virtual DomainGhostBC* gradMacPressureBC() const;
00095 
00097   virtual DomainGhostBC* LevelPressureBC() const;
00098 
00100   virtual DomainGhostBC* gradPiBC() const;
00101 
00103   virtual DomainGhostBC* SyncProjBC() const;
00104 
00106   virtual DomainGhostBC* gradESyncBC() const;
00107 
00109   virtual DomainGhostBC* FreestreamCorrBC() const;
00110 
00112   virtual DomainGhostBC* gradELambdaBC() const;
00113 
00115   virtual DomainGhostBC* InitialProjBC() const;
00116 
00118   virtual DomainGhostBC* gradInitialProjCorrBC() const;
00119 
00120   
00122   
00124   virtual basicVelBC* viscousVelBC() const;
00125 
00127   virtual basicVelBC* tracingVelBC() const;
00128 
00130   virtual basicEdgeVelBC* advectionVelBC() const;
00131 
00133   virtual basicEdgeVelBC* edgeVelBC() const;
00134 
00136   virtual basicVelBC* uDelUBC(bool a_isViscous) const;
00137 
00139   virtual DomainGhostBC* viscousSolveBC(int a_dir) const;
00140 
00142   virtual basicVelBC* uStarBC(bool a_isViscous = true) const;
00143   
00145   virtual DomainGhostBC* viscousRefluxBC(int a_dir) const;
00146 
00147 
00149 
00151   virtual DomainGhostBC* diffusiveBC(int a_scalarType) const;
00152 
00154   virtual DomainGhostBC* scalarTraceBC(int a_scalarType) const;
00155   
00157   virtual DomainGhostBC* scalarDiffusionSolveBC(int a_scalarType) const;
00158 
00160   virtual DomainGhostBC* scalarRefluxSolveBC(int a_scalarType) const;
00161 
00162 
00164   virtual DomainGhostBC* lambdaBC() const;
00165 
00166 
00168 
00170   virtual basicVelBC* viscousSrcBC() const;
00171 
00173   virtual basicVelBC* diffusiveSrcBC(int scalarType) const;
00174 
00175   // BC on stream function (used when computing stream func. from vorticity)
00176   virtual DomainGhostBC* streamFunctionBC(const Interval& a_comps) const;
00177 
00178 
00180 
00182   void Dx(const Real a_dx);
00183 
00185   Real Dx() const;
00186 
00188   void Time(const Real a_time);
00189 
00191   Real Time() const;
00192 
00194   int loBC(int a_dir) const;
00195   
00197   int hiBC(int a_dir) const;
00198 
00200   int getBC(int a_dir, const Side::LoHiSide& a_side) const;
00201 
00203 
00208   virtual void computeBoundaryDt(Real& a_dt, Real a_cfl, Real a_dx) const;
00209 
00210 
00211 
00212 
00213 protected:
00215   virtual DomainGhostBC* basicPressureBC(bool a_isHomogeneous) const;
00216   
00217 
00219   virtual DomainGhostBC* basicGradPressureBC() const;
00220 
00222   virtual basicVelBC* basicCCVelBC(bool a_isHomogeneous,
00223                                    bool a_isViscous) const;
00224 
00225 
00227   virtual void basicCCVelBC(DomainGhostBC& a_newBC,
00228                             bool a_isHomogeneous,
00229                             bool a_isViscous,
00230                             int a_velComponent,
00231                             Interval& a_interval) const;
00232   
00233   
00235   virtual basicEdgeVelBC* basicECVelBC(bool a_isHomogeneous,
00236                                        bool a_isViscous,
00237                                        bool a_isSingleComponent) const;
00238 
00239   
00241   virtual DomainGhostBC* basicScalBC(bool a_isHomogeneous,
00242                                      int a_scalType) const;
00243 
00245   virtual void setBCs();
00246 
00247   // contains the enumerated values for the lo-end BC
00248   Tuple<int, SpaceDim> m_loBC;
00249 
00250   // contains the enumerated values for the hi-end BC
00251   Tuple<int, SpaceDim> m_hiBC;
00252 
00253 
00254 private:
00256   Real m_dx;
00257 
00259   Real m_time;
00260 
00262   PhysBCUtil(const PhysBCUtil& rhs);
00263 
00265   virtual PhysBCUtil& operator=(const PhysBCUtil& rhs);
00266 
00267 
00268 
00269 };
00270 
00271 #endif
00272 
00273 

Generated on Thu Aug 29 11:05:45 2002 for Chombo&INS by doxygen1.2.16