ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ERF_MakeTauTerms.cpp File Reference
#include <AMReX_ArrayLim.H>
#include <AMReX_BCRec.H>
#include <AMReX_GpuContainers.H>
#include <ERF_TI_slow_headers.H>
#include <ERF_EOS.H>
#include <ERF_Utils.H>
Include dependency graph for ERF_MakeTauTerms.cpp:

Functions

void erf_make_tau_terms (int level, int nrk, const Vector< BCRec > &domain_bcs_type_h, std::unique_ptr< MultiFab > &z_phys_nd, Vector< MultiFab > &S_data, const MultiFab &xvel, const MultiFab &yvel, const MultiFab &zvel, MultiFab *Tau11, MultiFab *Tau22, MultiFab *Tau33, MultiFab *Tau12, MultiFab *Tau13, MultiFab *Tau21, MultiFab *Tau23, MultiFab *Tau31, MultiFab *Tau32, MultiFab *SmnSmn, MultiFab *eddyDiffs, const Geometry geom, const SolverChoice &solverChoice, std::unique_ptr< ABLMost > &most, std::unique_ptr< MultiFab > &detJ, std::unique_ptr< MultiFab > &mapfac_m, std::unique_ptr< MultiFab > &mapfac_u, std::unique_ptr< MultiFab > &mapfac_v)
 

Function Documentation

◆ erf_make_tau_terms()

