Skip to content

Commit

Permalink
Make Coriolis terms 2D -- TEMPORARY
Browse files Browse the repository at this point in the history
  • Loading branch information
ewquon committed Oct 18, 2023
1 parent 21c5f54 commit 3b5892c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Source/TimeIntegration/ERF_slow_rhs_pre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ void erf_slow_rhs_pre (int level,
if (use_coriolis)
{
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));
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));
Real rho_w_loc = 0.0; //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));
rho_u_rhs(i, j, k) += coriolis_factor *
(rho_v_loc * sinphi - rho_w_loc * cosphi);
}
Expand Down Expand Up @@ -854,7 +854,7 @@ void erf_slow_rhs_pre (int level,
if (use_coriolis)
{
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));
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));
Real rho_w_loc = 0.0; //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));
rho_u_rhs(i, j, k) += coriolis_factor *
(rho_v_loc * sinphi - rho_w_loc * cosphi);
}
Expand Down Expand Up @@ -1012,11 +1012,11 @@ void erf_slow_rhs_pre (int level,
+ 0.5*(cell_data(i,j,k,Rho_comp)+cell_data(i,j,k-1,Rho_comp)) * abl_geo_forcing[2];

// Add Coriolis forcing (that assumes east is +x, north is +y)
if (use_coriolis)
{
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));
rho_w_rhs(i, j, k) += coriolis_factor * rho_u_loc * cosphi;
}
//if (use_coriolis)
//{
// 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));
// rho_w_rhs(i, j, k) += coriolis_factor * rho_u_loc * cosphi;
//}

// Add Rayleigh damping
if (use_rayleigh_damping && rayleigh_damp_W)
Expand Down Expand Up @@ -1053,11 +1053,11 @@ void erf_slow_rhs_pre (int level,
+ 0.5*(cell_data(i,j,k,Rho_comp)+cell_data(i,j,k-1,Rho_comp)) * abl_geo_forcing[2];

// Add Coriolis forcing (that assumes east is +x, north is +y)
if (use_coriolis)
{
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));
rho_w_rhs(i, j, k) += coriolis_factor * rho_u_loc * cosphi;
}
//if (use_coriolis)
//{
// 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));
// rho_w_rhs(i, j, k) += coriolis_factor * rho_u_loc * cosphi;
//}

// Add Rayleigh damping
if (use_rayleigh_damping && rayleigh_damp_W)
Expand Down

0 comments on commit 3b5892c

Please sign in to comment.