Skip to content

Commit

Permalink
Clang-aware
Browse files Browse the repository at this point in the history
  • Loading branch information
hgopalan committed Dec 19, 2024
1 parent 56f4722 commit 1641834
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions amr-wind/equation_systems/icns/source_terms/DragForcing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ DragForcing::DragForcing(const CFDSim& sim)
pp.query("sponge_south", m_sponge_south);
pp.query("sponge_north", m_sponge_north);
pp.query("is_laminar", m_is_laminar);
amrex::ParmParse pp_abl("ABL");
amrex::ParmParse pp_abl("ABL");
pp_abl.query("mol_length", m_mol_length);
pp_abl.query("mo_gamma_m", m_gamma_m);
pp_abl.query("mo_beta_m", m_beta_m);
pp_abl.query("mo_beta_m", m_beta_m);
const auto& phy_mgr = m_sim.physics_manager();
if (phy_mgr.contains("ABL")) {
const auto& abl = m_sim.physics_manager().get<amr_wind::ABL>();
Expand Down Expand Up @@ -91,7 +91,7 @@ void DragForcing::operator()(
} else {
const amrex::Real x = std::sqrt(std::sqrt(1 - m_beta_m * zeta));
psi_m_cell = 2.0 * std::log(0.5 * (1.0 + x)) + log(0.5 * (1 + x * x)) -
2.0 * std::atan(x) + utils::half_pi();
2.0 * std::atan(x) + utils::half_pi();
}
//! Cell Value
const auto& prob_lo = geom.ProbLoArray();
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/equation_systems/tke/source_terms/KransAxell.H
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private:
amrex::Real m_kappa{0.41};
amrex::Real m_mol_length{10000};
amrex::Real m_gamma_m{5.0};
amrex::Real m_beta_m{16.0};
amrex::Real m_beta_m{16.0};
amrex::Real m_sponge_start{600};
amrex::Real m_ref_tke{1e-10};
amrex::Vector<amrex::Real> m_gravity{0.0, 0.0, -9.81};
Expand Down
9 changes: 5 additions & 4 deletions amr-wind/equation_systems/tke/source_terms/KransAxell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ KransAxell::KransAxell(const CFDSim& sim)
pp.query("surface_temp_flux", m_heat_flux);
pp.query("mol_length", m_mol_length);
pp.query("mo_gamma_m", m_gamma_m);
pp.query("mo_beta_m", m_beta_m);
pp.query("mo_beta_m", m_beta_m);
pp.query("meso_sponge_start", m_sponge_start);
{
amrex::ParmParse pp_incflow("incflo");
Expand Down Expand Up @@ -71,7 +71,7 @@ void KransAxell::operator()(
} else {
const amrex::Real x = std::sqrt(std::sqrt(1 - m_beta_m * zeta));
psi_m = 2.0 * std::log(0.5 * (1.0 + x)) + log(0.5 * (1 + x * x)) -
2.0 * std::atan(x) + 2 * std::atan(1.0);
2.0 * std::atan(x) + 2 * std::atan(1.0);
}
amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
amrex::Real bcforcing = 0;
Expand All @@ -80,7 +80,7 @@ void KransAxell::operator()(
const amrex::Real z = problo[2] + (k + 0.5) * dx[2];
if (k == 0) {
const amrex::Real m = std::sqrt(ux * ux + uy * uy);
const amrex::Real ustar = m * kappa / ( std::log(z / z0) + psi_m);
const amrex::Real ustar = m * kappa / (std::log(z / z0) + psi_m);
const amrex::Real rans_b = std::pow(
std::max(heat_flux, 0.0) * kappa * z / std::pow(Cmu, 3),
(2.0 / 3.0));
Expand Down Expand Up @@ -115,7 +115,8 @@ void KransAxell::operator()(
const amrex::Real uy = vel(i, j, k, 1);
const amrex::Real z = 0.5 * dx[2];
amrex::Real m = std::sqrt(ux * ux + uy * uy);
const amrex::Real ustar = m * kappa / ( std::log(z / z0) + psi_m);
const amrex::Real ustar =
m * kappa / (std::log(z / z0) + psi_m);
const amrex::Real rans_b = std::pow(
std::max(heat_flux, 0.0) * kappa * z / std::pow(Cmu, 3),
(2.0 / 3.0));
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/wind_energy/ABLWallFunction.H
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private:
std::string m_wall_shear_stress_type{"moeng"};
std::string m_surface_flux_method{"uniform"};
amrex::Real m_mol_length{10000};
amrex::Real m_surface_roughness{0.1};
amrex::Real m_surface_roughness{0.1};
};

} // namespace amr_wind
Expand Down

0 comments on commit 1641834

Please sign in to comment.