59 TYPE(t_region
),
INTENT(INOUT),
TARGET :: region
65 CHARACTER(CHRLEN) :: rcsidentstring
67 INTEGER :: dragmodel, icont, ncont, npcls
71 INTEGER,
POINTER,
DIMENSION(:) :: pcvplagmass
73 REAL(RFREAL) :: diaml, massl, mixtvolr,
pi, psil, &
74 relvelmagl, reyl, taulr
75 REAL(RFREAL),
DIMENSION(3) :: relvel, accell
76 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: pcv, pdv, ptv
78 TYPE(t_plag) ,
POINTER :: pplag
83 rcsidentstring =
'$RCSfile: INRT_CalcDrag.F90,v $ $Revision: 1.5 $'
85 global => region%global
98 ilev = region%currLevel
99 IF (global%plagUsed) npcls = region%levels(ilev)%plag%nPcls
102 IF (global%plagUsed) npcls = region%plag%nPcls
105 IF (npcls < 1) go to 999
111 ncont = region%plagInput%nCont
112 dragmodel = region%inrtInput%inrts(inrt_type_drag)%switches( &
118 pplag => region%levels(ilev)%plag
128 pcvplagmass => pplag%cvPlagMass
134 diaml = pdv(dv_plag_diam,ipcls)
136 massl =
sum( pcv(pcvplagmass(:),ipcls) )
138 taulr = 3.0_rfreal*
pi*ptv(tv_plag_muelmixt,ipcls)* &
141 relvel(1) = pdv(dv_plag_uvelmixt,ipcls)-pdv(dv_plag_uvel,ipcls)
142 relvel(2) = pdv(dv_plag_vvelmixt,ipcls)-pdv(dv_plag_vvel,ipcls)
143 relvel(3) = pdv(dv_plag_wvelmixt,ipcls)-pdv(dv_plag_wvel,ipcls)
145 SELECT CASE (dragmodel)
147 CASE (inrt_drag_model_stokes)
151 CASE (inrt_drag_model_sn)
153 relvelmagl =
sqrt( relvel(1)*relvel(1)+ &
154 relvel(2)*relvel(2)+ &
155 relvel(3)*relvel(3) )
157 reyl = diaml * relvelmagl * pdv(dv_plag_densmixt,ipcls) / &
158 ptv(tv_plag_muelmixt,ipcls)
160 psil = 1.0_rfreal + 0.15_rfreal* (reyl**0.687_rfreal)
162 CASE (inrt_drag_model_smrfld)
164 relvelmagl =
sqrt( relvel(1)*relvel(1)+ &
165 relvel(2)*relvel(2)+ &
166 relvel(3)*relvel(3) )
168 reyl = diaml * relvelmagl * pdv(dv_plag_densmixt,ipcls) / &
169 ptv(tv_plag_muelmixt,ipcls)
171 psil = 112.0_rfreal/24.0_rfreal *reyl**(+0.02_rfreal)
174 CALL
errorstop( global,err_reached_default,__line__ )
178 accell(1) = psil*relvel(1)*taulr
179 accell(2) = psil*relvel(2)*taulr
180 accell(3) = psil*relvel(3)*taulr
185 pplag%inrtSources(inrt_drag_l_xmom_g,ipcls) = -massl*accell(1)
186 pplag%inrtSources(inrt_drag_l_ymom_g,ipcls) = -massl*accell(2)
187 pplag%inrtSources(inrt_drag_l_zmom_g,ipcls) = -massl*accell(3)
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine registerfunction(global, funName, fileName)
subroutine inrt_calcdrag(region)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)