Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_MixtSourceTermsFlim.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 radiation source terms to the rhs of fluid Energy eq.
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%mixt%rhs, radiaton source terms added to mixture rhs
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: RADI_MixtSourceTermsFlim.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_mixtsourcetermsflim( 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(:,:), rhs(:,:), vol(:)
70  REAL(RFREAL), POINTER :: rcv(:,:), coef(:,:)
71  REAL(RFREAL) :: stboltz, fourstb, planckalp, btermalp, sterm
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_MixtSourceTermsFlim',&
82  'RADI_MixtSourceTermsFlim.F90' )
83 
84 ! get coefficients and parameters ---------------------------------------------
85 
86  stboltz = region%radiInput%stBoltz
87  fourstb = 4._rfreal*stboltz
88 
89 ! get dimensions and pointers -------------------------------------------------
90 
91 #ifdef RFLO
92  ilev = region%currLevel
93 
94  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
95  jdcbeg,jdcend,kdcbeg,kdcend )
96  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
97 
98  dv => region%levels(ilev)%mixt%dv
99  rhs => region%levels(ilev)%mixt%rhs
100  rcv => region%levels(ilev)%radi%cv
101  coef => region%levels(ilev)%radi%radCoef
102  vol => region%levels(ilev)%grid%vol
103 
104  DO k=kdcbeg,kdcend
105  DO j=jdcbeg,jdcend
106  DO i=idcbeg,idcend
107  ijkc = indijk(i ,j ,k ,icoff,ijcoff)
108 #endif
109 #ifdef RFLU
110  ibc = 1
111  iec = region%grid%nCellsTot
112 
113  dv => region%mixt%dv
114  rhs => region%mixt%rhs
115  rcv => region%radi%cv
116  coef => region%radi%radCoef
117  vol => region%grid%vol
118 
119  DO ijkc = ibc,iec
120 #endif
121 ! ----- src term = bbSourceAlp-planckAlp*c*Er ! bbSourceAlp=planckAlp*bTermAlp
122 
123  planckalp = coef(ijkc,radi_coeff_planck)
124  btermalp = fourstb*dv(dv_mixt_temp,ijkc)**4
125  sterm = btermalp - dv(dv_mixt_soun,ijkc)*rcv(cv_radi_ener,ijkc)
126  sterm = planckalp*sterm
127 
128  rhs(cv_mixt_ener,ijkc) = rhs(cv_mixt_ener,ijkc) - vol(ijkc)*sterm
129 
130 #ifdef RFLO
131  ENDDO ! i
132  ENDDO ! j
133  ENDDO ! k
134 #endif
135 #ifdef RFLU
136  ENDDO ! ijkC
137 #endif
138 
139 ! finalize --------------------------------------------------------------------
140 
141  CALL deregisterfunction( global )
142 
143 END SUBROUTINE radi_mixtsourcetermsflim
144 
145 !******************************************************************************
146 !
147 ! RCS Revision history:
148 !
149 ! $Log: RADI_MixtSourceTermsFlim.F90,v $
150 ! Revision 1.3 2008/12/06 08:44:37 mtcampbe
151 ! Updated license.
152 !
153 ! Revision 1.2 2008/11/19 22:17:50 mtcampbe
154 ! Added Illinois Open Source License/Copyright
155 !
156 ! Revision 1.1 2004/09/30 17:49:10 wasistho
157 ! prepared for full FLD radiation model
158 !
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
NT rhs
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
subroutine radi_mixtsourcetermsflim(region)
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 deregisterfunction(global)
Definition: ModError.F90:469