Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_CheckUserInput.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: check user input for PLAG.
26 !
27 ! Description: none.
28 !
29 ! Input: regions = pointer to all regions.
30 !
31 ! Output: none.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: PLAG_CheckUserInput.F90,v 1.7 2008/12/06 08:44:33 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE plag_checkuserinput( regions )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE modmixture, ONLY : t_mixt_input
49  USE modpartlag, ONLY : t_plag_input
50  USE moderror
51  USE modparameters
53  IMPLICIT NONE
54 
55 ! ... parameters
56  TYPE(t_region), POINTER :: regions(:)
57 
58 ! ... loop variables
59  INTEGER :: icont, ireg
60 
61 ! ... local variables
62  CHARACTER(CHRLEN) :: rcsidentstring
63 
64  INTEGER :: nregions
65 
66  TYPE(t_global), POINTER :: global
67 
68 !******************************************************************************
69 
70  rcsidentstring = '$RCSfile: PLAG_CheckUserInput.F90,v $ $Revision: 1.7 $'
71 
72 #ifdef RFLO
73  global => regions(1)%global
74 #endif
75 
76 #ifdef RFLU
77  global => regions(0)%global
78 #endif
79 
80  CALL registerfunction( global, 'PLAG_CheckUserInput',&
81  'PLAG_CheckUserInput.F90' )
82 
83 ! Check for consistency with flow solver -------------------------------------
84 
85 #ifdef RFLO
86  nregions = global%nRegions
87 #endif
88 
89 #ifdef RFLU
90  nregions = global%nRegionsLocal
91 #endif
92 
93  DO ireg = 1, nregions
94  IF ( global%flowType == flow_steady ) THEN
95  WRITE(stdout,1000) ireg,global%flowType
96  CALL errorstop( global,err_plag_module,__line__ )
97  END IF ! flowType
98 
99  IF ( .NOT. regions(ireg)%mixtInput%computeTv ) THEN
100  WRITE(stdout,1010) ireg,regions(ireg)%mixtInput%computeTv
101  CALL errorstop( global,err_plag_module,__line__ )
102  END IF ! computeTv
103 
104 ! - viscModel needs to be checked again because computeTv may have been turned
105 ! - on after the previous check (only necessary for RFLO case: the RFLU case
106 ! - this is caught in RFLU_CheckDerivedUserInput)
107 
108  IF ( regions(ireg)%mixtInput%computeTv .AND. &
109  ( regions(ireg)%mixtInput%viscModel < visc_suthr .OR. &
110  regions(ireg)%mixtInput%viscModel > visc_antib ) ) THEN
111  CALL errorstop(global,err_unknown_viscmodel,__line__)
112  END IF ! viscModel
113 
114 #ifdef RFLO
115  IF ( regions(ireg)%plagInput%intrplMixtModel /= zeroth_order) THEN
116  WRITE(stdout,1030) ireg,regions(ireg)%plagInput%intrplMixtModel
117  CALL errorstop( global,err_plag_intrplmodel,__line__ )
118  END IF ! intrplMixtModel
119 #endif
120 
121 #ifdef RFLU
122  IF ( regions(ireg)%plagInput%intrplMixtModel > first_order) THEN
123  WRITE(stdout,1030) ireg,regions(ireg)%plagInput%intrplMixtModel
124  CALL errorstop( global,err_plag_intrplmodel,__line__ )
125  END IF ! intrplMixtModel
126 
127  IF ( regions(ireg)%plagInput%intrplMixtModel /=zeroth_order .AND. &
128  regions(ireg)%mixtInput%spaceOrder == 1 ) THEN
129  CALL errorstop(global,err_plag_intrplmodel,__line__)
130  END IF ! intrplMixtModel
131 #endif
132 
133  IF ( regions(ireg)%plagInput%breakupModel < plag_breakup_nomodel .OR. &
134  regions(ireg)%plagInput%breakupModel > plag_breakup_model1 ) THEN
135  WRITE(stdout,1040) ireg,regions(ireg)%plagInput%breakupModel
136  CALL errorstop( global,err_plag_breakupmodel,__line__ )
137  END IF ! breakupModel
138 
139  IF ( regions(ireg)%plagInput%breakupWebSwi < plag_breakup_nowebswi .OR. &
140  regions(ireg)%plagInput%breakupWebSwi > plag_breakup_webswi1 ) THEN
141  WRITE(stdout,1040) ireg,regions(ireg)%plagInput%breakupWebSwi
142  CALL errorstop( global,err_plag_breakupwebswi,__line__ )
143  END IF ! breakupModel
144 
145  IF ( regions(ireg)%plagInput%injcDiamDist < plag_injc_lognorm .OR. &
146  regions(ireg)%plagInput%injcDiamDist > plag_injc_pdf) THEN
147  WRITE(stdout,1050) ireg,regions(ireg)%plagInput%injcDiamDist
148  CALL errorstop( global,err_plag_injcdiamdist,__line__ )
149  END IF ! injcDiamDist
150 
151  IF ( regions(ireg)%plagInput%injcDiamDist == plag_injc_logskwd .AND. &
152  regions(ireg)%plagInput%injcDiamMean/&
153  regions(ireg)%plagInput%injcDiamMax > 0.8_rfreal ) THEN
154  WRITE(stdout,1060) ireg,regions(ireg)%plagInput%injcDiamMean/&
155  regions(ireg)%plagInput%injcDiamMax
156  CALL errorstop( global,err_plag_injcdiam,__line__ )
157  END IF ! injcDiamDist
158 
159  IF ( regions(ireg)%plagInput%injcDiamDist == plag_injc_logskwd .AND. &
160  regions(ireg)%plagInput%injcDiamMin/&
161  regions(ireg)%plagInput%injcDiamMean > 0.8_rfreal ) THEN
162  WRITE(stdout,1070) ireg,regions(ireg)%plagInput%injcDiamMin/&
163  regions(ireg)%plagInput%injcDiamMean
164  CALL errorstop( global,err_plag_injcdiam,__line__ )
165  END IF ! injcDiamDist
166 
167  IF ( regions(ireg)%plagInput%ejecModel < plag_ejec_model1 .OR. &
168  regions(ireg)%plagInput%ejecModel > plag_ejec_cre ) THEN
169  WRITE(stdout,1050) ireg,regions(ireg)%plagInput%ejecModel
170  CALL errorstop( global,err_plag_ejecmodel,__line__ )
171  END IF ! ejecModel
172 
173  IF ( regions(ireg)%plagInput%findPclMethod < find_pcl_method_traj_fast .OR. &
174  regions(ireg)%plagInput%findPclMethod > find_pcl_method_lohner ) THEN
175  WRITE(stdout,1050) ireg,regions(ireg)%plagInput%findPclMethod
176  CALL errorstop( global,err_plag_findpcl,__line__ )
177  END IF ! ejecModel
178 
179  END DO ! iReg
180 
181 ! finalize --------------------------------------------------------------------
182 
183  CALL deregisterfunction( global )
184 
185 1000 FORMAT('Region ',i5,', flowType ',i1)
186 1010 FORMAT('Region ',i5,', computeTv ',l1)
187 1030 FORMAT('Region ',i5,', intrplMixtModel ',i1)
188 1040 FORMAT('Region ',i5,', breakupModel ',i1)
189 1050 FORMAT('Region ',i5,', injectionModel ',i1)
190 1060 FORMAT('Region ',i5,', injcDiamMean/injcDiamMax = ',f12.5)
191 1070 FORMAT('Region ',i5,', injcDiamMin /injcDiamMean = ',f12.5)
192 
193 END SUBROUTINE plag_checkuserinput
194 
195 !******************************************************************************
196 !
197 ! RCS Revision history:
198 !
199 ! $Log: PLAG_CheckUserInput.F90,v $
200 ! Revision 1.7 2008/12/06 08:44:33 mtcampbe
201 ! Updated license.
202 !
203 ! Revision 1.6 2008/11/19 22:17:45 mtcampbe
204 ! Added Illinois Open Source License/Copyright
205 !
206 ! Revision 1.5 2005/11/30 22:18:04 fnajjar
207 ! Added checks for intrplMixtModel
208 !
209 ! Revision 1.4 2005/07/18 20:46:29 fnajjar
210 ! Bug fix of nRegions for proper handling with MPI
211 !
212 ! Revision 1.3 2005/04/27 18:35:57 fnajjar
213 ! Included trap error for findPclMethod
214 !
215 ! Revision 1.2 2005/04/25 18:39:10 luca1
216 ! Imposed PDF from file option for random particle ejection
217 !
218 ! Revision 1.1 2004/12/01 20:57:22 fnajjar
219 ! Initial revision after changing case
220 !
221 ! Revision 1.12 2004/07/30 22:47:36 jferry
222 ! Implemented Equilibrium Eulerian method for Rocflu
223 !
224 ! Revision 1.11 2004/06/17 15:19:03 fnajjar
225 ! Added infrastructure for ejection model
226 !
227 ! Revision 1.10 2004/06/17 14:31:25 fnajjar
228 ! Redefined error parameter from ERR_PLAG_INJCMODEL to ERR_PLAG_INCJDIAMDIST
229 !
230 ! Revision 1.9 2004/06/16 23:03:49 fnajjar
231 ! Renamed variabled for CRE kernel
232 !
233 ! Revision 1.8 2004/03/05 22:09:03 jferry
234 ! created global variables for peul, plag, and inrt use
235 !
236 ! Revision 1.7 2004/03/03 23:55:40 jferry
237 ! Allowed particles to be run with Euler case
238 !
239 ! Revision 1.6 2003/09/18 20:18:42 fnajjar
240 ! Change msg to STDOUT for WRITE statement
241 !
242 ! Revision 1.5 2003/09/18 20:16:53 fnajjar
243 ! Bug fix for ratio in injection model
244 !
245 ! Revision 1.4 2003/09/17 21:05:45 fnajjar
246 ! Added error trap for injection model
247 !
248 ! Revision 1.3 2003/09/13 20:14:21 fnajjar
249 ! Added infrastructure for Breakup model
250 !
251 ! Revision 1.2 2003/09/10 23:35:50 fnajjar
252 ! Removed flags that are subsumed with Rocinteract
253 !
254 ! Revision 1.1 2002/10/25 14:14:44 f-najjar
255 ! Initial Import of Rocpart
256 !
257 !******************************************************************************
258 
259 
260 
261 
262 
263 
264 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine plag_checkuserinput(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469