Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_DiffRadIntens.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: compute diffusion approximation (Rosseland) radiation intensity
26 ! at specified directions.
27 !
28 ! Description: none.
29 !
30 ! Input: region = data of current region.
31 !
32 ! Output: region%levels%radi%radInt(:,n) = n-directions radiation intensities
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RADI_DiffRadIntens.F90,v 1.3 2008/12/06 08:44:37 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE radi_diffradintens( region )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
50  USE moderror
51  USE modparameters
53  IMPLICIT NONE
54 
55 #include "Indexing.h"
56 
57 ! ... parameters
58  TYPE(t_region) :: region
59 
60 ! ... loop variables
61  INTEGER :: i, j, k, l
62 
63 ! ... local variables
64  TYPE(t_global), POINTER :: global
65 
66  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
67  INTEGER :: ilev, nang, icoff, ijcoff, ijkc
68 
69  REAL(RFREAL) :: stboltz, pi, rad, avgfac
70  REAL(RFREAL) :: coefc, tempc, fact, rati, adir(3), thet, phi, sgrad
71  REAL(RFREAL), POINTER :: dv(:,:), coef(:,:), radint(:,:), wvint(:,:)
72  REAL(RFREAL), POINTER :: angles(:,:), gofact(:)
73 
74 !******************************************************************************
75 
76  global => region%global
77  CALL registerfunction( global,'RADI_DiffRadIntens',&
78  'RADI_DiffRadIntens.F90' )
79 
80 ! get dimensions and pointers -------------------------------------------------
81 
82  ilev = region%currLevel
83  nang = region%radiInput%nAng
84 
85  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
86  jdcbeg,jdcend,kdcbeg,kdcend )
87  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
88 
89  dv => region%levels(ilev)%mixt%dv
90  gofact => region%levels(ilev)%radi%goFact
91  coef => region%levels(ilev)%radi%radCoef
92  radint => region%levels(ilev)%radi%radInt
93  wvint => region%levels(ilev)%radi%wvInt
94  angles => region%radiInput%angles
95 
96  stboltz = region%radiInput%stBoltz
97  pi = global%pi
98  rad = global%rad
99  avgfac = 1._rfreal/6._rfreal
100 
101  DO k=kdcbeg,kdcend
102  DO j=jdcbeg,jdcend
103  DO i=idcbeg,idcend
104  ijkc = indijk(i ,j,k,icoff,ijcoff)
105 
106  coefc = coef(ijkc,radi_coeff_extinct)
107  tempc = dv(dv_mixt_temp,ijkc)
108  fact = gofact(ijkc)*stboltz*tempc**3/pi
109  rati = 4._rfreal/coefc
110 
111 ! ----- wvInt contains grad(T)n+s+e+w+f+b
112  wvint(:,ijkc) = avgfac*wvint(:,ijkc)
113 
114 ! ----- get intensity in all given directions
115  DO l = 1,nang
116  thet = angles(l,radi_angle_polar)
117  phi = angles(l,radi_angle_azimu)
118  adir(1) = sin(thet)*cos(phi)
119  adir(2) = sin(thet)*sin(phi)
120  adir(3) = cos(thet)
121  sgrad = adir(1)*wvint(xcoord,ijkc) + &
122  adir(2)*wvint(ycoord,ijkc) + &
123  adir(3)*wvint(zcoord,ijkc)
124  radint(l,ijkc) = fact*( tempc - rati*sgrad)
125  ENDDO ! l
126 
127  ENDDO ! i
128  ENDDO ! j
129  ENDDO ! k
130 
131 ! finalize --------------------------------------------------------------------
132 
133  CALL deregisterfunction( region%global )
134 
135 END SUBROUTINE radi_diffradintens
136 
137 !******************************************************************************
138 !
139 ! RCS Revision history:
140 !
141 ! $Log: RADI_DiffRadIntens.F90,v $
142 ! Revision 1.3 2008/12/06 08:44:37 mtcampbe
143 ! Updated license.
144 !
145 ! Revision 1.2 2008/11/19 22:17:49 mtcampbe
146 ! Added Illinois Open Source License/Copyright
147 !
148 ! Revision 1.1 2004/09/22 02:35:49 wasistho
149 ! changed file nomenclature from lower to upper case
150 !
151 ! Revision 1.3 2003/07/30 22:24:43 wasistho
152 ! enter part and smoke data into radiation
153 !
154 ! Revision 1.2 2003/07/23 03:14:22 wasistho
155 ! cured baby illness
156 !
157 ! Revision 1.1 2003/07/17 01:16:59 wasistho
158 ! initial activation rocrad
159 !
160 !
161 !******************************************************************************
162 
163 
164 
165 
166 
167 
168 
**********************************************************************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
static const double pi
Definition: smooth_medial.C:43
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
NT & sin
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 radi_diffradintens(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
NT & cos