From 5da4c3f2878c4babdd6469119b17a3a42bed0c9d Mon Sep 17 00:00:00 2001 From: Mahesh Natarajan Date: Wed, 1 May 2024 15:15:29 -0700 Subject: [PATCH] Correction to Fitch source terms (#1595) Co-authored-by: Mahesh Natarajan --- Source/WindFarmParametrization/Fitch/AdvanceFitch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/WindFarmParametrization/Fitch/AdvanceFitch.cpp b/Source/WindFarmParametrization/Fitch/AdvanceFitch.cpp index 3d52c9eba..238c2de9f 100644 --- a/Source/WindFarmParametrization/Fitch/AdvanceFitch.cpp +++ b/Source/WindFarmParametrization/Fitch/AdvanceFitch.cpp @@ -139,13 +139,13 @@ void fitch_source_terms_cellcentered (const Geometry& geom, Real Vabs = std::pow(u_vel(i,j,k)*u_vel(i,j,k) + v_vel(i,j,k)*v_vel(i,j,k) + - w_vel(i,j,k)*w_vel(i,j,k), 0.5); + w_vel(i,j,kk)*w_vel(i,j,kk), 0.5); fitch_array(i,j,k,0) = Vabs; - fitch_array(i,j,k,1) = -0.5*Nturb_array(i,j,k)*C_T*Vabs*Vabs*A_ijk/(z_kp1 - z_k); + fitch_array(i,j,k,1) = -0.5*Nturb_array(i,j,k)/(dx[0]*dx[1])*C_T*Vabs*Vabs*A_ijk/(z_kp1 - z_k); fitch_array(i,j,k,2) = u_vel(i,j,k)/Vabs*fitch_array(i,j,k,1); fitch_array(i,j,k,3) = v_vel(i,j,k)/Vabs*fitch_array(i,j,k,1); - fitch_array(i,j,k,4) = 0.5*Nturb_array(i,j,k)*C_TKE*std::pow(Vabs,3)*A_ijk/(z_kp1 - z_k); + fitch_array(i,j,k,4) = 0.5*Nturb_array(i,j,k)/(dx[0]*dx[1])*C_TKE*std::pow(Vabs,3)*A_ijk/(z_kp1 - z_k); //amrex::Gpu::Atomic::Add(sum_area, A_ijk); });