Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_rFLO_FlimSpectralRadii.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: calculate spectral radii for FLD radiation model
26 !
27 ! Description: none.
28 !
29 ! Input: regions = data of all grid regions.
30 !
31 ! Output: regions%levels%radi%srad = convective spectral radii for FLD radi.
32 !
33 ! Notes: grid speeds already contain face area
34 !
35 !******************************************************************************
36 !
37 ! $Id: RADI_rFLO_FlimSpectralRadii.F90,v 1.3 2008/12/06 08:44:38 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE radi_rflo_flimspectralradii( region ) ! PUBLIC
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
52  USE moderror
53  USE modparameters
55  IMPLICIT NONE
56 
57 #include "Indexing.h"
58 
59 ! ... parameters
60  TYPE(t_region), INTENT(INOUT) :: region
61 
62 ! ... loop variables
63  INTEGER :: i, j, k
64 
65 ! ... local variables
66 
67  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
68  INTEGER :: ilev, icoff, ijcoff, inoff, ijnoff, ijkc, ijkn, ijkn1, indsvel
69 
70  REAL(RFREAL) :: rrho, u, v, w, sx, sy, sz, svel, vc
71  REAL(RFREAL), POINTER :: cv(:,:)
72  REAL(RFREAL), POINTER :: si(:,:), sj(:,:), sk(:,:), vol(:)
73  REAL(RFREAL), POINTER :: sivel(:), sjvel(:), skvel(:)
74  REAL(RFREAL), POINTER :: srad(:,:)
75 
76  TYPE(t_global), POINTER :: global
77 
78 !******************************************************************************
79 
80  global => region%global
81 
82  CALL registerfunction( global,'RADI_RFLO_FlimSpectralRadii',&
83  'RADI_rFLO_FlimSpectralRadii.F90' )
84 
85  IF (region%radiInput%radiModel /= radi_model_fldtran) goto 999
86 
87 ! get dimensions and pointers -------------------------------------------------
88 
89  ilev = region%currLevel
90 
91  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend,jdcbeg,jdcend, &
92  kdcbeg,kdcend )
93  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
94  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
95 
96  cv => region%levels(ilev)%mixt%cv
97 
98  si => region%levels(ilev)%grid%si
99  sj => region%levels(ilev)%grid%sj
100  sk => region%levels(ilev)%grid%sk
101  vol => region%levels(ilev)%grid%vol
102  sivel => region%levels(ilev)%grid%siVel
103  sjvel => region%levels(ilev)%grid%sjVel
104  skvel => region%levels(ilev)%grid%skVel
105  indsvel = region%levels(ilev)%grid%indSvel
106 
107  srad => region%levels(ilev)%radi%srad
108 
109 ! local time step, spectral radii ---------------------------------------------
110 
111  DO k=kdcbeg,kdcend
112  DO j=jdcbeg,jdcend
113  DO i=idcbeg,idcend
114  ijkc = indijk(i,j,k,icoff,ijcoff)
115  ijkn = indijk(i,j,k,inoff,ijnoff)
116  rrho = 1._rfreal/cv(cv_mixt_dens,ijkc)
117  u = cv(cv_mixt_xmom,ijkc)*rrho
118  v = cv(cv_mixt_ymom,ijkc)*rrho
119  w = cv(cv_mixt_zmom,ijkc)*rrho
120 
121  ijkn1 = indijk(i+1,j,k,inoff,ijnoff)
122  sx = 0.5_rfreal*(si(xcoord,ijkn)+si(xcoord,ijkn1))
123  sy = 0.5_rfreal*(si(ycoord,ijkn)+si(ycoord,ijkn1))
124  sz = 0.5_rfreal*(si(zcoord,ijkn)+si(zcoord,ijkn1))
125  svel = 0.5_rfreal*(sivel(ijkn*indsvel)+sivel(ijkn1*indsvel))
126  vc = sx*u + sy*v + sz*w - svel
127  srad(icoord,ijkc) = abs(vc)
128 
129  ijkn1 = indijk(i,j+1,k,inoff,ijnoff)
130  sx = 0.5_rfreal*(sj(xcoord,ijkn)+sj(xcoord,ijkn1))
131  sy = 0.5_rfreal*(sj(ycoord,ijkn)+sj(ycoord,ijkn1))
132  sz = 0.5_rfreal*(sj(zcoord,ijkn)+sj(zcoord,ijkn1))
133  svel = 0.5_rfreal*(sjvel(ijkn*indsvel)+sjvel(ijkn1*indsvel))
134  vc = sx*u + sy*v + sz*w - svel
135  srad(jcoord,ijkc) = abs(vc)
136 
137  ijkn1 = indijk(i,j,k+1,inoff,ijnoff)
138  sx = 0.5_rfreal*(sk(xcoord,ijkn)+sk(xcoord,ijkn1))
139  sy = 0.5_rfreal*(sk(ycoord,ijkn)+sk(ycoord,ijkn1))
140  sz = 0.5_rfreal*(sk(zcoord,ijkn)+sk(zcoord,ijkn1))
141  svel = 0.5_rfreal*(skvel(ijkn*indsvel)+skvel(ijkn1*indsvel))
142  vc = sx*u + sy*v + sz*w - svel
143  srad(kcoord,ijkc) = abs(vc)
144 
145  ENDDO ! i
146  ENDDO ! j
147  ENDDO ! k
148 
149 ! treat dummy cells -----------------------------------------------------------
150 
151  CALL rflo_copymatrixpatches( ilev,region,srad )
152  CALL rflo_copymatrixedges( ilev,region,srad )
153  CALL rflo_copymatrixcorners( ilev,region,srad )
154 
155 ! finalize --------------------------------------------------------------------
156 
157 999 CONTINUE
158 
159  CALL deregisterfunction( global )
160 
161 END SUBROUTINE radi_rflo_flimspectralradii
162 
163 !******************************************************************************
164 !
165 ! RCS Revision history:
166 !
167 ! $Log: RADI_rFLO_FlimSpectralRadii.F90,v $
168 ! Revision 1.3 2008/12/06 08:44:38 mtcampbe
169 ! Updated license.
170 !
171 ! Revision 1.2 2008/11/19 22:17:50 mtcampbe
172 ! Added Illinois Open Source License/Copyright
173 !
174 ! Revision 1.1 2004/09/30 17:49:10 wasistho
175 ! prepared for full FLD radiation model
176 !
177 !
178 !
179 !******************************************************************************
180 
181 
182 
183 
184 
185 
186 
subroutine radi_rflo_flimspectralradii(region)
**********************************************************************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
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_copyvectorpatches(iLev, region, vec)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS 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 v
Definition: roccomf90.h:20
subroutine rflo_copymatrixpatches(iLev, region, mat)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
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_copymatrixcorners(iLev, region, mat)
subroutine rflo_copymatrixedges(iLev, region, mat)
blockLoc i
Definition: read.cpp:79
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 jdcend
j indices j
Definition: Indexing.h:6
**********************************************************************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 rflo_copyvectorcorners(iLev, region, vec)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflo_copyvectoredges(iLev, region, vec)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)