Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_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: RFLO_CheckDerivedUserInput.F90,v 1.5 2008/12/06 08:44:26 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2004 by the University of Illinois
42 !
43 ! *****************************************************************************
44 
45 SUBROUTINE rflo_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: RFLO_CheckDerivedUserInput.F90,v $ $Revision: 1.5 $'
78 
79  global => regions(1)%global
80 
81  CALL registerfunction(global,'RFLO_CheckDerivedUserInput',&
82  'RFLO_CheckDerivedUserInput.F90')
83 
84 ! *****************************************************************************
85 ! Check region related data
86 ! *****************************************************************************
87 
88  DO ireg=1,global%nRegions
89  pmixtinput => regions(ireg)%mixtInput
90 
91 ! TEMPORARY: Deactivated while checking RK3 Stability
92 #ifdef PLAG
93 ! =============================================================================
94 ! Check for consistency between RK scheme and PLAG module
95 ! =============================================================================
96 
97 ! IF ( (global%plagUsed .EQV. .TRUE.) .AND. &
98 ! (global%rkScheme /= RK_SCHEME_3_WRAY) ) THEN
99 ! CALL ErrorStop(global,ERR_RK_SCHEME_INVALID,__LINE__, &
100 ! 'PLAG requires RK3.')
101 ! END IF ! global
102 #endif
103 ! END TEMPORARY: Deactivated while checking RK3 Stability
104 
105 #ifndef TURB
106 ! =============================================================================
107 ! Check for consistency between flow model and state of TURB module
108 ! =============================================================================
109 
110  IF ( pmixtinput%flowModel == flow_navst .AND. &
111  pmixtinput%turbModel /= turb_model_none ) THEN
112  CALL errorstop(global,err_turb_module,__line__, &
113  'Turbulence is on, compile TURB')
114  END IF ! pMixtInput
115 #endif
116 
117 ! =============================================================================
118 ! Check for valid input for viscosity model
119 ! =============================================================================
120 
121  IF ( pmixtinput%computeTv .AND. &
122  ( pmixtinput%viscModel < visc_suthr .OR. &
123  pmixtinput%viscModel > visc_antib ) ) THEN
124  CALL errorstop(global,err_unknown_viscmodel,__line__)
125  END IF ! pMixtInput
126  END DO ! iReg
127 
128 ! *****************************************************************************
129 ! End
130 ! *****************************************************************************
131 
132  CALL deregisterfunction(global)
133 
134 END SUBROUTINE rflo_checkderiveduserinput
135 
136 ! *****************************************************************************
137 !
138 ! RCS Revision history:
139 !
140 ! $Log: RFLO_CheckDerivedUserInput.F90,v $
141 ! Revision 1.5 2008/12/06 08:44:26 mtcampbe
142 ! Updated license.
143 !
144 ! Revision 1.4 2008/11/19 22:17:37 mtcampbe
145 ! Added Illinois Open Source License/Copyright
146 !
147 ! Revision 1.3 2004/12/06 21:07:57 fnajjar
148 ! Deactivated consistency check for PLAG and RK scheme while testing stability
149 !
150 ! Revision 1.2 2004/12/04 02:39:10 haselbac
151 ! Bug fix: Missing brackets in logical expression
152 !
153 ! Revision 1.1 2004/11/30 20:12:48 fnajjar
154 ! Initial import
155 !
156 ! *****************************************************************************
157 
158 
159 
160 
161 
162 
163 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_checkderiveduserinput(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469