Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ModBndPatch.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: define derived data type related to boundary patches.
26 !
27 ! Description: none
28 !
29 ! Notes: none
30 !
31 ! ******************************************************************************
32 !
33 ! $Id: ModBndPatch.F90,v 1.70 2010/02/18 21:47:40 juzhang Exp $
34 !
35 ! Copyright: (c) 2001-2006 by the University of Illinois
36 !
37 ! ******************************************************************************
38 
40 
41  USE moddatatypes
42  USE modparameters
44 #ifdef PEUL
45  USE modparteul, ONLY : t_buffer_peul
46 #endif
47 
49 
50  IMPLICIT NONE
51 
52 ! ******************************************************************************
53 ! Boundary condition values data structure
54 ! ******************************************************************************
55 
57 #ifdef RFLO
58  LOGICAL :: bcset, setmotion
59  INTEGER :: nsendbuff, nrecvbuff, irequest
60 #endif
61  INTEGER :: distrib, nData, nSwitches
62 
63  INTEGER, POINTER :: switches(:)
64  REAL(RFREAL), POINTER :: vals(:,:)
65 #ifdef RFLO
66  REAL(RFREAL) :: maxChange, bndVel(3), amplitude
67  REAL(RFREAL), POINTER :: sendBuff(:), recvBuff(:)
68 #endif
69 
70  TYPE(t_tbcvalues), POINTER :: tbcs(:)
71 
72  INTEGER :: cvState
73  REAL(RFREAL), POINTER, DIMENSION(:,:) :: cv,cvOld,dv,gv,tv,rhs,rhsSum
74  REAL(RFREAL), DIMENSION(:,:,:), POINTER :: gradFace
75  END TYPE t_bcvalues
76 
77 ! ******************************************************************************
78 ! Time-dependent boundary condition data structure
79 ! ******************************************************************************
80 
82  INTEGER :: tbcType
83  INTEGER, POINTER :: switches(:)
84  REAL(RFREAL), POINTER :: params(:), mean(:), svals(:), bvals(:,:)
85  END TYPE t_tbcvalues
86 
87 ! ******************************************************************************
88 ! Patch data structure
89 ! ******************************************************************************
90 
91  TYPE t_patch
92  INTEGER :: bcKind,reflect
93  REAL(RFREAL) :: nscbcK
94 
95  INTEGER :: bcType, bcCoupled, bcMotion
96  REAL(RFREAL) :: periodAngle ! angle between rotat. periodic boundaries
97 #ifdef RFLO
98  INTEGER :: srcRegion, srcPatch
99  INTEGER :: lbound, l1beg, l1end, l2beg, l2end
100  INTEGER :: srcLbound, srcL1beg, srcL1end, srcL2beg, srcL2end
101  INTEGER :: corns(4), position(4)
102  INTEGER :: dirFlat
103  LOGICAL :: align, thrustCalc, bndFlat, globalAeroCoeffs
104  REAL(RFREAL) :: l1VecSrc(3), l2VecSrc(3)
105  REAL(RFREAL), POINTER :: surfCoord(:,:,:)
106  REAL(RFREAL), POINTER :: arclen1(:), arclen2(:)
107  REAL(RFREAL), POINTER :: cp(:), ch(:)
108  REAL(RFREAL), POINTER :: cf(:,:), forceCoeffs(:,:), momentCoeffs(:,:)
109 
110  REAL(RFREAL), POINTER :: st(:,:,:), stOld(:,:,:) ! prmgrd (EPDE)
111  REAL(RFREAL), POINTER :: sti(:,:,:), stj(:,:,:) ! 1st deriv. st
112  REAL(RFREAL), POINTER :: stii(:,:,:),stjj(:,:,:),stij(:,:,:) ! 2nd deriv. st
113  REAL(RFREAL), POINTER :: pfun(:,:,:,:) ! ctrl function
114 
115  REAL(RFREAL), POINTER :: aij(:,:), aimj(:,:), aipj(:,:) ! matrix coeffs
116  REAL(RFREAL), POINTER :: aimjm(:,:), aijm(:,:), aipjm(:,:) ! of EPDE
117  REAL(RFREAL), POINTER :: aimjp(:,:), aijp(:,:), aipjp(:,:)
118 
119 #ifdef GENX
120  INTEGER, POINTER :: bcFlag(:), bFlag(:,:)
121  REAL(RFREAL), POINTER :: duAlp(:,:,:), mdotAlp(:,:), &
122  rhofvfAlp(:,:,:), tflmAlp(:,:), pf(:,:) , &
123  qc(:,:), qr(:,:), rhofAlp(:,:), nfAlp(:,:,:), &
124  tracf(:,:,:), tempf(:,:), tempv(:,:), dnml(:,:)
125 #endif
126 #endif
127 #ifdef RFLU
128  CHARACTER(CHRLEN) :: bcName
129  LOGICAL :: flatFlag,movePatch,plotFlag,plotStatsFlag,renumFlag,smoothGrid, &
130  thrustFlag,transformFlag
131  LOGICAL, DIMENSION(:), POINTER :: nbMap
132  INTEGER :: axisRelated,cReconst,iBorder,iPatchGlobal,iPatchLocal, &
133  iPatchRelated,moveBcType,movePatchDir,spaceOrder
134  INTEGER :: nBCellsVirt,nBFaces,nBFacesMax,nBFacesTot,nBTris,nBTrisMax, &
135  nBTrisTot,nBQuads,nBQuadsMax,nBQuadsTot,nBVert,nBVertEst, &
136  nBVertMax,nBVertTot
137  INTEGER, DIMENSION(:), POINTER :: bf2c,bf2cSorted,bf2cSortedKeys,bv,bvc, &
138  bvcSorted,bvTemp,bv2bv
139  INTEGER, DIMENSION(:,:), POINTER :: bf2ct,bf2v,bf2vSorted,bTri2v,bTri2vLoc, &
140  bQuad2v,bQuad2vLoc
141  TYPE(t_stencil), DIMENSION(:), POINTER :: bf2cs,bf2cs1D
142  TYPE(t_stencilinfo) :: bf2csInfo,bf2cs1DInfo
143  REAL(RFREAL) :: angleRelated
144  REAL(RFREAL) :: pc(XCOORD:ZCOORD),pn(XCOORD:ZCOORD)
145  REAL(RFREAL) :: tm(XCOORD:XYZMAG,XCOORD:XYZMAG)
146  REAL(RFREAL), DIMENSION(:), POINTER :: gs,mfMixt,vfMixt
147  REAL(RFREAL), DIMENSION(:), POINTER :: cofgDist
148  REAL(RFREAL), DIMENSION(:,:), POINTER :: bvn,dXyz,fc,fn
149  REAL(RFREAL), DIMENSION(:,:,:), POINTER :: bfgwt
150  REAL(RFREAL), DIMENSION(:), POINTER :: cp,ch,cmass
151  REAL(RFREAL), DIMENSION(:,:), POINTER :: cf,cmom,forceCoeffs,forceVacCoeffs,momentCoeffs
152  REAL(RFREAL), DIMENSION(:), POINTER :: massCoeffs
153 #ifdef GENX
154  INTEGER :: bFlagInit
155  INTEGER, DIMENSION(:), POINTER :: bFlag,bcFlag,cnstrType,patchNo
156  REAL(RFREAL), DIMENSION(:), POINTER :: mdotAlp,pf,qc,qr,rhofAlp,tbAlp, &
157  tempf,tflmAlp
158  REAL(RFREAL), DIMENSION(:,:), POINTER :: duAlp,nfAlp,rhofvfAlp,tracf, &
159  xyz
160 #endif
161 #ifndef NO_TECPLOT
162  REAL(RFREAL), DIMENSION(:,:), POINTER :: varFaceTEC,varVertTEC
163 #endif
164 #endif
165 
166 #ifdef RADI
167  INTEGER :: radBcType
168 #endif
169 #ifdef PEUL
170  TYPE(t_buffer_peul) :: bufferPeul
171 #endif
172 
173  TYPE(t_bcvalues) :: mixt,turb,spec,peul,valRadi,valBola
174  TYPE(t_bcvalues), POINTER :: plag(:)
175  TYPE(t_tile_plag) :: tilePlag
176  TYPE(t_buffer_plag) :: bufferPlag
177  TYPE(t_surfstats_plag), POINTER, DIMENSION(:) :: statsPlag
178  END TYPE t_patch
179 
180 END MODULE modbndpatch
181 
182 ! ******************************************************************************
183 !
184 ! RCS Revision history:
185 !
186 ! $Log: ModBndPatch.F90,v $
187 ! Revision 1.70 2010/02/18 21:47:40 juzhang
188 ! Heat transfer bc for non-propellant surface documented in Rocburn_PY_HT.pdf in Rocburn_PY directory is implemented within Rocburn_PY. Major changes were made to Rocburn, Rocman3, RocfluidMP/genx, RocfluidMP/modflo directories.
189 !
190 ! Revision 1.69 2008/12/06 08:44:18 mtcampbe
191 ! Updated license.
192 !
193 ! Revision 1.68 2008/11/19 22:17:29 mtcampbe
194 ! Added Illinois Open Source License/Copyright
195 !
196 ! Revision 1.67 2006/10/20 21:28:13 mparmar
197 ! Added thrustFlag, cmass, cmom, forceVacCoeffs, momentCoeffs, massCoeffs
198 !
199 ! Revision 1.66 2006/08/19 15:52:21 mparmar
200 ! Renamed patch variables, rm bg2bf, bf2bgTot and modified t_bcvalues, t_patch
201 !
202 ! Revision 1.65 2006/08/18 13:59:38 haselbac
203 ! Added transformFlag and bvcSorted
204 !
205 ! Revision 1.64 2006/04/15 16:57:18 haselbac
206 ! Added cReconst and spaceOrder to patch data type
207 !
208 ! Revision 1.63 2006/04/07 14:43:50 haselbac
209 ! Added iPatchLocal and bf2cs1D
210 !
211 ! Revision 1.62 2006/03/25 21:44:29 haselbac
212 ! Added vars bcos of sype patches
213 !
214 ! Revision 1.61 2006/03/18 08:21:47 wasistho
215 ! added arclen1,2
216 !
217 ! Revision 1.60 2006/03/17 06:36:28 wasistho
218 ! added dirFlat
219 !
220 ! Revision 1.59 2006/03/10 08:54:28 wasistho
221 ! changed dimensions of aero coeffs
222 !
223 ! Revision 1.58 2006/03/10 00:57:04 wasistho
224 ! added globalAeroCoeffs
225 !
226 ! Revision 1.57 2005/12/07 08:46:34 wasistho
227 ! added stuff for surface mesh motion EPDE
228 !
229 ! Revision 1.56 2005/12/05 05:53:19 wasistho
230 ! added bndFlat
231 !
232 ! Revision 1.55 2005/11/18 07:17:45 wasistho
233 ! added amplitude in t_bcvalues
234 !
235 ! Revision 1.54 2005/10/14 14:03:09 haselbac
236 ! Added tbAlp
237 !
238 ! Revision 1.53 2005/09/23 18:56:58 haselbac
239 ! Added plotStatsFlag
240 !
241 ! Revision 1.52 2005/09/09 03:17:44 wasistho
242 ! added valMixt%setMotion and valMixt%bndVel(3)
243 !
244 ! Revision 1.51 2005/08/09 00:57:35 haselbac
245 ! Added plotFlag
246 !
247 ! Revision 1.50 2005/06/16 01:26:35 wasistho
248 ! added patch%position
249 !
250 ! Revision 1.49 2005/06/13 21:44:02 wasistho
251 ! added new patch variable patch%bcMotion
252 !
253 ! Revision 1.48 2005/06/10 22:32:04 wasistho
254 ! define patch%corns(4)
255 !
256 ! Revision 1.47 2005/06/09 20:18:27 haselbac
257 ! Added movePatchDir and cnstrType
258 !
259 ! Revision 1.46 2005/05/04 03:32:29 haselbac
260 ! Removed writeGrid, was not required for some time
261 !
262 ! Revision 1.45 2005/05/02 18:05:10 wasistho
263 ! move surfCoord outside ifdef Genx
264 !
265 ! Revision 1.44 2004/12/21 15:01:37 fnajjar
266 ! Added surface statistics infrastructure for PLAG
267 !
268 ! Revision 1.43 2004/12/19 15:43:20 haselbac
269 ! Added vfMixt and cofgDist
270 !
271 ! Revision 1.42 2004/10/19 19:28:35 haselbac
272 ! Added GENX variables, cosmetics
273 !
274 ! Revision 1.41 2004/09/30 18:04:00 wasistho
275 ! added radBcType within ifdef RADI
276 !
277 ! Revision 1.40 2004/06/16 20:00:46 haselbac
278 ! Added patch coefficients and Tecplot variables
279 !
280 ! Revision 1.39 2004/05/25 01:33:33 haselbac
281 ! Added bf2bgTot
282 !
283 ! Revision 1.38 2004/01/29 22:57:19 haselbac
284 ! Removed vfMixt
285 !
286 ! Revision 1.37 2003/12/04 03:28:22 haselbac
287 ! Added boundary stencil arrays
288 !
289 ! Revision 1.36 2003/11/25 21:03:07 haselbac
290 ! Added mfMixt and vfMixt for rocspecies support
291 !
292 ! Revision 1.35 2003/06/02 17:11:32 jblazek
293 ! Added computation of thrust.
294 !
295 ! Revision 1.34 2003/05/31 01:41:54 wasistho
296 ! installed turb. wall layer model
297 !
298 ! Revision 1.33 2003/05/19 21:18:21 jblazek
299 ! Automated switch to 0th-order extrapolation at slip walls and injection
300 ! boundaries.
301 !
302 ! Revision 1.32 2003/05/07 00:23:33 haselbac
303 ! Changed surfGridFlag to writeGrid
304 !
305 ! Revision 1.31 2003/04/29 22:42:05 haselbac
306 ! Added surfGridFlag
307 !
308 ! Revision 1.30 2003/04/24 15:38:31 haselbac
309 ! Added bFlagInit
310 !
311 ! Revision 1.29 2003/04/10 00:56:45 jblazek
312 ! Added ifdef PEUL around TYPE(t_buffer_peul) :: bufferPeul
313 !
314 ! Revision 1.28 2003/04/09 22:51:44 jferry
315 ! removed peul_save and peul_verify structures
316 !
317 ! Revision 1.27 2003/04/09 14:06:43 fnajjar
318 ! Included Pointer Type of Buffers for PEUL
319 !
320 ! Revision 1.26 2003/03/15 17:40:29 haselbac
321 ! Added bvFlag, renumFlag, nB*Tot, removed bf2ct
322 !
323 ! Revision 1.25 2003/02/11 22:52:50 jferry
324 ! Initial import of Rocsmoke
325 !
326 ! Revision 1.24 2003/01/28 16:37:52 haselbac
327 ! Removed locally-numbered lists
328 !
329 ! Revision 1.23 2002/12/06 22:29:26 jblazek
330 ! Corrected bug for geometry exchange between minimal patches.
331 !
332 ! Revision 1.22 2002/11/26 15:24:38 haselbac
333 ! Added moveBcType
334 !
335 ! Revision 1.21 2002/10/27 18:59:30 haselbac
336 ! Added bvn, smoothGrid, and movePatch, moved dXyz & bTri2vl
337 !
338 ! Revision 1.20 2002/10/25 14:02:21 f-najjar
339 ! Define Tile and Buffer types for PLAG datastructure
340 !
341 ! Revision 1.19 2002/10/12 19:11:03 haselbac
342 ! Added bTri2vl for RFLU
343 !
344 ! Revision 1.18 2002/10/05 18:57:03 haselbac
345 ! Integration of RFLU into GENX
346 !
347 ! Revision 1.17 2002/09/27 00:57:09 jblazek
348 ! Changed makefiles - no makelinks needed.
349 !
350 ! Revision 1.16 2002/09/24 23:16:46 jblazek
351 ! Changed bcflag to a pointer.
352 !
353 ! Revision 1.15 2002/09/20 22:22:35 jblazek
354 ! Finalized integration into GenX.
355 !
356 ! Revision 1.14 2002/09/17 22:51:23 jferry
357 ! Removed Fast Eulerian particle type
358 !
359 ! Revision 1.13 2002/09/17 13:43:00 jferry
360 ! Added Time-dependent boundary conditions
361 !
362 ! Revision 1.12 2002/09/09 14:50:47 haselbac
363 ! Added access arrays and face gradient weights
364 !
365 ! Revision 1.11 2002/06/22 01:13:37 jblazek
366 ! Modified interfaces to BC routines.
367 !
368 ! Revision 1.10 2002/06/14 20:14:03 haselbac
369 ! Added iPatchGlobal and bf2ct array (for Charm)
370 !
371 ! Revision 1.9 2002/03/29 23:15:22 jblazek
372 ! Corrected bug in MPI send.
373 !
374 ! Revision 1.8 2002/03/26 19:13:25 haselbac
375 ! Enclosed bcSet in conditional compilation for ROCFLO
376 !
377 ! Revision 1.7 2002/03/18 23:07:19 jblazek
378 ! Finished multiblock and MPI.
379 !
380 ! Revision 1.6 2002/03/14 19:05:16 haselbac
381 ! Added entries for face centroid and face normal
382 !
383 ! Revision 1.5 2002/03/01 16:39:10 haselbac
384 ! Added nBFaces,bf2c,bf2v arrays
385 !
386 ! Revision 1.4 2002/02/21 23:25:05 jblazek
387 ! Blocks renamed as regions.
388 !
389 ! Revision 1.3 2001/12/19 23:09:21 jblazek
390 ! Added routines to read grid and solution.
391 !
392 ! Revision 1.2 2001/12/04 17:15:38 haselbac
393 ! Added ROCFLU variables
394 !
395 ! Revision 1.1 2001/12/04 00:07:00 jblazek
396 ! Modules BndPatch, Global and Grid moved to modfloflu directory.
397 !
398 ! Revision 1.1.1.1 2001/12/03 21:44:05 jblazek
399 ! Import of RocfluidMP
400 !
401 ! ******************************************************************************
402 
403 
404 
405 
406 
407