Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_FlimSourceTerms.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: added source terms of FLD transport equation to the rhs.
26 !
27 ! Description: see formulation of FLD (Howell et al. JCP 184 (2003) 53-78)
28 !
29 ! Input: region = data of current region,
30 !
31 ! Output: region%levels%radi%rhs , source terms added to rhs
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: RADI_FlimSourceTerms.F90,v 1.3 2008/12/06 08:44:37 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE radi_flimsourceterms( region )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE moderror
49  USE modparameters
51 #ifdef RFLO
53 
54 #include "Indexing.h"
55 #endif
56 
57  IMPLICIT NONE
58 
59 ! ... parameters
60  TYPE(t_region) :: region
61 
62 ! ... loop variables
63  INTEGER :: i, j, k, ijkc, icon
64 
65 ! ... local variables
66  TYPE(t_global), POINTER :: global
67 
68  INTEGER :: ibc, iec, nconstit
69  REAL(RFREAL), POINTER :: dv(:,:), vol(:)
70  REAL(RFREAL), POINTER :: rcv(:,:), rrhs(:,:)
71  REAL(RFREAL) :: stboltz, sterm, mplanck
72 
73 #ifdef RFLO
74  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
75  INTEGER :: ilev, icoff,ijcoff
76 #endif
77 
78 !******************************************************************************
79 
80  global => region%global
81  CALL registerfunction( global,'RADI_FlimSourceTerms',&
82  'RADI_FlimSourceTerms.F90' )
83 
84 ! get coefficients and parameters ---------------------------------------------
85 
86  stboltz = region%radiInput%stBoltz
87 
88 ! get dimensions and pointers -------------------------------------------------
89 
90 #ifdef RFLO
91  ilev = region%currLevel
92 
93  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
94  jdcbeg,jdcend,kdcbeg,kdcend )
95  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
96 
97  dv => region%levels(ilev)%mixt%dv
98  rcv => region%levels(ilev)%radi%cv
99  rrhs => region%levels(ilev)%radi%rhs
100  vol => region%levels(ilev)%grid%vol
101 
102  DO k=kdcbeg,kdcend
103  DO j=jdcbeg,jdcend
104  DO i=idcbeg,idcend
105  ijkc = indijk(i ,j ,k ,icoff,ijcoff)
106 #endif
107 #ifdef RFLU
108  ibc = 1
109  iec = region%grid%nCellsTot
110 
111  dv => region%mixt%dv
112  rcv => region%radi%cv
113  rrhs => region%radi%rhs
114  vol => region%grid%vol
115 
116  DO ijkc = ibc,iec
117 #endif
118  sterm = 0._rfreal
119 ! DO iCon = 1, nConstit
120 ! sTerm = sTerm + volFrac(iCon,ijkC)*bbSource(iCon,ijkC)
121 ! ENDDO
122  sterm = sterm - mplanck*dv(dv_mixt_soun,ijkc)*rcv(cv_radi_ener,ijkc)
123 
124  rrhs(cv_radi_ener,ijkc) = rrhs(cv_radi_ener,ijkc) + vol(ijkc)*sterm
125 
126 #ifdef RFLO
127  ENDDO ! i
128  ENDDO ! j
129  ENDDO ! k
130 #endif
131 #ifdef RFLU
132  ENDDO ! ijkC
133 #endif
134 
135 ! finalize --------------------------------------------------------------------
136 
137  CALL deregisterfunction( global )
138 
139 END SUBROUTINE radi_flimsourceterms
140 
141 !******************************************************************************
142 !
143 ! RCS Revision history:
144 !
145 ! $Log: RADI_FlimSourceTerms.F90,v $
146 ! Revision 1.3 2008/12/06 08:44:37 mtcampbe
147 ! Updated license.
148 !
149 ! Revision 1.2 2008/11/19 22:17:50 mtcampbe
150 ! Added Illinois Open Source License/Copyright
151 !
152 ! Revision 1.1 2004/09/30 17:49:10 wasistho
153 ! prepared for full FLD radiation model
154 !
155 !
156 !
157 !******************************************************************************
158 
159 
160 
161 
162 
163 
164 
**********************************************************************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_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
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
subroutine radi_flimsourceterms(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 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 deregisterfunction(global)
Definition: ModError.F90:469