Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_CheckDerivedUserInput.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 parameters specified by the user:
26 ! These checks require knowledge of input to all MP modules
27 !
28 ! Description: None.
29 !
30 ! Input:
31 ! regions Region data
32 !
33 ! Output: None.
34 !
35 ! Notes:
36 !
37 ! *****************************************************************************
38 !
39 ! $Id: RFLU_CheckDerivedUserInput.F90,v 1.6 2008/12/06 08:44:11 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2004 by the University of Illinois
42 !
43 ! *****************************************************************************
44 
45 SUBROUTINE rflu_checkderiveduserinput(regions)
46 
47  USE moddatatypes
48  USE modglobal, ONLY: t_global
49  USE modmixture, ONLY: t_mixt_input
50  USE moddatastruct, ONLY: t_region
51  USE moderror
52  USE modparameters
53  USE modmpi
54 
55  IMPLICIT NONE
56 
57 ! *****************************************************************************
58 ! Arguments
59 ! *****************************************************************************
60 
61  TYPE(t_region), DIMENSION(:), POINTER :: regions
62 
63 ! *****************************************************************************
64 ! Locals
65 ! *****************************************************************************
66 
67  INTEGER :: ireg
68  CHARACTER(CHRLEN) :: rcsidentstring
69  TYPE(t_mixt_input), POINTER :: pmixtinput
70  TYPE(t_global), POINTER :: global
71 
72 ! *****************************************************************************
73 ! Start
74 ! *****************************************************************************
75 
76  rcsidentstring = &
77  '$RCSfile: RFLU_CheckDerivedUserInput.F90,v $ $Revision: 1.6 $'
78 
79  global => regions(1)%global
80 
81  CALL registerfunction(global,'RFLU_CheckDerivedUserInput',&
82  'RFLU_CheckDerivedUserInput.F90')
83 
84 ! *****************************************************************************
85 ! Check region related data
86 ! *****************************************************************************
87 
88  DO ireg = lbound(regions,1),ubound(regions,1)
89  pmixtinput => regions(ireg)%mixtInput
90 
91 #ifdef PLAG
92 ! =============================================================================
93 ! Check for consistency between RK scheme and PLAG module
94 ! =============================================================================
95 
96  IF ( (global%plagUsed .EQV. .true.) .AND. &
97  (global%rkScheme /= rk_scheme_3_wray) ) THEN
98  CALL errorstop(global,err_rk_scheme_invalid,__line__, &
99  'PLAG requires RK3.')
100  END IF ! global
101 
102 ! =============================================================================
103 ! Check for consistency between PLAG module and flag for converting
104 ! Lagrangian to Eulerian field
105 ! =============================================================================
106 
107  IF ( global%plagUsed .EQV. .false. ) THEN
108  IF ( global%postLag2EulFlag .EQV. .true. ) THEN
109  IF ( ireg == lbound(regions,1) ) THEN
110  global%warnCounter = global%warnCounter + 1
111 
112  WRITE(stdout,'(A,3X,A)') solver_name,'*** WARNING *** Invalid '// &
113  'input for Eulerian postprocessing flag.'
114  WRITE(stdout,'(A,20X,A)') solver_name,'Setting flag to false.'
115  END IF ! iReg
116 
117  global%postLag2EulFlag = .false.
118  END IF ! global%postLag2EulFlag
119  END IF ! global%plagUsed
120 #endif
121 
122 #ifndef TURB
123 ! =============================================================================
124 ! Check for consistency between flow model and state of TURB module
125 ! =============================================================================
126 
127  IF ( pmixtinput%flowModel == flow_navst .AND. &
128  pmixtinput%turbModel /= turb_model_none ) THEN
129  CALL errorstop(global,err_turb_module,__line__, &
130  'Turbulence is on, compile TURB')
131  END IF ! pMixtInput
132 #endif
133 
134 ! =============================================================================
135 ! Check for valid input for viscosity model
136 ! =============================================================================
137 
138  IF ( pmixtinput%computeTv .AND. &
139  ( pmixtinput%viscModel < visc_suthr .OR. &
140  pmixtinput%viscModel > visc_antib ) ) THEN
141  CALL errorstop(global,err_unknown_viscmodel,__line__)
142  END IF ! pMixtInput
143  END DO ! iReg
144 
145 ! *****************************************************************************
146 ! End
147 ! *****************************************************************************
148 
149  CALL deregisterfunction(global)
150 
151 END SUBROUTINE rflu_checkderiveduserinput
152 
153 ! *****************************************************************************
154 !
155 ! RCS Revision history:
156 !
157 ! $Log: RFLU_CheckDerivedUserInput.F90,v $
158 ! Revision 1.6 2008/12/06 08:44:11 mtcampbe
159 ! Updated license.
160 !
161 ! Revision 1.5 2008/11/19 22:17:24 mtcampbe
162 ! Added Illinois Open Source License/Copyright
163 !
164 ! Revision 1.4 2005/12/10 16:54:03 haselbac
165 ! Added check for postLag2EulFlag
166 !
167 ! Revision 1.3 2004/12/04 02:33:12 haselbac
168 ! Bug fix: Missing brackets in logical expression
169 !
170 ! Revision 1.2 2004/11/30 20:07:48 fnajjar
171 ! Added error trap for running PLAG with none RK3 scheme
172 !
173 ! Revision 1.1 2004/07/30 22:47:35 jferry
174 ! Implemented Equilibrium Eulerian method for Rocflu
175 !
176 ! *****************************************************************************
177 
178 
179 
180 
181 
182 
183 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine rflu_checkderiveduserinput(regions)
subroutine deregisterfunction(global)
Definition: ModError.F90:469