Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_SourceTerms.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 source term due to radiation and added to RHS of fluid eqs.
26 !
27 ! Description: For diffusion approximation, computing source term consists of:
28 ! - computing radiant energy flux (qr), added to RHS (ROSS/FLDSRC)
29 ! - computing radiant source term, added to RHS (FLDTRAN)
30 ! For general method of radiation modeling:
31 ! - computing radiation intensities I (heart of the method),
32 ! - computing radiant energy flux (qr) from I and added to RHS.
33 !
34 ! Input: regions = data of all regions
35 ! iReg = index of current region.
36 !
37 ! Output: rhs of energy equation updated by RADI source term
38 !
39 ! Notes: effective temperature is computed for all, but for general method
40 ! and full-FLD it is used merely for comparison and reference, not
41 ! employed in the computation.
42 !
43 !******************************************************************************
44 !
45 ! $Id: RADI_SourceTerms.F90,v 1.4 2008/12/06 08:44:38 mtcampbe Exp $
46 !
47 ! Copyright: (c) 2001 by the University of Illinois
48 !
49 !******************************************************************************
50 
51 SUBROUTINE radi_sourceterms( region )
52 
53  USE moddatatypes
54  USE modglobal, ONLY : t_global
55  USE moddatastruct, ONLY : t_region
57 ! RADI_ExtinctionCoef, RADI_CalcEffTemp, &
58 ! RADI_FluxLimiter
59 ! RADI_MixtSourceTermsFlim, &
60 ! RADI_GenSolveRTE, RADI_GenRadFlux
61  USE moderror
63  IMPLICIT NONE
64 
65 ! ... parameters
66  TYPE(t_region) :: region
67 
68 ! ... local variables
69  TYPE(t_global), POINTER :: global
70 
71 !******************************************************************************
72 
73  global => region%global
74  CALL registerfunction( global,'RADI_SourceTerms',&
75  'RADI_SourceTerms.F90' )
76 
77 ! compute radiation quantities and add radiation source term to RHS -----------
78 
79 #ifdef RFLO
80  IF (.NOT. region%mixtInput%radiUsed) goto 999
81 
82 ! radiation intensities and radiant energy flux
83  IF ((region%radiInput%radiModel == radi_model_rtegray) .OR. &
84  (region%radiInput%radiModel == radi_model_rteband)) THEN
85 ! CALL RADI_GenSolveRTE( region )
86 ! CALL RADI_GenRadFlux( region )
87  ELSEIF (region%radiInput%radiModel == radi_model_ross) THEN
88 ! CALL RADI_ExtinctionCoef( region )
89 ! CALL RADI_CalcEffTemp( region )
90 ! CALL RADI_FluxLimiter( region )
91  CALL radi_diffradflux( region )
92  CALL radi_diffradintens( region )
93  ELSEIF (region%radiInput%radiModel == radi_model_fldsrc) THEN
94  CALL radi_diffradflux( region )
95  CALL radi_diffradintens( region )
96  ELSEIF (region%radiInput%radiModel == radi_model_fldtran) THEN
97 ! CALL RADI_MixtSourceTermsFlim( region )
98 #ifdef PEUL
99 ! IF (global%peulUsed)
100 ! CALL RADI_PeulSourceTermsFlim( region )
101 ! ENDIF
102 #endif
103 #ifdef PEUL
104 ! IF (global%plagUsed)
105 ! CALL RADI_PlagSourceTermsFlim( region )
106 ! ENDIF
107 #endif
108  ENDIF ! radiModel
109 #endif
110 
111 ! finalize --------------------------------------------------------------------
112 
113 999 CONTINUE
114 
115  CALL deregisterfunction( global )
116 
117 END SUBROUTINE radi_sourceterms
118 
119 !******************************************************************************
120 !
121 ! RCS Revision history:
122 !
123 ! $Log: RADI_SourceTerms.F90,v $
124 ! Revision 1.4 2008/12/06 08:44:38 mtcampbe
125 ! Updated license.
126 !
127 ! Revision 1.3 2008/11/19 22:17:50 mtcampbe
128 ! Added Illinois Open Source License/Copyright
129 !
130 ! Revision 1.2 2004/09/30 17:49:10 wasistho
131 ! prepared for full FLD radiation model
132 !
133 ! Revision 1.1 2004/09/22 02:35:50 wasistho
134 ! changed file nomenclature from lower to upper case
135 !
136 ! Revision 1.4 2004/09/22 01:31:47 wasistho
137 ! switch LFD to FLD for flux limited diffusion
138 !
139 ! Revision 1.3 2004/09/18 17:41:35 wasistho
140 ! install Limited Flux Diffusion radiation
141 !
142 ! Revision 1.2 2003/07/23 03:14:33 wasistho
143 ! cured baby illness
144 !
145 ! Revision 1.1 2003/07/17 01:16:59 wasistho
146 ! initial activation rocrad
147 !
148 !
149 !
150 !******************************************************************************
151 
152 
153 
154 
155 
156 
157 
subroutine radi_sourceterms(region)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine radi_diffradflux(region)
subroutine radi_diffradintens(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469