void erf_make_tau_terms ( int  level,
int  nrk,
const Vector< BCRec > &  domain_bcs_type_h,
std::unique_ptr< MultiFab > &  z_phys_nd,
Vector< MultiFab > &  S_data,
const MultiFab &  xvel,
const MultiFab &  yvel,
const MultiFab &  zvel,
MultiFab *  Tau11,
MultiFab *  Tau22,
MultiFab *  Tau33,
MultiFab *  Tau12,
MultiFab *  Tau13,
MultiFab *  Tau21,
MultiFab *  Tau23,
MultiFab *  Tau31,
MultiFab *  Tau32,
MultiFab *  SmnSmn,
MultiFab *  eddyDiffs,
const Geometry  geom,
const SolverChoice solverChoice,
std::unique_ptr< ABLMost > &  most,
std::unique_ptr< MultiFab > &  detJ,
std::unique_ptr< MultiFab > &  mapfac_m,
std::unique_ptr< MultiFab > &  mapfac_u,
std::unique_ptr< MultiFab > &  mapfac_v 
)
31 {
32  BL_PROFILE_REGION("erf_make_tau_terms()");
33 
34  const BCRec* bc_ptr_h = domain_bcs_type_h.data();
35 
36  DiffChoice dc = solverChoice.diffChoice;
37  TurbChoice tc = solverChoice.turbChoice[level];
38 
39  const bool l_use_terrain_fitted_coords = (solverChoice.mesh_type != MeshType::ConstantDz);
40  const bool l_moving_terrain = (solverChoice.terrain_type == TerrainType::MovingFittedMesh);
41  if (l_moving_terrain) AMREX_ALWAYS_ASSERT (l_use_terrain_fitted_coords);
42 
43 
44  const bool l_use_diff = ( (dc.molec_diff_type != MolecDiffType::None) ||
45  (tc.les_type != LESType::None) ||
46  (tc.rans_type != RANSType::None) ||
47  (tc.pbl_type != PBLType::None) );
48  const bool l_use_constAlpha = ( dc.molec_diff_type == MolecDiffType::ConstantAlpha );
49  const bool l_use_turb = ( tc.les_type == LESType::Smagorinsky ||
50  tc.les_type == LESType::Deardorff ||
51  tc.rans_type == RANSType::kEqn ||
52  tc.pbl_type == PBLType::MYNN25 ||
53  tc.pbl_type == PBLType::MYNNEDMF ||
54  tc.pbl_type == PBLType::YSU );
55 
56  const bool need_SmnSmn = (tc.les_type == LESType::Deardorff ||
57  tc.rans_type == RANSType::kEqn);
58 
59  const bool use_most = (most != nullptr);
60  const bool exp_most = (solverChoice.use_explicit_most);
61  const bool rot_most = (solverChoice.use_rotate_most);
62 
63  const Box& domain = geom.Domain();
64  const int domlo_z = domain.smallEnd(2);
65  const int domhi_z = domain.bigEnd(2);
66 
67  const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
68 
69  // *****************************************************************************
70  // Pre-computed quantities
71  // *****************************************************************************
72  int nvars = S_data[IntVars::cons].nComp();
73  const BoxArray& ba = S_data[IntVars::cons].boxArray();
74  const DistributionMapping& dm = S_data[IntVars::cons].DistributionMap();
75 
76  std::unique_ptr<MultiFab> expr;
77  std::unique_ptr<MultiFab> dflux_x;
78  std::unique_ptr<MultiFab> dflux_y;
79  std::unique_ptr<MultiFab> dflux_z;
80 
81  if (l_use_diff) {
82  expr = std::make_unique<MultiFab>(ba , dm, 1, IntVect(1,1,1));
83  dflux_x = std::make_unique<MultiFab>(convert(ba,IntVect(1,0,0)), dm, nvars, 0);
84  dflux_y = std::make_unique<MultiFab>(convert(ba,IntVect(0,1,0)), dm, nvars, 0);
85  dflux_z = std::make_unique<MultiFab>(convert(ba,IntVect(0,0,1)), dm, nvars, 0);
86 
87  // if using constant alpha (mu = rho * alpha), then first divide by the
88  // reference density -- mu_eff will be scaled by the instantaneous
89  // local density later when ComputeStress*Visc_*() is called
90  Real mu_eff = (l_use_constAlpha) ? 2.0 * dc.dynamic_viscosity / dc.rho0_trans
91  : 2.0 * dc.dynamic_viscosity;
92 
93 #ifdef _OPENMP
94 #pragma omp parallel if (Gpu::notInLaunchRegion())
95 #endif
96  for ( MFIter mfi(S_data[IntVars::cons],TileNoZ()); mfi.isValid(); ++mfi)
97  {
98  const Box& bx = mfi.tilebox();
99  const Box& valid_bx = mfi.validbox();
100 
101  // Velocities
102  const Array4<const Real> & u = xvel.array(mfi);
103  const Array4<const Real> & v = yvel.array(mfi);
104  const Array4<const Real> & w = zvel.array(mfi);
105 
106  // Map factors
107  const Array4<const Real>& mf_m = mapfac_m->const_array(mfi);
108  const Array4<const Real>& mf_u = mapfac_u->const_array(mfi);
109  const Array4<const Real>& mf_v = mapfac_v->const_array(mfi);
110 
111  // Eddy viscosity
112  const Array4<Real const>& mu_turb = l_use_turb ? eddyDiffs->const_array(mfi) : Array4<const Real>{};
113  const Array4<Real const>& cell_data = l_use_constAlpha ? S_data[IntVars::cons].const_array(mfi) : Array4<const Real>{};
114 
115  // Terrain metrics
116  const Array4<const Real>& z_nd = z_phys_nd->const_array(mfi);
117  const Array4<const Real>& detJ_arr = detJ->const_array(mfi);
118 
119  //-------------------------------------------------------------------------------
120  // NOTE: Tile boxes with terrain are not intuitive. The linear combination of
121  // stress terms requires care. Create a tile box that intersects the
122  // valid box, then grow the box in x/y. Compute the strain on the local
123  // FAB over this grown tile box. Compute the stress over the tile box,
124  // except tau_ii which still needs the halo cells. Finally, write from
125  // the local FAB to the Tau MF but only on the tile box.
126  //-------------------------------------------------------------------------------
127 
128  //-------------------------------------------------------------------------------
129  // TODO: Avoid recomputing strain on the first RK stage. One could populate
130  // the FABs with tau_ij, compute stress, and then write to tau_ij. The
131  // problem with this approach is you will over-write the needed halo layer
132  // needed by subsequent tile boxes (particularly S_ii becomes Tau_ii).
133  //-------------------------------------------------------------------------------
134 
135  // Strain/Stress tile boxes
136  Box bxcc = mfi.tilebox();
137  Box tbxxy = mfi.tilebox(IntVect(1,1,0));
138  Box tbxxz = mfi.tilebox(IntVect(1,0,1));
139  Box tbxyz = mfi.tilebox(IntVect(0,1,1));
140 
141  // We need a halo cell for terrain
142  bxcc.grow(IntVect(1,1,0));
143  tbxxy.grow(IntVect(1,1,0));
144  tbxxz.grow(IntVect(1,1,0));
145  tbxyz.grow(IntVect(1,1,0));
146 
147  if (bxcc.smallEnd(2) != domain.smallEnd(2)) {
148  bxcc.growLo(2,1);
149  tbxxy.growLo(2,1);
150  tbxxz.growLo(2,1);
151  tbxyz.growLo(2,1);
152  }
153 
154  if (bxcc.bigEnd(2) != domain.bigEnd(2)) {
155  bxcc.growHi(2,1);
156  tbxxy.growHi(2,1);
157  tbxxz.growHi(2,1);
158  tbxyz.growHi(2,1);
159  }
160 
161  // Expansion rate
162  Array4<Real> er_arr = expr->array(mfi);
163 
164  // Temporary storage for tiling/OMP
165  FArrayBox S11,S22,S33;
166  FArrayBox S12,S13,S23;
167  S11.resize( bxcc,1,The_Async_Arena()); S22.resize(bxcc,1,The_Async_Arena()); S33.resize(bxcc,1,The_Async_Arena());
168  S12.resize(tbxxy,1,The_Async_Arena()); S13.resize(tbxxz,1,The_Async_Arena()); S23.resize(tbxyz,1,The_Async_Arena());
169  Array4<Real> s11 = S11.array(); Array4<Real> s22 = S22.array(); Array4<Real> s33 = S33.array();
170  Array4<Real> s12 = S12.array(); Array4<Real> s13 = S13.array(); Array4<Real> s23 = S23.array();
171 
172  // Symmetric strain/stresses
173  Array4<Real> tau11 = Tau11->array(mfi); Array4<Real> tau22 = Tau22->array(mfi); Array4<Real> tau33 = Tau33->array(mfi);
174  Array4<Real> tau12 = Tau12->array(mfi); Array4<Real> tau13 = Tau13->array(mfi); Array4<Real> tau23 = Tau23->array(mfi);
175 
176  // Strain magnitude
177  Array4<Real> SmnSmn_a;
178 
179  if (l_use_terrain_fitted_coords) {
180  // Terrain non-symmetric terms
181  FArrayBox S21,S31,S32;
182  S21.resize(tbxxy,1,The_Async_Arena()); S31.resize(tbxxz,1,The_Async_Arena()); S32.resize(tbxyz,1,The_Async_Arena());
183  Array4<Real> s21 = S21.array(); Array4<Real> s31 = S31.array(); Array4<Real> s32 = S32.array();
184  Array4<Real> tau21 = Tau21->array(mfi); Array4<Real> tau31 = Tau31->array(mfi); Array4<Real> tau32 = Tau32->array(mfi);
185 
186 
187  // *****************************************************************************
188  // Expansion rate compute terrain
189  // *****************************************************************************
190  {
191  BL_PROFILE("slow_rhs_making_er_T");
192  Box gbxo = surroundingNodes(bxcc,2);
193 
194  // We make a temporary container for contravariant velocity Omega here
195  // -- it is only used to compute er_arr below
196  FArrayBox Omega;
197  Omega.resize(gbxo,1,The_Async_Arena());
198 
199  // First create Omega using velocity (not momentum)
200  Array4<Real> omega_arr = Omega.array();
201  ParallelFor(gbxo, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
202  {
203  omega_arr(i,j,k) = (k == 0) ? 0. : OmegaFromW(i,j,k,w(i,j,k),u,v,z_nd,dxInv);
204  });
205 
206  ParallelFor(bxcc, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
207  {
208 
209  Real met_u_h_zeta_hi = Compute_h_zeta_AtIface(i+1, j , k, dxInv, z_nd);
210  Real met_u_h_zeta_lo = Compute_h_zeta_AtIface(i , j , k, dxInv, z_nd);
211 
212  Real met_v_h_zeta_hi = Compute_h_zeta_AtJface(i , j+1, k, dxInv, z_nd);
213  Real met_v_h_zeta_lo = Compute_h_zeta_AtJface(i , j , k, dxInv, z_nd);
214 
215  Real Omega_hi = omega_arr(i,j,k+1);
216  Real Omega_lo = omega_arr(i,j,k );
217 
218  Real mfsq = mf_m(i,j,0)*mf_m(i,j,0);
219 
220  Real expansionRate = (u(i+1,j ,k)/mf_u(i+1,j,0)*met_u_h_zeta_hi - u(i,j,k)/mf_u(i,j,0)*met_u_h_zeta_lo)*dxInv[0]*mfsq +
221  (v(i ,j+1,k)/mf_v(i,j+1,0)*met_v_h_zeta_hi - v(i,j,k)/mf_v(i,j,0)*met_v_h_zeta_lo)*dxInv[1]*mfsq +
222  (Omega_hi - Omega_lo)*dxInv[2];
223 
224  er_arr(i,j,k) = expansionRate / detJ_arr(i,j,k);
225  });
226  } // end profile
227 
228  // *****************************************************************************
229  // Strain tensor compute terrain
230  // *****************************************************************************
231  {
232  BL_PROFILE("slow_rhs_making_strain_T");
233  ComputeStrain_T(bxcc, tbxxy, tbxxz, tbxyz, domain,
234  u, v, w,
235  s11, s22, s33,
236  s12, s13,
237  s21, s23,
238  s31, s32,
239  z_nd, detJ_arr, bc_ptr_h, dxInv,
240  mf_m, mf_u, mf_v);
241  } // profile
242 
243  // Populate SmnSmn if using Deardorff or k-eqn RANS (used as diff src in post)
244  // and in the first RK stage (TKE tendencies constant for nrk>0, following WRF)
245  if ((nrk==0) && (need_SmnSmn)) {
246  SmnSmn_a = SmnSmn->array(mfi);
247  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
248  {
249  SmnSmn_a(i,j,k) = ComputeSmnSmn(i,j,k,
250  s11,s22,s33,
251  s12,s13,s23,
252  domlo_z,use_most,exp_most);
253  });
254  }
255 
256  // We've updated the strains at all locations including the
257  // surface. This is required to get the correct strain-rate
258  // magnitude. Now, update the stress everywhere but the surface
259  // to retain the values set by MOST.
260  if (use_most && exp_most) {
261  // Don't overwrite modeled total stress value at boundary
262  tbxxz.setSmall(2,1);
263  tbxyz.setSmall(2,1);
264  if (rot_most) {
265  bxcc.setSmall(2,1);
266  tbxxy.setSmall(2,1);
267  }
268  }
269 
270  // *****************************************************************************
271  // Stress tensor compute terrain
272  // *****************************************************************************
273  {
274  BL_PROFILE("slow_rhs_making_stress_T");
275 
276  // Remove Halo cells just for tau_ij comps
277  tbxxy.grow(IntVect(-1,-1,0));
278  tbxxz.grow(IntVect(-1,-1,0));
279  tbxyz.grow(IntVect(-1,-1,0));
280 
281  if (!l_use_turb) {
282  ComputeStressConsVisc_T(bxcc, tbxxy, tbxxz, tbxyz, mu_eff,
283  cell_data,
284  s11, s22, s33,
285  s12, s13,
286  s21, s23,
287  s31, s32,
288  er_arr, z_nd, detJ_arr, dxInv);
289  } else {
290  ComputeStressVarVisc_T(bxcc, tbxxy, tbxxz, tbxyz, mu_eff, mu_turb,
291  cell_data,
292  s11, s22, s33,
293  s12, s13,
294  s21, s23,
295  s31, s32,
296  er_arr, z_nd, detJ_arr, dxInv);
297  }
298 
299  // Remove halo cells from tau_ii but extend across valid_box bdry
300  bxcc.grow(IntVect(-1,-1,0));
301  if (bxcc.smallEnd(0) == valid_bx.smallEnd(0)) bxcc.growLo(0, 1);
302  if (bxcc.bigEnd(0) == valid_bx.bigEnd(0)) bxcc.growHi(0, 1);
303  if (bxcc.smallEnd(1) == valid_bx.smallEnd(1)) bxcc.growLo(1, 1);
304  if (bxcc.bigEnd(1) == valid_bx.bigEnd(1)) bxcc.growHi(1, 1);
305 
306  // Copy from temp FABs back to tau
307  ParallelFor(bxcc,
308  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
309  tau11(i,j,k) = s11(i,j,k);
310  tau22(i,j,k) = s22(i,j,k);
311  tau33(i,j,k) = s33(i,j,k);
312  });
313 
314  ParallelFor(tbxxy, tbxxz, tbxyz,
315  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
316  tau12(i,j,k) = s12(i,j,k);
317  tau21(i,j,k) = s21(i,j,k);
318  },
319  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
320  tau13(i,j,k) = s13(i,j,k);
321  tau31(i,j,k) = s31(i,j,k);
322  },
323  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
324  tau23(i,j,k) = s23(i,j,k);
325  tau32(i,j,k) = s32(i,j,k);
326  });
327  } // end profile
328 
329  } else {
330 
331  // *****************************************************************************
332  // Expansion rate compute no terrain
333  // *****************************************************************************
334  {
335  BL_PROFILE("slow_rhs_making_er_N");
336  ParallelFor(bxcc, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
337  Real mfsq = mf_m(i,j,0)*mf_m(i,j,0);
338  er_arr(i,j,k) = (u(i+1, j , k )/mf_u(i+1,j,0) - u(i, j, k)/mf_u(i,j,0))*dxInv[0]*mfsq +
339  (v(i , j+1, k )/mf_v(i,j+1,0) - v(i, j, k)/mf_v(i,j,0))*dxInv[1]*mfsq +
340  (w(i , j , k+1) - w(i, j, k))*dxInv[2];
341  });
342  } // end profile
343 
344 
345  // *****************************************************************************
346  // Strain tensor compute no terrain
347  // *****************************************************************************
348  {
349  BL_PROFILE("slow_rhs_making_strain_N");
350  ComputeStrain_N(bxcc, tbxxy, tbxxz, tbxyz, domain,
351  u, v, w,
352  s11, s22, s33,
353  s12, s13, s23,
354  bc_ptr_h, dxInv,
355  mf_m, mf_u, mf_v);
356  } // end profile
357 
358  // Populate SmnSmn if using Deardorff or k-eqn RANS (used as diff src in post)
359  // and in the first RK stage (TKE tendencies constant for nrk>0, following WRF)
360  if ((nrk==0) && (need_SmnSmn)) {
361  SmnSmn_a = SmnSmn->array(mfi);
362  ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
363  {
364  SmnSmn_a(i,j,k) = ComputeSmnSmn(i,j,k,
365  s11,s22,s33,
366  s12,s13,s23,
367  domlo_z,use_most,exp_most);
368  });
369  }
370 
371  // We've updated the strains at all locations including the
372  // surface. This is required to get the correct strain-rate
373  // magnitude. Now, update the stress everywhere but the surface
374  // to retain the values set by MOST.
375  if (use_most && exp_most) {
376  // Don't overwrite modeled total stress value at boundary
377  tbxxz.setSmall(2,1);
378  tbxyz.setSmall(2,1);
379  }
380 
381  // *****************************************************************************
382  // Stress tensor compute no terrain
383  // *****************************************************************************
384  {
385  BL_PROFILE("slow_rhs_making_stress_N");
386 
387  // Remove Halo cells just for tau_ij comps
388  tbxxy.grow(IntVect(-1,-1,0));
389  tbxxz.grow(IntVect(-1,-1,0));
390  tbxyz.grow(IntVect(-1,-1,0));
391  if (tbxxy.smallEnd(2) > domlo_z) {
392  tbxxy.growLo(2,-1);
393  tbxxz.growLo(2,-1);
394  tbxyz.growLo(2,-1);
395  }
396  if (tbxxy.bigEnd(2) < domhi_z) {
397  tbxxy.growHi(2,-1);
398  tbxxz.growHi(2,-1);
399  tbxyz.growHi(2,-1);
400  }
401 
402  if (!l_use_turb) {
403  ComputeStressConsVisc_N(bxcc, tbxxy, tbxxz, tbxyz, mu_eff,
404  cell_data,
405  s11, s22, s33,
406  s12, s13, s23,
407  er_arr);
408  } else {
409  ComputeStressVarVisc_N(bxcc, tbxxy, tbxxz, tbxyz, mu_eff, mu_turb,
410  cell_data,
411  s11, s22, s33,
412  s12, s13, s23,
413  er_arr);
414  }
415 
416  // Remove halo cells from tau_ii but extend across valid_box bdry
417  bxcc.grow(IntVect(-1,-1,0));
418  if (bxcc.smallEnd(0) == valid_bx.smallEnd(0)) bxcc.growLo(0, 1);
419  if (bxcc.bigEnd(0) == valid_bx.bigEnd(0)) bxcc.growHi(0, 1);
420  if (bxcc.smallEnd(1) == valid_bx.smallEnd(1)) bxcc.growLo(1, 1);
421  if (bxcc.bigEnd(1) == valid_bx.bigEnd(1)) bxcc.growHi(1, 1);
422 
423  // Copy from temp FABs back to tau
424  ParallelFor(bxcc,
425  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
426  tau11(i,j,k) = s11(i,j,k);
427  tau22(i,j,k) = s22(i,j,k);
428  tau33(i,j,k) = s33(i,j,k);
429  });
430  ParallelFor(tbxxy, tbxxz, tbxyz,
431  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
432  tau12(i,j,k) = s12(i,j,k);
433  },
434  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
435  tau13(i,j,k) = s13(i,j,k);
436  },
437  [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept {
438  tau23(i,j,k) = s23(i,j,k);
439  });
440  } // end profile
441  } // l_use_terrain_fitted_coords
442  } // MFIter
443  } // l_use_diff
444 }
void ComputeStrain_N(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Box domain, const Array4< const Real > &u, const Array4< const Real > &v, const Array4< const Real > &w, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau23, const BCRec *bc_ptr, const GpuArray< Real, AMREX_SPACEDIM > &dxInv, const Array4< const Real > &mf_m, const Array4< const Real > &mf_u, const Array4< const Real > &mf_v)
Definition: ERF_ComputeStrain_N.cpp:28
void ComputeStrain_T(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Box domain, const Array4< const Real > &u, const Array4< const Real > &v, const Array4< const Real > &w, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau21, Array4< Real > &tau23, Array4< Real > &tau31, Array4< Real > &tau32, const Array4< const Real > &z_nd, const Array4< const Real > &detJ, const BCRec *bc_ptr, const GpuArray< Real, AMREX_SPACEDIM > &dxInv, const Array4< const Real > &mf_m, const Array4< const Real > &mf_u, const Array4< const Real > &mf_v)
Definition: ERF_ComputeStrain_T.cpp:33
void ComputeStressVarVisc_N(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &mu_turb, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau23, const Array4< const Real > &er_arr)
Definition: ERF_ComputeStress_N.cpp:105
void ComputeStressConsVisc_N(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau23, const Array4< const Real > &er_arr)
Definition: ERF_ComputeStress_N.cpp:23
void ComputeStressVarVisc_T(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &mu_turb, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau21, Array4< Real > &tau23, Array4< Real > &tau31, Array4< Real > &tau32, const Array4< const Real > &er_arr, const Array4< const Real > &z_nd, const Array4< const Real > &detJ, const GpuArray< Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_ComputeStress_T.cpp:303
void ComputeStressConsVisc_T(Box bxcc, Box tbxxy, Box tbxxz, Box tbxyz, Real mu_eff, const Array4< const Real > &cell_data, Array4< Real > &tau11, Array4< Real > &tau22, Array4< Real > &tau33, Array4< Real > &tau12, Array4< Real > &tau13, Array4< Real > &tau21, Array4< Real > &tau23, Array4< Real > &tau31, Array4< Real > &tau32, const Array4< const Real > &er_arr, const Array4< const Real > &z_nd, const Array4< const Real > &detJ, const GpuArray< Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_ComputeStress_T.cpp:29
@ nvars
Definition: ERF_DataStruct.H:74
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real ComputeSmnSmn(int &i, int &j, int &k, const amrex::Array4< amrex::Real const > &tau11, const amrex::Array4< amrex::Real const > &tau22, const amrex::Array4< amrex::Real const > &tau33, const amrex::Array4< amrex::Real const > &tau12, const amrex::Array4< amrex::Real const > &tau13, const amrex::Array4< amrex::Real const > &tau23, const int &klo, const bool &use_most, const bool &exp_most)
Definition: ERF_EddyViscosity.H:33
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real OmegaFromW(int i, int j, int k, amrex::Real w, const amrex::Array4< const amrex::Real > u_arr, const amrex::Array4< const amrex::Real > v_arr, const amrex::Array4< const amrex::Real > z_nd, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxInv)
Definition: ERF_TerrainMetrics.H:381
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtIface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:94
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Compute_h_zeta_AtJface(const int &i, const int &j, const int &k, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &z_nd)
Definition: ERF_TerrainMetrics.H:137
AMREX_FORCE_INLINE amrex::IntVect TileNoZ()
Definition: ERF_TileNoZ.H:11
@ cons
Definition: ERF_IndexDefines.H:150
@ xvel
Definition: ERF_IndexDefines.H:141
@ zvel
Definition: ERF_IndexDefines.H:143
@ yvel
Definition: ERF_IndexDefines.H:142
Definition: ERF_DiffStruct.H:19
amrex::Real rho0_trans
Definition: ERF_DiffStruct.H:88
MolecDiffType molec_diff_type
Definition: ERF_DiffStruct.H:81
amrex::Real dynamic_viscosity
Definition: ERF_DiffStruct.H:93
bool use_explicit_most
Definition: ERF_DataStruct.H:737
static MeshType mesh_type
Definition: ERF_DataStruct.H:665
DiffChoice diffChoice
Definition: ERF_DataStruct.H:674
amrex::Vector< TurbChoice > turbChoice
Definition: ERF_DataStruct.H:676
static TerrainType terrain_type
Definition: ERF_DataStruct.H:659
bool use_rotate_most
Definition: ERF_DataStruct.H:740
Definition: ERF_TurbStruct.H:31
PBLType pbl_type
Definition: ERF_TurbStruct.H:240
RANSType rans_type
Definition: ERF_TurbStruct.H:237
LESType les_type
Definition: ERF_TurbStruct.H:204

Referenced by erf_slow_rhs_pre().

Here is the call graph for this function:
Here is the caller graph for this function: