BISICLES AMR ice sheet model  0.9
IceInternalEnergyIBC.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 //
12 // IceInternalEnergyIBC.H
13 // ============
14 //
15 // Virtual bases that extends PhysIBC for internal energy transport. Also provides boundary conditions
16 // needed in the treatment of internal energy diffusion, which need to
17 // be handled quite differently in the layered 2D and full 3D
18 // models.
19 
20 #ifndef _ICEINTERNALENERGY_H_
21 #define _ICEINTERNALENERGY_H_
22 
23 #include "PhysIBC.H"
24 #include "LevelSigmaCS.H"
25 #include "NamespaceHeader.H"
26 
27 class AmrIceBase;
29 class IceInternalEnergyIBC : public PhysIBC
30 {
31 public:
32  virtual ~IceInternalEnergyIBC() {}
33  //Define the object
39  virtual void define(const ProblemDomain& a_domain,
40  const Real& a_dx)
41  {PhysIBC::define(a_domain, a_dx);}
42 
43 
45 
49  virtual PhysIBC* new_physIBC()
50  {return static_cast<PhysIBC*>(new_internalEnergyIBC());}
51 
54 
55 
56  virtual void initialize(LevelData<FArrayBox>& a_U);
57 
60  virtual void basalHeatFlux(LevelData<FArrayBox>& a_flux,
61  const AmrIceBase& a_amrIce,
62  int a_level, Real a_dt)=0;
63 
64 
65 #if BISICLES_Z == BISICLES_LAYERED
66  virtual void initializeIceInternalEnergy(LevelData<FArrayBox>& a_E,
67  LevelData<FArrayBox>& a_tillWaterDepth,
68  LevelData<FArrayBox>& a_surfaceE,
69  LevelData<FArrayBox>& a_basalE,
70  const AmrIceBase& a_amrIce,
71  int a_level, Real a_dt)=0;
72 
73  virtual void setIceInternalEnergyBC(LevelData<FArrayBox>& a_E,
74  LevelData<FArrayBox>& a_tillWaterDepth,
75  LevelData<FArrayBox>& a_surfaceE,
76  LevelData<FArrayBox>& a_basalE,
77  const LevelSigmaCS& a_coordSys)=0;
78 
79 
80 #elif BISICLES_Z == BISICLES_FULLZ
81 #error BISICLES_FULLZ not implemented
82 #endif
83 
85  virtual void primBC(FArrayBox& a_WGdnv,
86  const FArrayBox& a_Wextrap,
87  const FArrayBox& a_W,
88  const int& a_dir,
89  const Side::LoHiSide& a_side,
90  const Real& a_time);
91 
93  virtual void setBdrySlopes(FArrayBox& a_dW,
94  const FArrayBox& a_W,
95  const int& a_dir,
96  const Real& a_time)
97  {
98  // one sided differences
99  }
100 
101 
102  virtual void artViscBC(FArrayBox& a_F,
103  const FArrayBox& a_U,
104  const FArrayBox& a_divVel,
105  const int& a_dir,
106  const Real& a_time)
107  {
108  //shouldn't get to here, so
109  MayDay::Error("IceInternalEnergyIBC::artViscBC not implemented");
110  }
111 
112 
113 };
114 
117 {
118  Real m_T;
119 
120 public:
122  ConstantIceTemperatureIBC(Real a_T) : m_T(a_T) {}
123 
125 
127  virtual void basalHeatFlux(LevelData<FArrayBox>& a_flux,
128  const AmrIceBase& a_amrIce,
129  int a_level, Real a_dt);
130 
131 #if BISICLES_Z == BISICLES_LAYERED
132  virtual void initializeIceInternalEnergy(LevelData<FArrayBox>& a_E,
133  LevelData<FArrayBox>& a_tillWaterDepth,
134  LevelData<FArrayBox>& a_surfaceE,
135  LevelData<FArrayBox>& a_basalE,
136  const AmrIceBase& a_amrIce,
137  int a_level, Real a_dt);
138 
139 
140  virtual void setIceInternalEnergyBC(LevelData<FArrayBox>& a_E,
141  LevelData<FArrayBox>& a_tillWaterDepth,
142  LevelData<FArrayBox>& a_surfaceT,
143  LevelData<FArrayBox>& a_basalT,
144  const LevelSigmaCS& a_coordSys);
145 
146 #elif BISICLES_Z == BISICLES_FULLZ
147 #error BISICLES_FULLZ not implemented
148 #endif
149  void set(Real a_T)
150  {
151  m_T = a_T;
152  }
153  Real T()
154  {
155  return (m_T);
156  }
157 
158 private:
160 
161 };
162 
165 {
166 
167 public:
168 
169  virtual void setIceInternalEnergyBC
170  (LevelData<FArrayBox>& a_E,
171  LevelData<FArrayBox>& a_tillWaterDepth,
172  LevelData<FArrayBox>& a_surfaceE,
173  LevelData<FArrayBox>& a_basalE,
174  const LevelSigmaCS& a_coordSys);
175 
176 };
177 
178 
179 
180 
181 #include "NamespaceFooter.H"
182 #endif
virtual void initializeIceInternalEnergy(LevelData< FArrayBox > &a_E, LevelData< FArrayBox > &a_tillWaterDepth, LevelData< FArrayBox > &a_surfaceE, LevelData< FArrayBox > &a_basalE, const AmrIceBase &a_amrIce, int a_level, Real a_dt)=0
virtual void setBdrySlopes(FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Real &a_time)
Set boundary slopes.
Definition: IceInternalEnergyIBC.H:93
virtual void initialize(LevelData< FArrayBox > &a_U)
Definition: IceInternalEnergyIBC.cpp:86
virtual IceInternalEnergyIBC * new_internalEnergyIBC()=0
same as new_physIBC, except pointer cast to an IceInternalEnergyIBC
virtual ~ConstantIceTemperatureIBC()
Definition: IceInternalEnergyIBC.H:121
virtual 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 fluxes.
Definition: IceInternalEnergyIBC.cpp:93
virtual PhysIBC * new_physIBC()
Factory method - this object is its own factory.
Definition: IceInternalEnergyIBC.H:49
Concrete IceInternalEnergyIBC that sets ice temperature to be constant.
Definition: IceInternalEnergyIBC.H:116
Common virtual base class for internal energy transport IBC.
Definition: IceInternalEnergyIBC.H:29
Real T()
Definition: IceInternalEnergyIBC.H:153
virtual ~IceInternalEnergyIBC()
Definition: IceInternalEnergyIBC.H:32
Basic Sigma fourth-order coordinate system on an AMR level.
Definition: LevelSigmaCS.H:48
Partial implementation of IceInternalEnergyIBC, provides reflection (or periodic) boundary conditions...
Definition: IceInternalEnergyIBC.H:164
virtual void define(const ProblemDomain &a_domain, const Real &a_dx)
Definition: IceInternalEnergyIBC.H:39
abstract base class for amr ice sheet models (AmrIce, AMRIceControl)
Definition: AmrIceBase.H:21
ConstantIceTemperatureIBC(Real a_T)
Definition: IceInternalEnergyIBC.H:122
virtual void artViscBC(FArrayBox &a_F, const FArrayBox &a_U, const FArrayBox &a_divVel, const int &a_dir, const Real &a_time)
Definition: IceInternalEnergyIBC.H:102
virtual void basalHeatFlux(LevelData< FArrayBox > &a_flux, const AmrIceBase &a_amrIce, int a_level, Real a_dt)=0
virtual void setIceInternalEnergyBC(LevelData< FArrayBox > &a_E, LevelData< FArrayBox > &a_tillWaterDepth, LevelData< FArrayBox > &a_surfaceE, LevelData< FArrayBox > &a_basalE, const LevelSigmaCS &a_coordSys)=0