Function for computing the slow RHS for the evolution equations for the density, potential temperature and momentum.
70 BL_PROFILE_REGION(
"erf_make_mom_sources()");
72 Box domain(geom.Domain());
73 const GpuArray<Real, AMREX_SPACEDIM> dxInv = geom.InvCellSizeArray();
94 const bool l_use_zphys = (solverChoice.
mesh_type != MeshType::ConstantDz);
99 if(l_use_zphys && l_do_terrain_drag){
100 amrex::Error(
" Cannot use immersed forcing for terrain with terrain-fitted coordinates");
102 if(l_do_forest_drag && l_do_terrain_drag){
103 amrex::Error(
" Currently forest canopy cannot be used with immersed forcing");
111 auto cosphi = solverChoice.
cosphi;
112 auto sinphi = solverChoice.
sinphi;
134 Table1D<Real> dptr_r_plane, dptr_u_plane, dptr_v_plane;
135 TableData<Real, 1> r_plane_tab, u_plane_tab, v_plane_tab;
141 r_ave.compute_averages(
ZDir(), r_ave.field());
143 int ncell = r_ave.ncell_line();
144 Gpu::HostVector< Real> r_plane_h(ncell);
145 Gpu::DeviceVector< Real> r_plane_d(ncell);
147 r_ave.line_average(
Rho_comp, r_plane_h);
149 Gpu::copyAsync(Gpu::hostToDevice, r_plane_h.begin(), r_plane_h.end(), r_plane_d.begin());
151 Real* dptr_r = r_plane_d.data();
154 Box tdomain = domain; tdomain.grow(2,ng_c[2]);
155 r_plane_tab.resize({tdomain.smallEnd(2)}, {tdomain.bigEnd(2)});
158 dptr_r_plane = r_plane_tab.table();
159 ParallelFor(ncell, [=] AMREX_GPU_DEVICE (
int k) noexcept
161 dptr_r_plane(k-
offset) = dptr_r[k];
168 u_ave.compute_averages(
ZDir(), u_ave.field());
169 v_ave.compute_averages(
ZDir(), v_ave.field());
171 int u_ncell = u_ave.ncell_line();
172 int v_ncell = v_ave.ncell_line();
173 Gpu::HostVector< Real> u_plane_h(u_ncell), v_plane_h(v_ncell);
174 Gpu::DeviceVector< Real> u_plane_d(u_ncell), v_plane_d(v_ncell);
176 u_ave.line_average(0, u_plane_h);
177 v_ave.line_average(0, v_plane_h);
179 Gpu::copyAsync(Gpu::hostToDevice, u_plane_h.begin(), u_plane_h.end(), u_plane_d.begin());
180 Gpu::copyAsync(Gpu::hostToDevice, v_plane_h.begin(), v_plane_h.end(), v_plane_d.begin());
182 Real* dptr_u = u_plane_d.data();
183 Real* dptr_v = v_plane_d.data();
187 Box udomain = domain; udomain.grow(2,ng_u[2]);
188 Box vdomain = domain; vdomain.grow(2,ng_v[2]);
189 u_plane_tab.resize({udomain.smallEnd(2)}, {udomain.bigEnd(2)});
190 v_plane_tab.resize({vdomain.smallEnd(2)}, {vdomain.bigEnd(2)});
192 int u_offset = ng_u[2];
193 dptr_u_plane = u_plane_tab.table();
194 ParallelFor(u_ncell, [=] AMREX_GPU_DEVICE (
int k) noexcept
196 dptr_u_plane(k-u_offset) = dptr_u[k];
199 int v_offset = ng_v[2];
200 dptr_v_plane = v_plane_tab.table();
201 ParallelFor(v_ncell, [=] AMREX_GPU_DEVICE (
int k) noexcept
203 dptr_v_plane(k-v_offset) = dptr_v[k];
210 make_buoyancy(S_data, S_prim, zmom_src, geom, solverChoice, base_state,
211 n_qstate, solverChoice.
anelastic[level]);
216 for ( MFIter mfi(S_data[
IntVars::cons]); mfi.isValid(); ++mfi)
218 Box tbx = mfi.nodaltilebox(0);
219 Box tby = mfi.nodaltilebox(1);
220 Box tbz = mfi.nodaltilebox(2);
221 if (tbz.bigEnd(2) == domain.bigEnd(2)+1) tbz.growHi(2,-1);
223 const Array4<const Real>& cell_data = S_data[
IntVars::cons].array(mfi);
224 const Array4<const Real>& rho_u = S_data[
IntVars::xmom].array(mfi);
225 const Array4<const Real>& rho_v = S_data[
IntVars::ymom].array(mfi);
226 const Array4<const Real>& rho_w = S_data[
IntVars::zmom].array(mfi);
228 const Array4<const Real>& u =
xvel.array(mfi);
229 const Array4<const Real>& v =
yvel.array(mfi);
230 const Array4<const Real>& w = wvel.array(mfi);
232 const Array4< Real>& xmom_src_arr = xmom_src.array(mfi);
233 const Array4< Real>& ymom_src_arr = ymom_src.array(mfi);
234 const Array4< Real>& zmom_src_arr = zmom_src.array(mfi);
241 const Array4<const Real>& f_drag_arr = (forest_drag) ? forest_drag->const_array(mfi) :
242 Array4<const Real>{};
243 const Array4<const Real>& t_blank_arr = (terrain_blank) ? terrain_blank->const_array(mfi) :
244 Array4<const Real>{};
246 const Array4<const Real>& z_nd_arr = (l_use_zphys) ? z_phys_nd->const_array(mfi) :
247 Array4<const Real>{};
248 const Array4<const Real>& z_cc_arr = (l_use_zphys) ? z_phys_cc->const_array(mfi) :
249 Array4<const Real>{};
255 ParallelFor(tbx, tby, tbz,
256 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
258 Real rho_v_loc = 0.25 * (rho_v(i,j+1,k) + rho_v(i,j,k) + rho_v(i-1,j+1,k) + rho_v(i-1,j,k));
259 Real rho_w_loc = 0.25 * (rho_w(i,j,k+1) + rho_w(i,j,k) + rho_w(i,j-1,k+1) + rho_w(i,j-1,k));
260 xmom_src_arr(i, j, k) += coriolis_factor * (rho_v_loc * sinphi - rho_w_loc * cosphi);
263 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) {
264 Real rho_u_loc = 0.25 * (rho_u(i+1,j,k) + rho_u(i,j,k) + rho_u(i+1,j-1,k) + rho_u(i,j-1,k));
265 ymom_src_arr(i, j, k) += -coriolis_factor * rho_u_loc * sinphi;
268 [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) {
269 Real rho_u_loc = 0.25 * (rho_u(i+1,j,k) + rho_u(i,j,k) + rho_u(i+1,j,k-1) + rho_u(i,j,k-1));
270 zmom_src_arr(i, j, k) += coriolis_factor * rho_u_loc * cosphi;
277 Real zlo = geom.ProbLo(2);
278 Real dz = geom.CellSize(2);
283 if (rayleigh_damp_U) {
284 ParallelFor(tbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
286 Real zcc = (z_cc_arr) ? z_cc_arr(i,j,k) : zlo + (k+0.5)*dz;
287 Real zfrac = 1 - (ztop - zcc) / zdamp;
289 Real rho_on_u_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i-1,j,k,
Rho_comp) );
290 Real uu = rho_u(i,j,k) / rho_on_u_face;
291 Real sinefac = std::sin(
PIoTwo*zfrac);
292 xmom_src_arr(i, j, k) -= dampcoef*sinefac*sinefac * (uu -
ubar[k]) * rho_on_u_face;
297 if (rayleigh_damp_V) {
298 ParallelFor(tby, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
300 Real zcc = (z_cc_arr) ? z_cc_arr(i,j,k) : zlo + (k+0.5)*dz;
301 Real zfrac = 1 - (ztop - zcc) / zdamp;
303 Real rho_on_v_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i,j-1,k,
Rho_comp) );
304 Real vv = rho_v(i,j,k) / rho_on_v_face;
305 Real sinefac = std::sin(
PIoTwo*zfrac);
306 ymom_src_arr(i, j, k) -= dampcoef*sinefac*sinefac * (vv -
vbar[k]) * rho_on_v_face;
311 if (rayleigh_damp_W) {
312 ParallelFor(tbz, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
314 Real zstag = (z_nd_arr) ? z_nd_arr(i,j,k) : zlo + k*dz;
315 Real zfrac = 1 - (ztop - zstag) / zdamp;
317 Real rho_on_w_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i,j,k-1,
Rho_comp) );
318 Real ww = rho_w(i,j,k) / rho_on_w_face;
319 Real sinefac = std::sin(
PIoTwo*zfrac);
320 zmom_src_arr(i, j, k) -= dampcoef*sinefac*sinefac * (ww -
wbar[k]) * rho_on_w_face;
328 ParallelFor(tbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
330 Real rho_on_u_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i-1,j,k,
Rho_comp) );
331 xmom_src_arr(i, j, k) += rho_on_u_face * abl_geo_forcing[0];
333 ParallelFor(tby, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
335 Real rho_on_v_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i,j-1,k,
Rho_comp) );
336 ymom_src_arr(i, j, k) += rho_on_v_face * abl_geo_forcing[1];
338 ParallelFor(tbz, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
340 Real rho_on_w_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i,j,k-1,
Rho_comp) );
341 zmom_src_arr(i, j, k) += rho_on_w_face * abl_geo_forcing[2];
347 if (geo_wind_profile) {
348 ParallelFor(tbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
350 Real rho_on_u_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i-1,j,k,
Rho_comp) );
351 xmom_src_arr(i, j, k) -= coriolis_factor * rho_on_u_face * dptr_v_geos[k] * sinphi;
353 ParallelFor(tby, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
355 Real rho_on_v_face = 0.5 * ( cell_data(i,j,k,
Rho_comp) + cell_data(i,j-1,k,
Rho_comp) );
356 ymom_src_arr(i, j, k) += coriolis_factor * rho_on_v_face * dptr_u_geos[k] * sinphi;
366 ParallelFor(tbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
368 Real dzInv = 0.5*dxInv[2];
370 Real z_xf_lo = 0.25 * ( z_nd_arr(i,j,k ) + z_nd_arr(i,j+1,k )
371 + z_nd_arr(i,j,k-1) + z_nd_arr(i,j+1,k-1) );
372 Real z_xf_hi = 0.25 * ( z_nd_arr(i,j,k+1) + z_nd_arr(i,j+1,k+1)
373 + z_nd_arr(i,j,k+2) + z_nd_arr(i,j+1,k+2) );
374 dzInv = 1.0 / (z_xf_hi - z_xf_lo);
376 Real rho_on_u_face = 0.5 * ( cell_data(i,j,k,nr) + cell_data(i-1,j,k,nr) );
377 Real U_hi = dptr_u_plane(k+1) / dptr_r_plane(k+1);
378 Real U_lo = dptr_u_plane(k-1) / dptr_r_plane(k-1);
379 Real wbar_xf = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
380 xmom_src_arr(i, j, k) -= rho_on_u_face * wbar_xf * (U_hi - U_lo) * dzInv;
382 ParallelFor(tby, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
384 Real dzInv = 0.5*dxInv[2];
386 Real z_yf_lo = 0.25 * ( z_nd_arr(i,j,k ) + z_nd_arr(i+1,j,k )
387 + z_nd_arr(i,j,k-1) + z_nd_arr(i+1,j,k-1) );
388 Real z_yf_hi = 0.25 * ( z_nd_arr(i,j,k+1) + z_nd_arr(i+1,j,k+1)
389 + z_nd_arr(i,j,k+2) + z_nd_arr(i+1,j,k+2) );
390 dzInv = 1.0 / (z_yf_hi - z_yf_lo);
392 Real rho_on_v_face = 0.5 * ( cell_data(i,j,k,nr) + cell_data(i,j-1,k,nr) );
393 Real V_hi = dptr_v_plane(k+1) / dptr_r_plane(k+1);
394 Real V_lo = dptr_v_plane(k-1) / dptr_r_plane(k-1);
395 Real wbar_yf = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
396 ymom_src_arr(i, j, k) -= rho_on_v_face * wbar_yf * (V_hi - V_lo) * dzInv;
399 ParallelFor(tbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
401 Real dzInv = 0.5*dxInv[2];
403 Real z_xf_lo = 0.25 * ( z_nd_arr(i,j,k ) + z_nd_arr(i,j+1,k )
404 + z_nd_arr(i,j,k-1) + z_nd_arr(i,j+1,k-1) );
405 Real z_xf_hi = 0.25 * ( z_nd_arr(i,j,k+1) + z_nd_arr(i,j+1,k+1)
406 + z_nd_arr(i,j,k+2) + z_nd_arr(i,j+1,k+2) );
407 dzInv = 1.0 / (z_xf_hi - z_xf_lo);
409 Real U_hi = dptr_u_plane(k+1) / dptr_r_plane(k+1);
410 Real U_lo = dptr_u_plane(k-1) / dptr_r_plane(k-1);
411 Real wbar_xf = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
412 xmom_src_arr(i, j, k) -= wbar_xf * (U_hi - U_lo) * dzInv;
414 ParallelFor(tby, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
416 Real dzInv = 0.5*dxInv[2];
418 Real z_yf_lo = 0.25 * ( z_nd_arr(i,j,k ) + z_nd_arr(i+1,j,k )
419 + z_nd_arr(i,j,k-1) + z_nd_arr(i+1,j,k-1) );
420 Real z_yf_hi = 0.25 * ( z_nd_arr(i,j,k+1) + z_nd_arr(i+1,j,k+1)
421 + z_nd_arr(i,j,k+2) + z_nd_arr(i+1,j,k+2) );
422 dzInv = 1.0 / (z_yf_hi - z_yf_lo);
424 Real V_hi = dptr_v_plane(k+1) / dptr_r_plane(k+1);
425 Real V_lo = dptr_v_plane(k-1) / dptr_r_plane(k-1);
426 Real wbar_yf = 0.5 * (dptr_wbar_sub[k] + dptr_wbar_sub[k+1]);
427 ymom_src_arr(i, j, k) -= wbar_yf * (V_hi - V_lo) * dzInv;
439 Real coeff_n = Real(1.0);
440 Real coeff_np1 = Real(0.0);
442 Real tau_inv = Real(1.0) / input_sounding_data.
tau_nudging;
446 for (
int nt = 1; nt < n_sounding_times; nt++) {
449 if (itime_n == n_sounding_times-1) {
452 itime_np1 = itime_n+1;
455 coeff_n = Real(1.0) - coeff_np1;
460 const Real* u_inp_sound_n = input_sounding_data.
U_inp_sound_d[itime_n].dataPtr();
461 const Real* u_inp_sound_np1 = input_sounding_data.
U_inp_sound_d[itime_np1].dataPtr();
462 ParallelFor(tbx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
464 Real nudge_u = (coeff_n*u_inp_sound_n[k] + coeff_np1*u_inp_sound_np1[k]) - (dptr_u_plane(k)/dptr_r_plane(k));
466 xmom_src_arr(i, j, k) += cell_data(i, j, k, nr) * nudge_u;
469 const Real* v_inp_sound_n = input_sounding_data.
V_inp_sound_d[itime_n].dataPtr();
470 const Real* v_inp_sound_np1 = input_sounding_data.
V_inp_sound_d[itime_np1].dataPtr();
471 ParallelFor(tby, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) noexcept
473 Real nudge_v = (coeff_n*v_inp_sound_n[k] + coeff_np1*v_inp_sound_np1[k]) - (dptr_v_plane(k)/dptr_r_plane(k));
475 ymom_src_arr(i, j, k) += cell_data(i, j, k, nr) * nudge_v;
484 const Array4<const Real>& mf_u = mapfac_u->const_array(mfi);
485 const Array4<const Real>& mf_v = mapfac_v->const_array(mfi);
487 u, cell_data, xmom_src_arr, mf_u);
489 v, cell_data, ymom_src_arr, mf_v);
499 xmom_src_arr, ymom_src_arr, rho_u, rho_v, d_sponge_ptrs_at_lev);
504 xmom_src_arr, ymom_src_arr, zmom_src_arr, rho_u, rho_v, rho_w);
510 if (l_do_forest_drag) {
511 ParallelFor(tbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
513 const Real ux = u(i, j, k);
514 const Real uy = 0.25 * ( v(i, j , k ) + v(i-1, j , k )
515 + v(i, j+1, k ) + v(i-1, j+1, k ) );
516 const Real uz = 0.25 * ( w(i, j , k ) + w(i-1, j , k )
517 + w(i, j , k+1) + w(i-1, j , k+1) );
518 const Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
519 const Real f_drag = 0.5 * (f_drag_arr(i, j, k) + f_drag_arr(i-1, j, k));
520 xmom_src_arr(i, j, k) -= f_drag * ux * windspeed;
522 ParallelFor(tby, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
524 const Real ux = 0.25 * ( u(i , j , k ) + u(i , j-1, k )
525 + u(i+1, j , k ) + u(i+1, j-1, k ) );
526 const Real uy = v(i, j, k);
527 const Real uz = 0.25 * ( w(i , j , k ) + w(i , j-1, k )
528 + w(i , j , k+1) + w(i , j-1, k+1) );
529 const amrex::Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
530 const Real f_drag = 0.5 * (f_drag_arr(i, j, k) + f_drag_arr(i, j-1, k));
531 ymom_src_arr(i, j, k) -= f_drag * uy * windspeed;
533 ParallelFor(tbz, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
535 const amrex::Real ux = 0.25 * ( u(i , j , k ) + u(i+1, j , k )
536 + u(i , j , k-1) + u(i+1, j , k-1) );
537 const amrex::Real uy = 0.25 * ( v(i , j , k ) + v(i , j+1, k )
538 + v(i , j , k-1) + v(i , j+1, k-1) );
539 const amrex::Real uz = w(i, j, k);
540 const amrex::Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
541 const Real f_drag = 0.5 * (f_drag_arr(i, j, k) + f_drag_arr(i, j, k-1));
542 zmom_src_arr(i, j, k) -= f_drag * uz * windspeed;
548 if (l_do_terrain_drag) {
549 const Real drag_coefficient=10.0/dz;
550 const Real tiny = std::numeric_limits<amrex::Real>::epsilon();
551 ParallelFor(tbx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
553 const Real ux = u(i, j, k);
554 const Real uy = 0.25 * ( v(i, j , k ) + v(i-1, j , k )
555 + v(i, j+1, k ) + v(i-1, j+1, k ) );
556 const Real uz = 0.25 * ( w(i, j , k ) + w(i-1, j , k )
557 + w(i, j , k+1) + w(i-1, j , k+1) );
558 const Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
559 const Real t_blank = 0.5 * (t_blank_arr(i, j, k) + t_blank_arr(i-1, j, k));
560 const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
561 xmom_src_arr(i, j, k) -= t_blank * CdM * ux * windspeed;
563 ParallelFor(tby, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
565 const Real ux = 0.25 * ( u(i , j , k ) + u(i , j-1, k )
566 + u(i+1, j , k ) + u(i+1, j-1, k ) );
567 const Real uy = v(i, j, k);
568 const Real uz = 0.25 * ( w(i , j , k ) + w(i , j-1, k )
569 + w(i , j , k+1) + w(i , j-1, k+1) );
570 const amrex::Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
571 const Real t_blank = 0.5 * (t_blank_arr(i, j, k) + t_blank_arr(i, j-1, k));
572 const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
573 ymom_src_arr(i, j, k) -= t_blank * CdM * uy * windspeed;
575 ParallelFor(tbz, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k) noexcept
577 const amrex::Real ux = 0.25 * ( u(i , j , k ) + u(i+1, j , k )
578 + u(i , j , k-1) + u(i+1, j , k-1) );
579 const amrex::Real uy = 0.25 * ( v(i , j , k ) + v(i , j+1, k )
580 + v(i , j , k-1) + v(i , j+1, k-1) );
581 const amrex::Real uz = w(i, j, k);
582 const amrex::Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
583 const Real t_blank = 0.5 * (t_blank_arr(i, j, k) + t_blank_arr(i, j, k-1));
584 const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
585 zmom_src_arr(i, j, k) -= t_blank * CdM * uz * windspeed;
void ApplySpongeZoneBCsForMom(const SpongeChoice &spongeChoice, const Geometry geom, const Box &tbx, const Box &tby, const Box &tbz, const Array4< Real > &rho_u_rhs, const Array4< Real > &rho_v_rhs, const Array4< Real > &rho_w_rhs, const Array4< const Real > &rho_u, const Array4< const Real > &rho_v, const Array4< const Real > &rho_w)
Definition: ERF_ApplySpongeZoneBCs.cpp:117
void ApplySpongeZoneBCsForMom_ReadFromFile(const SpongeChoice &spongeChoice, const Geometry geom, const Box &tbx, const Box &tby, const Array4< const Real > &cell_data, const Array4< Real > &rho_u_rhs, const Array4< Real > &rho_v_rhs, const Array4< const Real > &rho_u, const Array4< const Real > &rho_v, const Vector< Real * > d_sponge_ptrs_at_lev)
Definition: ERF_ApplySpongeZoneBCs_ReadFromFile.cpp:8
constexpr amrex::Real PIoTwo
Definition: ERF_Constants.H:7
@ ubar
Definition: ERF_DataStruct.H:70
@ wbar
Definition: ERF_DataStruct.H:70
@ vbar
Definition: ERF_DataStruct.H:70
DirectionSelector< 2 > ZDir
Definition: ERF_DirectionSelector.H:38
#define Rho_comp
Definition: ERF_IndexDefines.H:36
void make_buoyancy(Vector< MultiFab > &S_data, const MultiFab &S_prim, MultiFab &buoyancy, const amrex::Geometry geom, const SolverChoice &solverChoice, const MultiFab &base_state, const int n_qstate, const int anelastic)
Definition: ERF_MakeBuoyancy.cpp:32
void NumericalDiffusion_Xmom(const Box &bx, const Real dt, const Real num_diff_coeff, const Array4< const Real > &prim_data, const Array4< const Real > &cell_data, const Array4< Real > &rhs, const Array4< const Real > &mf_arr)
Definition: ERF_NumericalDiffusion.cpp:84
void NumericalDiffusion_Ymom(const Box &bx, const Real dt, const Real num_diff_coeff, const Array4< const Real > &prim_data, const Array4< const Real > &cell_data, const Array4< Real > &rhs, const Array4< const Real > &mf_arr)
Definition: ERF_NumericalDiffusion.cpp:149
AMREX_FORCE_INLINE IntVect offset(const int face_dir, const int normal)
Definition: ERF_ReadBndryPlanes.cpp:28
Definition: ERF_PlaneAverage.H:14
@ ymom
Definition: ERF_IndexDefines.H:141
@ cons
Definition: ERF_IndexDefines.H:139
@ zmom
Definition: ERF_IndexDefines.H:142
@ xmom
Definition: ERF_IndexDefines.H:140
@ xvel
Definition: ERF_IndexDefines.H:130
@ yvel
Definition: ERF_IndexDefines.H:131
amrex::Real coriolis_factor
Definition: ERF_DataStruct.H:629
static MeshType mesh_type
Definition: ERF_DataStruct.H:570
bool rayleigh_damp_V
Definition: ERF_DataStruct.H:606
amrex::Real rayleigh_zdamp
Definition: ERF_DataStruct.H:610
amrex::Real cosphi
Definition: ERF_DataStruct.H:630
amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > abl_geo_forcing
Definition: ERF_DataStruct.H:671
bool custom_w_subsidence
Definition: ERF_DataStruct.H:636
bool nudging_from_input_sounding
Definition: ERF_DataStruct.H:642
bool rayleigh_damp_U
Definition: ERF_DataStruct.H:605
amrex::Real rayleigh_ztop
Definition: ERF_DataStruct.H:611
amrex::Real sinphi
Definition: ERF_DataStruct.H:631
bool have_geo_wind_profile
Definition: ERF_DataStruct.H:673
bool use_coriolis
Definition: ERF_DataStruct.H:602
amrex::Real num_diff_coeff
Definition: ERF_DataStruct.H:658
bool do_terrain_drag
Definition: ERF_DataStruct.H:700
amrex::Vector< int > anelastic
Definition: ERF_DataStruct.H:589
bool custom_forcing_prim_vars
Definition: ERF_DataStruct.H:638
bool rayleigh_damp_W
Definition: ERF_DataStruct.H:607
SpongeChoice spongeChoice
Definition: ERF_DataStruct.H:580
bool do_forest_drag
Definition: ERF_DataStruct.H:697
amrex::Real rayleigh_dampcoef
Definition: ERF_DataStruct.H:609
int ave_plane
Definition: ERF_DataStruct.H:675
std::string sponge_type
Definition: ERF_SpongeStruct.H:61