Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RADI_PrintUserInput.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: Write out RADI user input and parameters derived from it for
26 ! checking purposes.
27 !
28 ! Description: none.
29 !
30 ! Input: region = user input in current region.
31 !
32 ! Output: to standard output (monitor).
33 !
34 ! Notes: none.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RADI_PrintUserInput.F90,v 1.4 2008/12/06 08:44:37 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 #ifdef RFLO
45 SUBROUTINE radi_printuserinput( region )
46 #endif
47 #ifdef RFLU
48 SUBROUTINE radi_printuserinput
49 #endif
50 
51  USE moddatatypes
52  USE modglobal, ONLY : t_global
53 #ifdef RFLO
54  USE moddatastruct, ONLY : t_region
55 #endif
56  USE modradiation
57  USE moderror
58  USE modparameters
60  IMPLICIT NONE
61 
62 ! ... parameters
63 #ifdef RFLO
64  TYPE(t_region) :: region
65 #endif
66 
67 ! ... loop variables
68  INTEGER :: n
69 
70 ! ... local variables
71  TYPE(t_global), POINTER :: global
72 
73  INTEGER :: radimodel, media, solmethod, npol, nazi, nang
74  INTEGER :: fluxlim, discrtype, discrorder
75  REAL(RFREAL) :: extcoef, smoocf, k2, ook4
76  REAL(RFREAL), POINTER :: angles(:,:), optconst(:,:)
77 
78 !******************************************************************************
79 
80  global => region%global
81  CALL registerfunction( global,'RADI_PrintUserInput',&
82  'RADI_PrintUserInput.F90' )
83 
84 ! input parameters ------------------------------------------------------------
85 
86 #ifdef RFLO
87  radimodel = region%radiInput%radiModel
88  media = region%radiInput%media
89  fluxlim = region%radiInput%fluxLim
90  smoocf = region%radiInput%smoocf
91  discrtype = region%radiInput%spaceDiscr
92  k2 = region%radiInput%vis2
93  ook4 = 1._rfreal/region%radiInput%vis4
94  discrorder= region%radiInput%spaceOrder
95  solmethod = region%radiInput%solMethod
96  npol = region%radiInput%nPol
97  nazi = region%radiInput%nAzi
98  nang = region%radiInput%nAng
99  angles => region%radiInput%angles
100  optconst => region%radiInput%optConst
101 #endif
102 #ifdef RFLU
103  radimodel = radiinput%radiModel
104  media = radiinput%media
105  fluxlim = radiinput%fluxLim
106  smoocf = radiinput%smoocf
107  discrtype = radiinput%spaceDiscr
108  k2 = radiinput%vis2
109  ook4 = 1._rfreal/radiinput%vis4
110  discrorder= radiinput%spaceOrder
111  solmethod = radiinput%solMethod
112  npol = radiinput%nPol
113  nazi = radiinput%nAzi
114  nang = radiinput%nAng
115  angles => radiinput%angles
116  optconst => radiinput%optConst
117 #endif
118 
119 ! output selected general parameters to monitor
120 
121  WRITE(stdout,1005) solver_name//' Radiation:'
122 
123  IF (radimodel == radi_model_ross) THEN
124  WRITE(stdout,1030) solver_name//' radiation model = Rosseland Diff. approx.'
125  ELSEIF (radimodel == radi_model_fldsrc) THEN
126  WRITE(stdout,1030) solver_name//' radiation model = simple Limited Flux Diff.'
127  ELSEIF (radimodel == radi_model_fldtran) THEN
128  WRITE(stdout,1030) solver_name//' radiation model = full Limited Flux Diff.'
129  ELSEIF (radimodel == radi_model_rtegray) THEN
130  WRITE(stdout,1030) solver_name//' radiation model = RTE gray gas'
131  ELSEIF (radimodel == radi_model_rteband) THEN
132  WRITE(stdout,1030) solver_name//' radiation model = RTE non-gray gas'
133  ENDIF
134 
135  IF (media == radi_media_artif) THEN
136  WRITE(stdout,1030) solver_name//' radiative media = artificial multi-phase'
137  ELSEIF (media == radi_media_real) THEN
138  WRITE(stdout,1030) solver_name//' radiative media = real multi-phase'
139  ENDIF
140 
141  WRITE(stdout,1030) solver_name//' relevant input-data based on above model:'
142 
143 ! optical constants and extinction coefficients
144 
145  IF (media == radi_media_artif) THEN
146  IF (optconst(phase_prop_v,radi_phase_gas) > radi_real_small) THEN
147  WRITE(stdout,1030) solver_name//' media phase = gas'
148  WRITE(stdout,1010) solver_name//' vol.fraction =', &
149  optconst(phase_prop_v,radi_phase_gas)
150  WRITE(stdout,1010) solver_name//' Q-extinction =', &
151  optconst(phase_prop_q,radi_phase_gas)
152  WRITE(stdout,1010) solver_name//' molecule diam.=', &
153  optconst(phase_prop_d,radi_phase_gas)
154  ENDIF
155  IF (optconst(phase_prop_v,radi_phase_conpart) > radi_real_small) THEN
156  WRITE(stdout,1030) solver_name//' media phase = continuum particles'
157  WRITE(stdout,1010) solver_name//' vol.fraction =', &
158  optconst(phase_prop_v,radi_phase_conpart)
159  WRITE(stdout,1010) solver_name//' Q-extinction =', &
160  optconst(phase_prop_q,radi_phase_conpart)
161  WRITE(stdout,1010) solver_name//' particle diam.=', &
162  optconst(phase_prop_d,radi_phase_conpart)
163  ENDIF
164  IF (optconst(phase_prop_v,radi_phase_dispart) > radi_real_small) THEN
165  WRITE(stdout,1030) solver_name//' media phase = discrete particles'
166  WRITE(stdout,1010) solver_name//' vol.fraction =', &
167  optconst(phase_prop_v,radi_phase_dispart)
168  WRITE(stdout,1010) solver_name//' Q-extinction .=', &
169  optconst(phase_prop_q,radi_phase_dispart)
170  WRITE(stdout,1010) solver_name//' particle diam.=', &
171  optconst(phase_prop_d,radi_phase_dispart)
172  ENDIF
173 
174  extcoef = 0._rfreal
175  DO n = 1,nphase
176  extcoef = extcoef + optconst(phase_prop_v,n)* &
177  optconst(phase_prop_q,n)/optconst(phase_prop_d,n)
178  ENDDO
179  extcoef = 1.5_rfreal*extcoef
180  WRITE(stdout,1010) solver_name//' artif. ext.coef.=', extcoef
181  WRITE(stdout,1010) solver_name//' trshld ext.coef.=', radi_real_ecmin
182  IF (extcoef < radi_real_ecmin ) &
183  WRITE(stdout,1030) solver_name//' radiation computation has no effect'
184 
185  ELSEIF (media == radi_media_real) THEN
186  IF (optconst(phase_prop_v,radi_phase_gas) > radi_real_small) THEN
187  WRITE(stdout,1030) solver_name//' media phase = gas'
188  WRITE(stdout,1010) solver_name//' Q-extinction .=', &
189  optconst(phase_prop_q,radi_phase_gas)
190  ENDIF
191  IF (optconst(phase_prop_v,radi_phase_conpart) > radi_real_small) THEN
192  WRITE(stdout,1030) solver_name//' media phase = continuum particles'
193  WRITE(stdout,1010) solver_name//' Q-extinction .=', &
194  optconst(phase_prop_q,radi_phase_conpart)
195  ENDIF
196  IF (optconst(phase_prop_v,radi_phase_dispart) > radi_real_small) THEN
197  WRITE(stdout,1030) solver_name//' media phase = discrete particles'
198  WRITE(stdout,1010) solver_name//' Q-extinction .=', &
199  optconst(phase_prop_q,radi_phase_dispart)
200  ENDIF ! media phase
201 
202  WRITE(stdout,1010) solver_name//' trshld ext.coef.=', radi_real_ecmin
203  ENDIF ! radiation media
204 
205 ! output selected parameters pertinent to RTE (general) method to monitor
206 
207  IF ((radimodel == radi_model_fldsrc) .OR. &
208  (radimodel == radi_model_fldtran)) THEN
209 
210  IF (fluxlim == fld_lim_none) THEN
211  WRITE(stdout,1030) solver_name//' flux limiter = none'
212  ELSEIF (fluxlim == fld_lim_lp) THEN
213  WRITE(stdout,1030) solver_name//' flux limiter = Levermore-Pomraning'
214  ENDIF
215 
216  IF (radimodel == radi_model_fldtran) THEN
217  WRITE(stdout,1030) solver_name//' FLDTRAN Numeric :'
218  WRITE(stdout,1020) solver_name//' FLD smoocf =',smoocf
219  IF (discrtype == fld_discr_cen) THEN
220  IF (discrorder == fld_discr_ord1) &
221  WRITE(stdout,1030) solver_name//' FLD spc discr. = 1st order central'
222  IF (discrorder == fld_discr_ord2) &
223  WRITE(stdout,1030) solver_name//' FLD spc discr. = 2nd order central'
224  WRITE(stdout,1020) solver_name//' FLD k2 =',k2
225  WRITE(stdout,1020) solver_name//' FLD 1/k4 =',ook4
226  ELSEIF (discrtype == fld_discr_upw) THEN
227  IF (discrorder == fld_discr_ord1) &
228  WRITE(stdout,1030) solver_name//' FLD spc discr. = 1st order upwind'
229  IF (discrorder == fld_discr_ord2) &
230  WRITE(stdout,1030) solver_name//' FLD spc discr. = 2nd order upwind'
231  ENDIF
232  ENDIF
233 
234  ELSEIF ((radimodel == radi_model_rtegray) .OR. &
235  (radimodel == radi_model_rteband)) THEN
236 
237  IF (solmethod == radi_num_dom4) THEN
238  WRITE(stdout,1030) solver_name//' solution method = discrete ordinate S4'
239  ELSEIF (solmethod == radi_num_dom8) THEN
240  WRITE(stdout,1030) solver_name//' solution method = discrete ordinate S8'
241  ELSEIF (solmethod == radi_num_dom16) THEN
242  WRITE(stdout,1030) solver_name//' solution method = discrete ordinate S16'
243  ELSEIF (solmethod == radi_num_fvm) THEN
244  WRITE(stdout,1030) solver_name//' solution method = finite volume method'
245  ENDIF
246 
247  IF (solmethod == radi_num_fvm) THEN
248  WRITE(stdout,1020) solver_name//' N polar angles =', npol
249  WRITE(stdout,1020) solver_name//' N azimuthal =', nazi
250  ENDIF ! solMethod
251  ENDIF ! radiModel
252 
253 ! general derived parameters
254 
255  WRITE(stdout,1020) solver_name//' N intens.angles =', npol
256  WRITE(stdout, * ) solver_name//' polar angles =', &
257  angles(:,radi_angle_polar)
258  WRITE(stdout, * ) solver_name//' polar angles =', &
259  angles(:,radi_angle_azimu)
260 
261 ! finish ----------------------------------------------------------------------
262 
263  CALL deregisterfunction( global )
264 
265 1005 FORMAT(/,4x,a)
266 1010 FORMAT(6x,a,e12.5)
267 1020 FORMAT(6x,a,i4)
268 1030 FORMAT(6x,a)
269 
270 END SUBROUTINE radi_printuserinput
271 
272 !******************************************************************************
273 !
274 ! RCS Revision history:
275 !
276 ! $Log: RADI_PrintUserInput.F90,v $
277 ! Revision 1.4 2008/12/06 08:44:37 mtcampbe
278 ! Updated license.
279 !
280 ! Revision 1.3 2008/11/19 22:17:50 mtcampbe
281 ! Added Illinois Open Source License/Copyright
282 !
283 ! Revision 1.2 2004/09/30 17:11:15 wasistho
284 ! prepared for full FLD radiation model
285 !
286 ! Revision 1.1 2004/09/22 02:35:49 wasistho
287 ! changed file nomenclature from lower to upper case
288 !
289 ! Revision 1.7 2004/09/22 01:31:35 wasistho
290 ! switch LFD to FLD for flux limited diffusion
291 !
292 ! Revision 1.6 2004/09/18 17:41:27 wasistho
293 ! install Limited Flux Diffusion radiation
294 !
295 ! Revision 1.5 2004/03/05 22:09:04 jferry
296 ! created global variables for peul, plag, and inrt use
297 !
298 ! Revision 1.4 2003/07/30 22:23:41 wasistho
299 ! enter part and smoke data into radiation
300 !
301 ! Revision 1.3 2003/07/23 03:13:58 wasistho
302 ! cured baby illness
303 !
304 ! Revision 1.2 2003/07/18 01:39:08 wasistho
305 ! removed bcModel from input data structure
306 !
307 ! Revision 1.1 2003/07/17 01:16:59 wasistho
308 ! initial activation rocrad
309 !
310 !
311 !
312 !******************************************************************************
313 
314 
315 
316 
317 
318 
319 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
void int int REAL * x
Definition: read.cpp:74
const NT & n
subroutine deregisterfunction(global)
Definition: ModError.F90:469
RT a() const
Definition: Line_2.h:140