Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_PeulSourceTermsFlim.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 PEUL 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%peul%rhs, radiaton source terms added to PEUL rhs
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: RADI_PeulSourceTermsFlim.F90,v 1.4 2008/12/06 08:44:37 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE radi_peulsourcetermsflim( 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_PeulSourceTermsFlim',&
82  'RADI_PeulSourceTermsFlim.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 #ifdef PEUL
99  dv => region%levels(ilev)%peul%dv
100  rhs => region%levels(ilev)%peul%rhs
101 #endif
102  rcv => region%levels(ilev)%radi%cv
103 ! coef => region%levels(iLev)%radi%peulCoef
104  vol => region%levels(ilev)%grid%vol
105 
106  DO k=kdcbeg,kdcend
107  DO j=jdcbeg,jdcend
108  DO i=idcbeg,idcend
109  ijkc = indijk(i ,j ,k ,icoff,ijcoff)
110 #endif
111 #ifdef RFLU
112  ibc = 1
113  iec = region%grid%nCellsTot
114 
115  dv => region%peul%dv
116  rhs => region%peul%rhs
117  rcv => region%radi%cv
118 ! coef => region%radi%peulCoef
119  vol => region%grid%vol
120 
121  DO ijkc = ibc,iec
122 #endif
123 ! ----- src term = bbSourceAlp-planckAlp*c*Er ! bbSourceAlp=planckAlp*bTermAlp
124 
125 ! planckAlp = coef(ijkC,RADI_COEFF_PLANCK)
126 ! bTermAlp = fourStb*dv(DV_PEUL_TEMP,ijkC)**4
127 ! sTerm = bTermAlp - dv(DV_MIXT_SOUN,ijkC)*rcv(CV_RADI_ENER,ijkC)
128 ! sTerm = planckAlp*sTerm
129 
130 ! rhs(CV_PEUL_ENER,ijkC) = rhs(CV_PEUL_ENER,ijkC) - vol(ijkC)*sTerm
131 
132 #ifdef RFLO
133  ENDDO ! i
134  ENDDO ! j
135  ENDDO ! k
136 #endif
137 #ifdef RFLU
138  ENDDO ! ijkC
139 #endif
140 
141 ! finalize --------------------------------------------------------------------
142 
143  CALL deregisterfunction( global )
144 
145 END SUBROUTINE radi_peulsourcetermsflim
146 
147 !******************************************************************************
148 !
149 ! RCS Revision history:
150 !
151 ! $Log: RADI_PeulSourceTermsFlim.F90,v $
152 ! Revision 1.4 2008/12/06 08:44:37 mtcampbe
153 ! Updated license.
154 !
155 ! Revision 1.3 2008/11/19 22:17:50 mtcampbe
156 ! Added Illinois Open Source License/Copyright
157 !
158 ! Revision 1.2 2006/02/15 19:38:22 wasistho
159 ! put peul within ifdef
160 !
161 ! Revision 1.1 2004/09/30 17:49:10 wasistho
162 ! prepared for full FLD radiation model
163 !
164 !
165 !
166 !******************************************************************************
167 
168 
169 
170 
171 
172 
173 
**********************************************************************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
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
subroutine radi_peulsourcetermsflim(region)