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

Referenced by erf_slow_rhs_pre().

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