Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for Eff_aero function calculation #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions module_mp_thompson_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2896,23 +2896,27 @@ end subroutine mp_thompson_main
!.. follows Slinn (1983).
!+---+-----------------------------------------------------------------+

real function Eff_aero(D, Da, visc,rhoa,Temp,species)
real function Eff_aero(D,Da,visc,rhoa,Temp,species)

implicit none
real(wp) :: D, Da, visc, rhoa, Temp
character(LEN=1) :: species
real(wp) :: aval, Cc, diff, Re, Sc, St, St2, vt, Eff
real(wp), intent(in) :: D, Da, visc, rhoa, Temp
character(LEN=1), intent(in) :: species
real(wp) :: aval, Cc, diff, Re, Sc, St, St2, vt, Eff, rho_p
real(wp), parameter :: boltzman = 1.3806503E-23
real(wp), parameter :: meanPath = 0.0256E-6

vt = 1.
rho_p = rho_w2
if (species .eq. 'r') then
vt = -0.1021 + 4.932E3*D - 0.9551E6*D*D &
+ 0.07934E9*D*D*D - 0.002362E12*D*D*D*D
+ 0.07934E9*D*D*D - 0.002362E12*D*D*D*D
rho_p = rho_w2
elseif (species .eq. 's') then
vt = av_s*D**bv_s
rho_p = rho_s2
elseif (species .eq. 'g') then
vt = av_g(idx_bg1)*D**bv_g(idx_bg1)
rho_p = rho_g(idx_bg1)
endif

Cc = 1. + 2.*meanPath/Da *(1.257+0.4*exp(-0.55*Da/meanPath))
Expand All @@ -2921,8 +2925,8 @@ real function Eff_aero(D, Da, visc,rhoa,Temp,species)
Re = 0.5*rhoa*D*vt/visc
Sc = visc/(rhoa*diff)

St = Da*Da*vt*1000./(9.*visc*D)
aval = 1.+LOG(1.+Re)
St = (rho_p-rhoa)*Da*Da*vt*Cc/(9.*visc*D)
aval = LOG(1.+Re)
St2 = (1.2 + 1./12.*aval)/(1.+aval)

eff = 4./(re*sc) * (1. + 0.4*sqrt(re)*sc**0.3333 &
Expand Down
Loading