Chombo + EB + MF  3.2
ExplosionIBC.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _EXPLOSIONIBC_H_
12 #define _EXPLOSIONIBC_H_
13 
14 #include <iostream>
15 
16 #include "LevelData.H"
17 #include "FArrayBox.H"
18 #include "Vector.H"
19 #include "RealVect.H"
20 #include "AMRIO.H"
21 #include "PhysIBC.H"
22 
23 #include "SolidBCF_F.H"
24 
25 #include "NamespaceHeader.H"
26 
27 /// Example of an circular/spherical explosion
28 /**
29  Parameters:
30  a_smallPressure - Lower limit for pressure (returned)
31  a_gamma - Gamma for polytropic, gamma-law gas
32  a_ms - Mach shock number of the discontinuity
33  a_center - Center of the explosion
34  a_size - Initial radius of the explosion
35  a_velocity - Initial velocity of the system
36  a_artvisc - Artificial viscosity coefficient
37  */
38 class ExplosionIBC: public PhysIBC
39 {
40 public:
41  /// Null constructor
42  /**
43  */
44  ExplosionIBC();
45 
46  /// Constructor which defines parameters used by Fortran routines
47  /**
48  */
49  ExplosionIBC(Real& a_smallPressure,
50  const Real& a_gamma,
51  const Real& a_ms,
52  const RealVect& a_center,
53  const Real& a_size,
54  const RealVect& a_velocity,
55  const Real& a_artvisc);
56 
57  /// Destructor
58  /**
59  */
60  virtual ~ExplosionIBC();
61 
62  /// Sets parameters in a common block used by Fortran routines
63  /**
64  */
65  void setFortranCommon(Real& a_smallPressure,
66  const Real& a_gamma,
67  const Real& a_ms,
68  const RealVect& a_center,
69  const Real& a_size,
70  const RealVect& a_velocity,
71  const Real& a_artvisc);
72 
73  /// Factory method - this object is its own factory
74  /**
75  Return a pointer to a new PhysIBC object with m_isDefined = false (i.e.,
76  its define() must be called before it is used) and m_isFortranCommonSet
77  set to value of m_isFortranCommonset in the current (factory) object.
78  */
80 
81  /// Set up initial conditions
82  /**
83  */
85 
86  /// Set boundary primitive values.
87  /**
88  */
89  void primBC(FArrayBox& a_WGdnv,
90  const FArrayBox& a_Wextrap,
91  const FArrayBox& a_W,
92  const int& a_dir,
93  const Side::LoHiSide& a_side,
94  const Real& a_time);
95 
96  /// Set boundary slopes
97  /**
98  The boundary slopes in a_dW are already set to one sided difference
99  approximations. If this function doesn't change them they will be
100  used for the slopes at the boundaries.
101  */
102  void setBdrySlopes(FArrayBox& a_dW,
103  const FArrayBox& a_W,
104  const int& a_dir,
105  const Real& a_time);
106 
107  /// Adjust boundary fluxes to account for artificial viscosity
108  /**
109  */
110  void artViscBC(FArrayBox& a_F,
111  const FArrayBox& a_U,
112  const FArrayBox& a_divVel,
113  const int& a_dir,
114  const Real& a_time);
115 
116 
117 protected:
118  // True if the Fortran common block has been set
120 };
121 
122 #include "NamespaceFooter.H"
123 
124 #endif
virtual ~ExplosionIBC()
Destructor.
void primBC(FArrayBox &a_WGdnv, const FArrayBox &a_Wextrap, const FArrayBox &a_W, const int &a_dir, const Side::LoHiSide &a_side, const Real &a_time)
Set boundary primitive values.
bool m_isFortranCommonSet
Definition: ExplosionIBC.H:119
PhysIBC * new_physIBC()
Factory method - this object is its own factory.
void setBdrySlopes(FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Real &a_time)
Set boundary slopes.
double Real
Definition: REAL.H:33
void initialize(LevelData< FArrayBox > &a_U)
Set up initial conditions.
void setFortranCommon(Real &a_smallPressure, const Real &a_gamma, const Real &a_ms, const RealVect &a_center, const Real &a_size, const RealVect &a_velocity, const Real &a_artvisc)
Sets parameters in a common block used by Fortran routines.
LoHiSide
Definition: LoHiSide.H:27
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Example of an circular/spherical explosion.
Definition: ExplosionIBC.H:38
Definition: FArrayBox.H:45
ExplosionIBC()
Null constructor.
Physical/domain initial and boundary conditions.
Definition: PhysIBC.H:33
void artViscBC(FArrayBox &a_F, const FArrayBox &a_U, const FArrayBox &a_divVel, const int &a_dir, const Real &a_time)
Adjust boundary fluxes to account for artificial viscosity.