57 TYPE(t_region
) :: region
64 INTEGER :: ilev, icoff, ijcoff, inoff, ijnoff
65 INTEGER :: ijkc, ijkn, ijkni, ijknj, ijknk, errfl
67 REAL(RFREAL) :: one3rd, one6th, rparam, grademod, coefc, radenerg
68 REAL(RFREAL),
POINTER :: dv(:,:), rcv(:,:), rdv(:,:), coef(:,:), fluxlim(:)
69 REAL(RFREAL),
POINTER ::
gradi(:,:),
gradj(:,:), gradk(:,:)
70 REAL(RFREAL),
POINTER :: rgradi(:,:), rgradj(:,:), rgradk(:,:)
71 REAL(RFREAL),
ALLOCATABLE :: gradc(:,:,:,:)
76 'RADI_FluxLimiter.F90' )
80 one3rd = 1._rfreal/3._rfreal
81 one6th = 1._rfreal/6._rfreal
82 ilev = region%currLevel
89 gradi => region%levels(ilev)%mixt%gradi
90 gradj => region%levels(ilev)%mixt%gradj
91 gradk => region%levels(ilev)%mixt%gradk
92 dv => region%levels(ilev)%mixt%dv
93 rdv => region%levels(ilev)%radi%dv
94 coef => region%levels(ilev)%radi%radCoef
96 IF (region%radiInput%radiModel == radi_model_fldsrc .OR. &
97 region%radiInput%radiModel == radi_model_fldtran)
THEN
99 region%global%error = errfl
100 CALL
errorstop( region%global,err_allocate,__line__ )
105 IF ((region%radiInput%radiModel == radi_model_ross) .OR. &
106 (region%radiInput%radiModel == radi_model_fldsrc .AND. &
107 region%radiInput%fluxLim == fld_lim_none))
THEN
111 ijkc = indijk(
i ,
j,
k,icoff,ijcoff)
112 fluxlim(ijkc) = one3rd
116 ELSEIF ((region%radiInput%radiModel == radi_model_fldsrc) .AND. &
117 (region%radiInput%fluxLim == fld_lim_lp))
THEN
122 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
123 ijkni = indijk(
i+1,
j ,
k ,inoff,ijnoff)
124 ijknj = indijk(
i ,
j+1,
k ,inoff,ijnoff)
125 ijknk = indijk(
i ,
j ,
k+1,inoff,ijnoff)
126 gradc(
i,
j,
k,1) = one6th* &
127 (
gradi(gr_mixt_tx,ijkn)+
gradi(gr_mixt_tx,ijkni) + &
128 gradj(gr_mixt_tx,ijkn)+
gradj(gr_mixt_tx,ijknj) + &
129 gradk(gr_mixt_tx,ijkn)+gradk(gr_mixt_tx,ijknk))
130 gradc(
i,
j,
k,2) = one6th* &
131 (
gradi(gr_mixt_ty,ijkn)+
gradi(gr_mixt_ty,ijkni) + &
132 gradj(gr_mixt_ty,ijkn)+
gradj(gr_mixt_ty,ijknj) + &
133 gradk(gr_mixt_ty,ijkn)+gradk(gr_mixt_ty,ijknk))
134 gradc(
i,
j,
k,3) = one6th* &
135 (
gradi(gr_mixt_tz,ijkn)+
gradi(gr_mixt_tz,ijkni) + &
136 gradj(gr_mixt_tz,ijkn)+
gradj(gr_mixt_tz,ijknj) + &
137 gradk(gr_mixt_tz,ijkn)+gradk(gr_mixt_tz,ijknk))
144 ijkc = indijk(
i ,
j,
k,icoff,ijcoff)
145 grademod =
sqrt( gradc(
i,
j,
k,1)*gradc(
i,
j,
k,1) + &
146 gradc(
i,
j,
k,2)*gradc(
i,
j,
k,2) + &
147 gradc(
i,
j,
k,3)*gradc(
i,
j,
k,3) )
148 coefc = coef(ijkc,radi_coeff_extinct)
149 radenerg = abs( dv(dv_mixt_temp,ijkc) )
150 rparam = grademod/(coefc*radenerg)
155 ELSEIF (region%radiInput%radiModel == radi_model_fldtran)
THEN
157 rcv => region%levels(ilev)%radi%cv
158 rgradi => region%levels(ilev)%radi%gradi
159 rgradj => region%levels(ilev)%radi%gradj
160 rgradk => region%levels(ilev)%radi%gradk
165 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
166 ijkni = indijk(
i+1,
j ,
k ,inoff,ijnoff)
167 ijknj = indijk(
i ,
j+1,
k ,inoff,ijnoff)
168 ijknk = indijk(
i ,
j ,
k+1,inoff,ijnoff)
169 gradc(
i,
j,
k,1) = one6th* &
170 (rgradi(gr_radi_ex,ijkn)+rgradi(gr_radi_ex,ijkni) + &
171 rgradj(gr_radi_ex,ijkn)+rgradj(gr_radi_ex,ijknj) + &
172 rgradk(gr_radi_ex,ijkn)+rgradk(gr_radi_ex,ijknk))
173 gradc(
i,
j,
k,2) = one6th* &
174 (rgradi(gr_radi_ey,ijkn)+rgradi(gr_radi_ey,ijkni) + &
175 rgradj(gr_radi_ey,ijkn)+rgradj(gr_radi_ey,ijknj) + &
176 rgradk(gr_radi_ey,ijkn)+rgradk(gr_radi_ey,ijknk))
177 gradc(
i,
j,
k,3) = one6th* &
178 (rgradi(gr_radi_ez,ijkn)+rgradi(gr_radi_ez,ijkni) + &
179 rgradj(gr_radi_ez,ijkn)+rgradj(gr_radi_ez,ijknj) + &
180 rgradk(gr_radi_ez,ijkn)+rgradk(gr_radi_ez,ijknk))
188 ijkc = indijk(
i ,
j,
k,icoff,ijcoff)
189 grademod =
sqrt( gradc(
i,
j,
k,1)*gradc(
i,
j,
k,1) + &
190 gradc(
i,
j,
k,2)*gradc(
i,
j,
k,2) + &
191 gradc(
i,
j,
k,3)*gradc(
i,
j,
k,3) )
192 coefc = coef(ijkc,radi_coeff_extinct)
193 radenerg = rcv(cv_radi_ener,ijkc)
194 rparam = grademod/(coefc*radenerg)
203 IF (
ALLOCATED( gradc ))
THEN
204 DEALLOCATE( gradc, stat=errfl )
205 region%global%error = errfl
206 CALL
errorstop( region%global,err_deallocate,__line__ )
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idcend
subroutine registerfunction(global, funName, fileName)
subroutine radi_fluxlimiter(region)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
REAL(RFREAL) function flimiterlp(r)
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idcbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE iEndG gradi(:,:)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdcend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdcbeg
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE iEndG gradj(:,:)