66 TYPE(t_region
),
POINTER :: pregion
72 CHARACTER(CHRLEN) :: rcsidentstring
74 INTEGER,
POINTER,
DIMENSION(:) :: pcvplagmass
75 INTEGER,
POINTER,
DIMENSION(:,:) :: paiv
76 REAL(RFREAL) :: heatcapsum,masssum,massratio,massfluxratiolimit, &
77 massfluxratiosum,massfluxratiosumr
78 REAL(RFREAL),
POINTER,
DIMENSION(:) :: pdens,pinjcmassfluxratio,pspcheat
79 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: parv, pcv
87 '$RCSfile: PLAG_RFLU_InitSolutionScratch.F90,v $ $Revision: 1.16 $'
89 global => pregion%global
92 'PLAG_RFLU_InitSolutionScratch.F90')
94 IF ( global%verbLevel > verbose_none )
THEN
95 WRITE(stdout,
'(A,1X,A)') solver_name, &
96 'Initializing particle solution from scratch...'
103 pregion%plag%nextIdNumber = pregion%plag%nPcls
105 pdens => pregion%plagInput%dens
106 pspcheat => pregion%plagInput%spht
107 pinjcmassfluxratio => pregion%plagInput%injcMassFluxRatio
109 pcvplagmass => pregion%plag%cvPlagMass
110 paiv => pregion%plag%aiv
111 parv => pregion%plag%arv
112 pcv => pregion%plag%cv
114 massfluxratiolimit = 1.0e-10_rfreal
115 massfluxratiosum =
sum(pinjcmassfluxratio)
121 IF ( massfluxratiosum > massfluxratiolimit )
THEN
122 massfluxratiosumr = 1.0_rfreal/massfluxratiosum
124 massfluxratiosumr = 1.0_rfreal
131 DO ipcl = 1,pregion%plag%nPcls
132 pcv(cv_plag_xpos,ipcl) = pregion%plagInput%iniPosX(ipcl)
133 pcv(cv_plag_ypos,ipcl) = pregion%plagInput%iniPosY(ipcl)
134 pcv(cv_plag_zpos,ipcl) = pregion%plagInput%iniPosZ(ipcl)
136 DO icont = 1,pregion%plagInput%nCont
137 massratio = pinjcmassfluxratio(icont)*massfluxratiosumr
138 pcv(pcvplagmass(icont),ipcl) = pdens(icont)*massratio*global%pi/ &
139 6.0_rfreal*pregion%plagInput%iniDiam(ipcl)**3
142 heatcapsum =
sum(pcv(pcvplagmass(:),ipcl)*pspcheat(:))
143 masssum =
sum(pcv(pcvplagmass(:),ipcl))
145 pcv(cv_plag_xmom,ipcl) = masssum*pregion%plagInput%iniVelX(ipcl)
146 pcv(cv_plag_ymom,ipcl) = masssum*pregion%plagInput%iniVelY(ipcl)
147 pcv(cv_plag_zmom,ipcl) = masssum*pregion%plagInput%iniVelZ(ipcl)
148 pcv(cv_plag_ener,ipcl) = heatcapsum*pregion%plagInput%iniTemp(ipcl)
150 parv(arv_plag_spload,ipcl) = pregion%plagInput%iniSpLoad(ipcl)
151 paiv(aiv_plag_pidini,ipcl) = ipcl
152 paiv(aiv_plag_icells,ipcl) = crazy_value_int
153 paiv(aiv_plag_regini,ipcl) = crazy_value_int
160 IF ( global%verbLevel > verbose_none )
THEN
161 WRITE(stdout,
'(A,1X,A)') solver_name, &
162 'Initializing particle solution from scratch done.'
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine registerfunction(global, funName, fileName)
subroutine deregisterfunction(global)
subroutine plag_rflu_initsolutionscratch(pRegion)