Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_InitInputValues.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: Initialize user input and parameters derived from it for RADI to
26 ! default values.
27 !
28 ! Description: User input and derived parameters are set to default before
29 ! overruled by user input
30 !
31 ! Input: regions data
32 !
33 ! Output: regions = initial/default values.
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: RADI_InitInputValues.F90,v 1.4 2008/12/06 08:44:37 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2001 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 #ifdef RFLO
46 SUBROUTINE radi_initinputvalues( regions )
47 #endif
48 #ifdef RFLU
49 SUBROUTINE radi_initinputvalues
50 #endif
51 
52  USE moddatatypes
53  USE modglobal, ONLY : t_global
54 #ifdef RFLO
55  USE moddatastruct, ONLY : t_region
56  USE modradiation, ONLY : t_radi_input
57 #endif
58 #ifdef RFLU
59  USE modradiation, ONLY : radiinput
60 #endif
61  USE moderror
63  IMPLICIT NONE
64 
65 ! ... parameters
66 #ifdef RFLO
67  TYPE(t_region), POINTER :: regions(:)
68 #endif
69 
70 ! ... loop variables
71 #ifdef RFLO
72  INTEGER :: ireg
73 #endif
74  INTEGER :: m, n
75 
76 ! ... local variables
77  TYPE(t_global), POINTER :: global
78  TYPE(t_radi_input), POINTER :: input
79 
80  INTEGER :: errorflag
81 
82 !******************************************************************************
83 
84  global => regions(1)%global
85  CALL registerfunction( global,'RADI_InitInputValues',&
86  'RADI_InitInputValues.F90' )
87 
88 ! global values ---------------------------------------------------------------
89 
90  global%radiActive = .false.
91 
92 ! region related values -------------------------------------------------------
93 
94 #ifdef RFLO
95  DO ireg=1,global%nRegions
96 
97  input => regions(ireg)%radiInput
98 #endif
99 #ifdef RFLU
100  input => radinput
101 #endif
102 
103 ! - general
104 
105  input%radiModel = radi_model_none
106  input%media = radi_media_artif
107 
108 ! - flux limited diffusion parameter values
109 
110  input%fluxLim = fld_lim_lp
111  input%spaceDiscr = fld_discr_cen
112  input%spaceOrder = fld_discr_ord1
113  input%vis2 = 0.0_rfreal
114  input%vis4 = 0.0_rfreal
115  input%smoocf = -1._rfreal
116 
117 ! - RTE related initial values
118 
119  input%solMethod = radi_num_none
120  input%nOrdin = 1
121  input%nPol = 1
122  input%nAzi = 1
123  input%nAng = input%nOrdin
124 
125 ! - optical constants
126 
127  ALLOCATE( input%optConst(nproperty,nphase), stat = errorflag )
128  global%error = errorflag
129  IF (global%error /= 0) CALL errorstop( global,err_allocate,__line__ )
130 
131  DO n = 1,nphase
132  DO m = 1,nproperty
133  input%optConst(m,n) = 0._rfreal
134  IF (m == phase_prop_d) input%optConst(m,n) = radi_real_micron
135  ENDDO ! m
136  ENDDO ! n
137 
138 ! - set initial gas volume fraction to 1.
139  input%optConst(phase_prop_v,radi_phase_gas) = 1._rfreal
140 
141 ! - define gas ext. efficiency s.t. extinction coeff.= 1.e-4 (repr.for air)
142  input%optConst(phase_prop_q,radi_phase_gas) = 1.e-4_rfreal/1.5_rfreal* &
143  input%optConst(phase_prop_d,radi_phase_gas)/ &
144  input%optConst(phase_prop_v,radi_phase_gas)
145 #ifdef RFLO
146  ENDDO ! iReg
147 #endif
148 
149 ! finalize --------------------------------------------------------------------
150 
151  CALL deregisterfunction( global )
152 
153 END SUBROUTINE radi_initinputvalues
154 
155 !******************************************************************************
156 !
157 ! RCS Revision history:
158 !
159 ! $Log: RADI_InitInputValues.F90,v $
160 ! Revision 1.4 2008/12/06 08:44:37 mtcampbe
161 ! Updated license.
162 !
163 ! Revision 1.3 2008/11/19 22:17:50 mtcampbe
164 ! Added Illinois Open Source License/Copyright
165 !
166 ! Revision 1.2 2004/09/30 17:10:30 wasistho
167 ! prepared for full FLD radiation model
168 !
169 ! Revision 1.1 2004/09/22 02:35:49 wasistho
170 ! changed file nomenclature from lower to upper case
171 !
172 ! Revision 1.8 2004/09/22 01:30:43 wasistho
173 ! switch LFD to FLD for flux limited diffusion
174 !
175 ! Revision 1.7 2004/09/18 17:40:55 wasistho
176 ! install Limited Flux Diffusion radiation
177 !
178 ! Revision 1.6 2003/08/01 22:16:20 wasistho
179 ! prepared rocrad for Genx
180 !
181 ! Revision 1.5 2003/07/30 22:23:18 wasistho
182 ! enter part and smoke data into radiation
183 !
184 ! Revision 1.4 2003/07/23 03:13:25 wasistho
185 ! cured baby illness
186 !
187 ! Revision 1.3 2003/07/22 03:03:47 wasistho
188 ! include logical write-parameter
189 !
190 ! Revision 1.2 2003/07/18 01:38:54 wasistho
191 ! removed bcModel from input data structure
192 !
193 ! Revision 1.1 2003/07/17 01:16:59 wasistho
194 ! initial activation rocrad
195 !
196 !
197 !
198 !******************************************************************************
199 
200 
201 
202 
203 
204 
205 
FT m(int i, int j) const
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine input(X, NNODE, NDC, NCELL, NFCE, NBPTS, NBFACE, ITYP, NPROP, XBNDY, XFAR, YFAR, ZFAR)
const NT & n
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469