Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PEUL_ReadConPartPtypeSection.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: read in user input related to individual Eulerian particle type
26 !
27 ! Description: none.
28 !
29 ! Input: user input file.
30 !
31 ! Output: regions = PEUL information
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: PEUL_ReadConPartPtypeSection.F90,v 1.3 2008/12/06 08:44:39 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE peul_readconpartptypesection( regions,brbeg,brend,iPtype )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
49  USE moderror
50  USE modparameters
52 
53  USE modinterfaces, ONLY : readbothsection
55  IMPLICIT NONE
56 
57 ! ... parameters
58  TYPE(t_region), POINTER :: regions(:)
59  INTEGER, INTENT(IN) :: brbeg,brend,iptype
60 
61 ! ... loop variables
62  INTEGER :: ireg
63 
64 ! ... local variables
65  INTEGER, PARAMETER :: nstrkeys_max = 5
66  INTEGER, PARAMETER :: nkeys_max = 20
67 
68  CHARACTER(CHRLEN) :: rcsidentstring
69  CHARACTER(20) :: strkeys(nstrkeys_max),keys(nkeys_max)
70  CHARACTER(CHRLEN) :: strvals(nstrkeys_max)
71 
72  INTEGER :: nkeys,nstrkeys,nptypesused,errorflag
73  INTEGER :: istrkeymaterial
74  INTEGER :: ikeyused,ikeydiam,ikeypuff,ikeyinitc
75  INTEGER :: ikeyschm,ikeyk2,ikeyinvk4,ikeysmoocf
76  INTEGER :: ikeynegreport,ikeyclipmodel,ikeymethodv
77 
78  LOGICAL :: strdefined(nstrkeys_max),defined(nkeys_max)
79 
80  REAL(RFREAL) :: vals(nkeys_max)
81 
82  TYPE(t_global), POINTER :: global
83  TYPE(t_peul_ptype), POINTER :: ptype
84 
85 !******************************************************************************
86 
87  rcsidentstring = &
88  '$RCSfile: PEUL_ReadConPartPtypeSection.F90,v $ $Revision: 1.3 $'
89 
90  global => regions(1)%global
91 
92  CALL registerfunction( global,'PEUL_ReadConPartPtypeSection',&
93  'PEUL_ReadConPartPtypeSection.F90' )
94 
95 ! begin -----------------------------------------------------------------------
96 
97 ! define string keys
98 
99  istrkeymaterial = 1
100  nstrkeys = 1
101 
102  IF (nstrkeys > nstrkeys_max) &
103  CALL errorstop( global,err_exceeds_decl_mem,__line__ )
104 
105  strkeys(istrkeymaterial) = 'MATERIAL'
106 
107 ! define real keys
108 
109  ikeyused = 1
110  ikeydiam = 2
111  ikeypuff = 3
112  ikeyinitc = 4
113  ikeyschm = 5
114  ikeyk2 = 6
115  ikeyinvk4 = 7
116  ikeysmoocf = 8
117  ikeynegreport = 9
118  ikeyclipmodel = 10
119  ikeymethodv = 11
120  nkeys = 11
121 
122  IF (nkeys > nkeys_max) CALL errorstop( global,err_exceeds_decl_mem,__line__ )
123 
124  keys(ikeyused) = 'USED'
125  keys(ikeydiam) = 'DIAM'
126  keys(ikeypuff) = 'PUFF'
127  keys(ikeyinitc) = 'INITC'
128  keys(ikeyschm) = 'SCHM'
129  keys(ikeyk2) = 'K2'
130  keys(ikeyinvk4) = '1/K4'
131  keys(ikeysmoocf) = 'SMOOCF'
132  keys(ikeynegreport) = 'NEGREPORT'
133  keys(ikeyclipmodel) = 'CLIPMODEL'
134  keys(ikeymethodv) = 'METH_VEL'
135 
136  IF (iptype > 0) THEN
137 
138 ! - read smoke particle type section from input file
139 
140  CALL readbothsection( global,if_input,nkeys,nstrkeys,keys,strkeys, &
141  vals,strvals,defined,strdefined )
142 
143 ! - print warnings for keys that have no meaning
144 
145  IF (defined(ikeyused)) &
146  WRITE(stdout,*) '### WARNING: key meaningful only for CONPART input, ', &
147  'not CONPART_PTYPE: ', keys(ikeyused)
148 
149  IF (defined(ikeysmoocf)) &
150  WRITE(stdout,*) '### WARNING: key meaningful only for CONPART input, ', &
151  'not CONPART_PTYPE: ', keys(ikeysmoocf)
152 
153  DO ireg = brbeg,brend
154 
155  IF (regions(ireg)%peulInput%readStatus == -1) THEN
156  CALL errorstop( global,err_peul_ptype,__line__ )
157  ENDIF ! readStatus
158 
159  IF (regions(ireg)%peulInput%readStatus == 0) cycle
160 
161 ! --- fill in input data
162 
163  ptype => regions(ireg)%peulInput%ptypes(iptype)
164 
165  IF (strdefined(istrkeymaterial)) &
166  CALL inrt_setmaterial(global,ptype%material,strvals(istrkeymaterial))
167 
168  IF (defined(ikeydiam)) ptype%diam = vals(ikeydiam)
169  IF (defined(ikeypuff)) ptype%puff = vals(ikeypuff)
170  IF (defined(ikeyinitc)) ptype%initc = vals(ikeyinitc)
171  IF (defined(ikeyschm)) ptype%Sc = vals(ikeyschm)
172  IF (defined(ikeyk2)) ptype%vis2 = vals(ikeyk2)
173  IF (defined(ikeyinvk4)) ptype%vis4 = vals(ikeyinvk4) ! reciprocal
174  ! taken in PEUL_DerivedInputValues
175  IF (defined(ikeynegreport)) ptype%negReport = nint(vals(ikeynegreport))
176  IF (defined(ikeyclipmodel)) ptype%clipModel = nint(vals(ikeyclipmodel))
177 
178  IF (defined(ikeynegreport)) THEN
179  SELECT CASE (nint(vals(ikeynegreport)))
180  CASE (0)
181  ptype%negReport = peul_neg_report_none
182  CASE (1)
183  ptype%negReport = peul_neg_report_used
184  CASE default
185  CALL errorstop( global,err_peul_badval,__line__ )
186  END SELECT ! vals(iKeyNegReport)
187  END IF ! defined(iKeyNegReport)
188 
189  IF (defined(ikeyclipmodel)) THEN
190  SELECT CASE (nint(vals(ikeyclipmodel)))
191  CASE (0)
192  ptype%clipModel = peul_clip_model_none
193  CASE (1)
194  ptype%clipModel = peul_clip_model_used
195  CASE default
196  CALL errorstop( global,err_peul_badval,__line__ )
197  END SELECT ! vals(iKeyClipModel)
198  END IF ! defined(iKeyClipModel)
199 
200  IF (defined(ikeymethodv)) THEN
201  SELECT CASE (nint(vals(ikeymethodv)))
202  CASE (0)
203  ptype%methodV = peul_methv_fluidvel
204  CASE (1)
205  ptype%methodV = peul_methv_eqeul
206  CASE default
207  CALL errorstop( global,err_peul_badval,__line__ )
208  END SELECT ! vals(iKeyMethodV)
209  END IF ! defined(iKeyMethodV)
210 
211  END DO ! iReg
212 
213  END IF ! iPtype
214 
215 ! finalize --------------------------------------------------------------------
216 
217  CALL deregisterfunction( global )
218 
219 END SUBROUTINE peul_readconpartptypesection
220 
221 !******************************************************************************
222 !
223 ! RCS Revision history:
224 !
225 ! $Log: PEUL_ReadConPartPtypeSection.F90,v $
226 ! Revision 1.3 2008/12/06 08:44:39 mtcampbe
227 ! Updated license.
228 !
229 ! Revision 1.2 2008/11/19 22:17:51 mtcampbe
230 ! Added Illinois Open Source License/Copyright
231 !
232 ! Revision 1.1 2004/12/01 21:09:44 haselbac
233 ! Initial revision after changing case
234 !
235 ! Revision 1.10 2004/05/03 15:09:42 jferry
236 ! added equilibrium Eulerian capability for smoke
237 !
238 ! Revision 1.9 2004/03/05 22:09:04 jferry
239 ! created global variables for peul, plag, and inrt use
240 !
241 ! Revision 1.8 2004/03/02 21:44:52 jferry
242 ! Added clipping options
243 !
244 ! Revision 1.7 2003/09/26 21:49:06 fnajjar
245 ! Changed interface call for INRT_SetMaterial to ModInterfacesInteract
246 !
247 ! Revision 1.6 2003/04/07 18:29:01 jferry
248 ! added inflow boundary condition and initialization to a constant
249 !
250 ! Revision 1.5 2003/03/24 23:30:53 jferry
251 ! overhauled rocinteract to allow interaction design to use user input
252 !
253 ! Revision 1.4 2003/03/12 17:00:35 jferry
254 ! Added missing USE statement
255 !
256 ! Revision 1.3 2003/03/11 16:04:57 jferry
257 ! Created data type for material properties
258 !
259 ! Revision 1.2 2003/03/04 19:26:47 jferry
260 ! Cleaned up routines that read sections of input files
261 !
262 ! Revision 1.1 2003/02/11 22:52:51 jferry
263 ! Initial import of Rocsmoke
264 !
265 !******************************************************************************
266 
267 
268 
269 
270 
271 
272 
subroutine readbothsection(global, fileID, nvals, nStrVals, keys, strKeys, vals, strVals, defined, strDefined)
subroutine inrt_setmaterial(global, material, name)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE brbeg
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine peul_readconpartptypesection(regions, brbeg, brend, iPtype)