BISICLES AMR ice sheet model  0.9
BasalFrictionRelation.H
Go to the documentation of this file.
1 
2 #ifdef CH_LANG_CC
3 /*
4 * _______ __
5 * / ___/ / ___ __ _ / / ___
6 * / /__/ _ \/ _ \/ V \/ _ \/ _ \
7 * \___/_//_/\___/_/_/_/_.__/\___/
8 * Please refer to Copyright.txt, in Chombo's root directory.
9 */
10 #endif
11 
12 #ifndef _BASALFRICTIONRELATION_H_
13 #define _BASALFRICTIONRELATION_H_
14 
15 #include "FArrayBox.H"
16 #include "LevelData.H"
17 #include "NamespaceHeader.H"
18 
19 class LevelSigmaCS;
20 class DataIterator;
21 
23 
28 {
29 public:
30 
31  virtual ~BasalFrictionRelation() {;}
32 
33 
34 
35  virtual void updateThermodynamics( Vector<LevelData<FArrayBox>* >* a_tillWaterDepth )
36  {
37  }
38 
39 
40 
42 
51  virtual void computeAlpha(FArrayBox& a_alpha,
52  const FArrayBox& a_basalVel,
53  const FArrayBox& a_C, const Real& a_scale,
54  const LevelSigmaCS& a_coords,
55  const DataIterator& a_dit,
56  int a_level,
57  const Box& a_box) const = 0;
58 
60 
69  virtual void computeDissipation(FArrayBox& a_dissipation,
70  const FArrayBox& a_basalVel,
71  const FArrayBox& a_C, const Real& a_scale,
72  const LevelSigmaCS& a_coords,
73  const DataIterator& a_dit,
74  int a_level,
75  const Box& a_box) const;
76 
77 
80 
81  virtual Real power() const = 0;
82 
84  static BasalFrictionRelation* parse(const char* a_prefix, int a_recursion );
85 
86 };
87 
88 
90 
120 {
121 public:
122 
124  Real a_fastSlidingSpeed = -1.0,
125  Real a_highThickness = -1.0 ,
126  bool a_includeEffectivePressure = false)
127  : m_m(a_m), m_includeEffectivePressure(a_includeEffectivePressure) ,
128  m_fastSlidingSpeed(a_fastSlidingSpeed), m_highThickness(a_highThickness)
129  {;}
130 
132 
133  virtual void computeAlpha(FArrayBox& a_alpha,
134  const FArrayBox& a_basalVel,
135  const FArrayBox& a_C, const Real& a_scale,
136  const LevelSigmaCS& a_coords,
137  const DataIterator& a_dit,
138  int a_level,
139  const Box& a_box) const;
140 
142  return static_cast<BasalFrictionRelation*> (new BasalFrictionPowerLaw(m_m, m_fastSlidingSpeed, m_highThickness, m_includeEffectivePressure));
143  }
144 
146  virtual Real power() const {return m_m;}
147 
148 private:
149  Real m_m;
150  bool m_includeEffectivePressure;
151  Real m_fastSlidingSpeed; // a scale u_r for fast flow : u >> u_r -> Tb -> a constant
152  Real m_highThickness; // a scale for thickness above flotation
154 
155 };
156 
158 
186 {
187 
188 public:
189  enum Model {Tsai,Leguy,MAX_MODEL};
190 
191 private:
192  Real m_a, m_p, m_maxTillWaterDepth, m_tillPressureFactor;
193  Model m_model;
194  Vector<LevelData<FArrayBox>* >* m_tillWaterDepth;
195  BasalFrictionRelation* m_bfr;
196 
197 public:
198 
199 
200  virtual void computeDissipation(FArrayBox& a_dissipation,
201  const FArrayBox& a_basalVel,
202  const FArrayBox& a_C, const Real& a_scale,
203  const LevelSigmaCS& a_coords,
204  const DataIterator& a_dit,
205  int a_level,
206  const Box& a_box) const;
207 
208  void updateThermodynamics( Vector<LevelData<FArrayBox>* >* a_tillWaterDepth )
209  {
210  m_tillWaterDepth = a_tillWaterDepth;
211  }
212  virtual void computeAlpha(FArrayBox& a_alpha,
213  const FArrayBox& a_basalVel,
214  const FArrayBox& a_C, const Real& a_scale,
215  const LevelSigmaCS& a_coords,
216  const DataIterator& a_dit,
217  int a_level,
218  const Box& a_box) const;
219 
220 
221  PressureLimitedBasalFrictionRelation(Real a_a, Real a_p, Real a_maxTillWaterDepth,
222  Real a_tillPressureFactor,
223  Model a_model, BasalFrictionRelation* a_bfr)
224  : m_a(a_a), m_p(a_p), m_maxTillWaterDepth(a_maxTillWaterDepth),
225  m_tillPressureFactor(a_tillPressureFactor), m_model(a_model),
226  m_bfr(a_bfr->getNewBasalFrictionRelation())
227  {
228 
229  }
230 
231 
233  {
235  new PressureLimitedBasalFrictionRelation(m_a, m_p, m_maxTillWaterDepth,m_tillPressureFactor ,
236  m_model, m_bfr);
237 
238  return static_cast<BasalFrictionRelation*>(ptr);
239  }
240 
241 
242  virtual Real power() const
243  {
244  return m_bfr->power();
245  }
246 
247 };
248 
249 
250 
251 #include "NamespaceFooter.H"
252 
253 #endif
Model
Definition: BasalFrictionRelation.H:189
virtual void updateThermodynamics(Vector< LevelData< FArrayBox > * > *a_tillWaterDepth)
Definition: BasalFrictionRelation.H:35
PressureLimitedBasalFrictionRelation(Real a_a, Real a_p, Real a_maxTillWaterDepth, Real a_tillPressureFactor, Model a_model, BasalFrictionRelation *a_bfr)
Definition: BasalFrictionRelation.H:221
virtual Real power() const =0
virtual BasalFrictionRelation * getNewBasalFrictionRelation() const
creates a new copy of subclass objects.
Definition: BasalFrictionRelation.H:232
Basal friction relation which satisfies Tb = min(|Tb&#39;|, a*p) u/|u|.
Definition: BasalFrictionRelation.H:185
static BasalFrictionRelation * parse(const char *a_prefix, int a_recursion)
Run-time configuration of BasalFrictionRelation objects.
Definition: BasalFrictionRelation.cpp:192
implements BasalFrictionRelation to provide a power law
Definition: BasalFrictionRelation.H:119
virtual void computeAlpha(FArrayBox &a_alpha, const FArrayBox &a_basalVel, const FArrayBox &a_C, const Real &a_scale, const LevelSigmaCS &a_coords, const DataIterator &a_dit, int a_level, const Box &a_box) const =0
Computes cell-centered effective basal friction coeffcient such that .
virtual ~BasalFrictionRelation()
Definition: BasalFrictionRelation.H:31
Basic Sigma fourth-order coordinate system on an AMR level.
Definition: LevelSigmaCS.H:48
Definition: BasalFrictionRelation.H:189
virtual BasalFrictionRelation * getNewBasalFrictionRelation() const =0
creates a new copy of subclass objects.
virtual Real power() const
Definition: BasalFrictionRelation.H:242
Virtual base class for basal friction relations.
Definition: BasalFrictionRelation.H:27
BasalFrictionPowerLaw(Real a_m, Real a_fastSlidingSpeed=-1.0, Real a_highThickness=-1.0, bool a_includeEffectivePressure=false)
Definition: BasalFrictionRelation.H:123
virtual Real power() const
Definition: BasalFrictionRelation.H:146
virtual ~BasalFrictionPowerLaw()
Definition: BasalFrictionRelation.H:131
BasalFrictionRelation * getNewBasalFrictionRelation() const
creates a new copy of subclass objects.
Definition: BasalFrictionRelation.H:141
virtual void computeDissipation(FArrayBox &a_dissipation, const FArrayBox &a_basalVel, const FArrayBox &a_C, const Real &a_scale, const LevelSigmaCS &a_coords, const DataIterator &a_dit, int a_level, const Box &a_box) const
Compute cell-centered dissipation rate .
Definition: BasalFrictionRelation.cpp:29
void updateThermodynamics(Vector< LevelData< FArrayBox > * > *a_tillWaterDepth)
Definition: BasalFrictionRelation.H:208