Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RVAV_GammBumpSolution.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: Generate Analytical DataStream for GAMM Bump.
26 !
27 ! Description:
28 !
29 ! Input: number of variables, extents
30 !
31 ! Output: array for Analytical solution
32 !
33 ! Notes:
34 !
35 !******************************************************************************
36 !
37 ! $Id: RVAV_GammBumpSolution.F90,v 1.3 2008/12/06 08:45:08 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE rvav_gammbumpsolution( fname,regionsS1 )
44 
45  USE moddatatypes
46  USE moderror
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
49  USE modgrid, ONLY : t_grid
50  USE modmixture, ONLY : t_mixt
51  USE modmpi
52  USE modparameters
53  USE rvav_modglobal
55  IMPLICIT NONE
56 
57 #include "Indexing.h"
58 
59 ! ... parameter
60  CHARACTER(*) :: fname
61  TYPE (t_region), POINTER :: regionss1(:)
62 
63 ! ... loop variables
64  INTEGER :: i, j, k
65 
66 ! ... local variables
67  CHARACTER(CHRLEN) :: msg
68 
69  REAL(RFREAL), PARAMETER :: pressuretot = 1.0e+05_rfreal
70 
71  TYPE(t_grid) , POINTER :: grid
72  TYPE(t_mixt) , POINTER :: mixt
73  TYPE(t_global) , POINTER :: global
74 
75  INTEGER :: ireg, ilev
76  INTEGER :: ipc, jpc, kpc, ibc, iec
77  INTEGER :: idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend
78  INTEGER :: icoff, ijcoff
79  INTEGER :: icelloffset, ijcelloffset
80  INTEGER :: ibpc,iepc
81  INTEGER :: ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend
82  INTEGER :: ivars, inodes, jnodes, knodes, nvari, nvars
83  INTEGER :: ijkcell, errorflag
84 
85  REAL(RFREAL), POINTER :: cofg(:,:)
86  REAL(RFREAL), DIMENSION(:,:), ALLOCATABLE :: cvsa
87 
88 !******************************************************************************
89 
90  global => regionss1(1)%global
91 
92  CALL registerfunction( global,'RVAV_GAMMBUMPSolution',&
93  'RVAV_GammBumpSolution.F90' )
94 
95 ! generates Input DataStream for GAMM Bump
96 
97  DO ireg=1, global%nRegions
98 
99  ilev = regionss1(ireg)%currLevel
100  grid => regionss1(ireg)%levels(ilev)%grid
101  mixt => regionss1(ireg)%levels(ilev)%mixt
102 
103  cofg => grid%cofg
104 
105 ! - get cell dimensions
106 
107  CALL rflo_getdimensdummy( regionss1(ireg),ilev,idcbeg,idcend, &
108  jdcbeg,jdcend,kdcbeg,kdcend )
109  CALL rflo_getcelloffset( regionss1(ireg),ilev,icelloffset,ijcelloffset )
110  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icelloffset,ijcelloffset)
111  iec = indijk(idcend,jdcend,kdcend,icelloffset,ijcelloffset)
112 
113 ! - get physical dimensions
114 
115  CALL rflo_getdimensphys( regionss1(ireg),ilev,ipcbeg,ipcend, &
116  jpcbeg,jpcend,kpcbeg,kpcend )
117  CALL rflo_getcelloffset( regionss1(ireg),ilev,icoff,ijcoff )
118 
119 ! - allocate work array
120 
121  ALLOCATE( cvsa(1,ibc:iec) ,stat=errorflag )
122  global%error = errorflag
123  IF (global%error /= 0) CALL errorstop( global, err_allocate,__line__ )
124 
125 ! - initialize variables
126 
127  cvsa = 0.0_rfreal
128  nvari = 1
129 
130  DO k = kpcbeg, kpcend
131  DO j = jpcbeg, jpcend
132  DO i = ipcbeg, ipcend
133  ijkcell = indijk(i,j,k,icoff,ijcoff)
134  cvsa(1,ijkcell) = pressuretot
135  END DO ! i
136  END DO ! j
137  END DO ! k
138 
139 ! Write stream2 data
140 
141  inodes = ipcend-ipcbeg+1
142  jnodes = jpcend-jpcbeg+1
143  knodes = kpcend-kpcbeg+1
144  nvars = zcoord+nvari
145 
146  WRITE(if_rvav_file_s2,*,err=10) inodes,jnodes,knodes,nvars
147 
148 
149  WRITE(if_rvav_file_s2,*,err=10) &
150  (((cofg(xcoord,indijk(i,j,k,icoff,ijcoff)), i=ipcbeg,ipcend), &
151  j=jpcbeg,jpcend), &
152  k=kpcbeg,kpcend), &
153  (((cofg(ycoord,indijk(i,j,k,icoff,ijcoff)), i=ipcbeg,ipcend), &
154  j=jpcbeg,jpcend), &
155  k=kpcbeg,kpcend), &
156  (((cofg(zcoord,indijk(i,j,k,icoff,ijcoff)), i=ipcbeg,ipcend), &
157  j=jpcbeg,jpcend), &
158  k=kpcbeg,kpcend), &
159  ((((cvsa(ivars,indijk(i,j,k,icoff,ijcoff)), i=ipcbeg,ipcend), &
160  j=jpcbeg,jpcend), &
161  k=kpcbeg,kpcend), &
162  ivars=1,nvari)
163 
164  DEALLOCATE( cvsa,stat=errorflag )
165  global%error = errorflag
166  IF (global%error /= 0) CALL errorstop( global, err_deallocate,__line__ )
167 
168  END DO ! iReg
169 
170  goto 999
171 
172 10 CONTINUE
173  CALL errorstop( global, err_file_read,__line__,'File: '//trim(fname) )
174 
175 ! finalize --------------------------------------------------------------------
176 
177 999 CONTINUE
178 
179  CALL deregisterfunction( global )
180 
181 END SUBROUTINE rvav_gammbumpsolution
182 
183 !******************************************************************************
184 !
185 ! RCS Revision history:
186 !
187 ! $Log: RVAV_GammBumpSolution.F90,v $
188 ! Revision 1.3 2008/12/06 08:45:08 mtcampbe
189 ! Updated license.
190 !
191 ! Revision 1.2 2008/11/19 22:18:19 mtcampbe
192 ! Added Illinois Open Source License/Copyright
193 !
194 ! Revision 1.1 2004/12/01 22:43:23 fnajjar
195 ! Initial revision after changing case
196 !
197 ! Revision 1.5 2003/05/15 02:57:08 jblazek
198 ! Inlined index function.
199 !
200 ! Revision 1.4 2002/10/21 18:56:05 f-najjar
201 ! Bug fix for Character Length of fname to be consistent with RVAV_ModInterfaces
202 !
203 ! Revision 1.3 2002/10/12 03:20:51 jblazek
204 ! Replaced [io]stat=global%error with local errorFlag for Rocflo.
205 !
206 ! Revision 1.2 2002/09/10 00:01:45 f-najjar
207 ! Variable global moved into regions()
208 !
209 ! Revision 1.1 2002/07/31 02:36:24 f-najjar
210 ! Initial Import
211 !
212 !
213 !******************************************************************************
214 
215 
216 
217 
218 
219 
220 
**********************************************************************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 idcend
j indices k indices k
Definition: Indexing.h:6
**********************************************************************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 kpcbeg
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 jpcbeg
**********************************************************************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 ipcend
subroutine rflo_getdimensdummy(region, iLev, idcbeg, idcend, jdcbeg, jdcend, kdcbeg, kdcend)
**********************************************************************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 kdcbeg
**********************************************************************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 ipcbeg
blockLoc i
Definition: read.cpp:79
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************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 idcbeg
**********************************************************************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 jdcend
j indices j
Definition: Indexing.h:6
**********************************************************************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 jpcend
**********************************************************************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 jdcbeg
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine grid(bp)
Definition: setup_py.f90:257
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rvav_gammbumpsolution(fname, regionsS1)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)