55 TYPE(t_region
),
INTENT(INOUT),
TARGET :: region
57 INTEGER,
INTENT(IN) :: ireg
60 INTEGER :: icont, ipcls
63 CHARACTER(CHRLEN) :: rcsidentstring
65 INTEGER :: breakupmodel, breakupwebswi, ncont, npcls
69 INTEGER,
POINTER,
DIMENSION(:) :: pcvplagmass, pdvplagvolu
71 REAL(RFREAL) :: breakupfac, breakupfacr, densg, diaml, diamlsplit, &
72 onethird,
pi, presg, relvelmagl, surftensl, &
73 surftenssum, volusum, volusumr, weberl, webercrit
75 REAL(RFREAL),
DIMENSION(3) :: relvel
76 REAL(RFREAL),
POINTER,
DIMENSION(:) :: psurftens
77 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: parv,pcv, pdv
79 TYPE(t_plag),
POINTER :: pplag
84 rcsidentstring =
'$RCSfile: PLAG_CalcBreakup.F90,v $ $Revision: 1.3 $'
86 global => region%global
89 'PLAG_CalcBreakup.F90' )
96 ilev = region%currLevel
98 IF (global%plagUsed) npcls = region%levels(ilev)%plag%nPcls
102 IF (global%plagUsed) npcls = region%plag%nPcls
104 IF (npcls < 1) go to 999
109 pplag => region%levels(ilev)%plag
119 pcvplagmass => pplag%cvPlagMass
120 pdvplagvolu => pplag%dvPlagVolu
121 psurftens => region%plagInput%surftens
126 onethird = 1.0_rfreal/3.0_rfreal
128 ncont = region%plagInput%nCont
130 breakupmodel = region%plagInput%breakupModel
131 breakupwebswi = region%plagInput%breakupWebSwi
132 breakupfac = region%plagInput%breakupFac
133 breakupfacr = 1.0_rfreal/breakupfac
137 SELECT CASE (breakupmodel)
139 CASE (plag_breakup_model1)
140 webercrit = 10.0_rfreal
143 CALL
errorstop( global,err_reached_default,__line__ )
153 densg = pdv(dv_plag_densmixt,ipcls)
157 volusum =
sum( pdv(pdvplagvolu(:),ipcls) )
158 volusumr = 1.0_rfreal/volusum
160 surftenssum =
sum( pdv(pdvplagvolu(:),ipcls) * psurftens(:) )
162 surftensl = surftenssum * volusumr
164 diaml = pdv(dv_plag_diam,ipcls)
168 relvel(1) = pdv(dv_plag_uvelmixt,ipcls)-pdv(dv_plag_uvel,ipcls)
169 relvel(2) = pdv(dv_plag_vvelmixt,ipcls)-pdv(dv_plag_vvel,ipcls)
170 relvel(3) = pdv(dv_plag_wvelmixt,ipcls)-pdv(dv_plag_wvel,ipcls)
172 relvelmagl = relvel(1)*relvel(1) &
173 + relvel(2)*relvel(2) &
174 + relvel(3)*relvel(3)
178 weberl = densg * diaml * relvelmagl / surftensl
182 IF ( weberl >= webercrit )
THEN
185 WRITE(*,
'(A,3X,I3,3X,I4,3X,1PE12.5)') &
186 'PLAG_CalcBreakup-Critical We reached: iReg, iPcls, We = ',&
192 IF ( breakupwebswi == plag_breakup_webswi1 )
THEN
193 breakupfac = ( densg * diaml * relvelmagl /( surftensl *webercrit ) ) **3
194 breakupfacr = 1.0_rfreal/breakupfac
197 WRITE(*,
'(A,3X,I3,3X,I4,3X,1PE12.5)') &
198 'PLAG_CalcBreakup-Breakup Switch Active: iReg, iPcls, breakupFac = ',&
199 ireg, ipcls, breakupfac
207 pcv(pcvplagmass(icont),ipcls) = pcv(pcvplagmass(icont),ipcls)*breakupfacr
210 pcv(cv_plag_xmom,ipcls) = pcv(cv_plag_xmom,ipcls) * breakupfacr
211 pcv(cv_plag_ymom,ipcls) = pcv(cv_plag_ymom,ipcls) * breakupfacr
212 pcv(cv_plag_zmom,ipcls) = pcv(cv_plag_zmom,ipcls) * breakupfacr
213 pcv(cv_plag_ener,ipcls) = pcv(cv_plag_ener,ipcls) * breakupfacr
214 pcv(cv_plag_enervapor,ipcls) = pcv(cv_plag_enervapor,ipcls) * breakupfacr
216 parv(arv_plag_spload,ipcls) = parv(arv_plag_spload,ipcls)* breakupfac
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine registerfunction(global, funName, fileName)
subroutine plag_calcbreakup(region, iReg)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)