Skip to content

Commit

Permalink
fix initial condition for channel flow to be divergence free (Exawind…
Browse files Browse the repository at this point in the history
  • Loading branch information
moprak-nrel authored Jan 5, 2024
1 parent 51cba8d commit d31ddab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amr-wind/physics/ChannelFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ void ChannelFlow::initialize_fields(

const amrex::Real y = problo[1] + (j + 0.5) * dx[1];
const amrex::Real z = problo[2] + (k + 0.5) * dx[2];
const amrex::Real perty = perturb_amp *
const amrex::Real perty = z_perturb * perturb_amp *
std::sin(y_perturb * y) *
std::cos(z_perturb * z);
const amrex::Real pertz = -perturb_amp *
const amrex::Real pertz = -y_perturb * perturb_amp *
std::cos(y_perturb * y) *
std::sin(z_perturb * z);
vel(i, j, k, 1) = 0.0 + (perturb_vel ? perty : 0.0);
Expand Down

0 comments on commit d31ddab

Please sign in to comment.