Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TURB_rFLO_RansBndConditionsRecv.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: receive RaNS data for dummy cells from adjacent regions being
26 ! on another processor.
27 !
28 ! Description: none.
29 !
30 ! Input: regions = RaNS data of all regions
31 ! iReg = index of current region.
32 !
33 ! Output: regions(iReg)%levels%turb = updated flow RaNS cv
34 ! in dummy cells of current region.
35 !
36 ! Notes: none.
37 !
38 !******************************************************************************
39 !
40 ! $Id: TURB_rFLO_RansBndConditionsRecv.F90,v 1.4 2008/12/06 08:44:44 mtcampbe Exp $
41 !
42 ! Copyright: (c) 2003 by the University of Illinois
43 !
44 !******************************************************************************
45 
46 SUBROUTINE turb_rflo_ransbndconditionsrecv( regions,iReg ) ! PUBLIC
47 
48  USE moddatatypes
49  USE modbndpatch, ONLY : t_patch
50  USE moddatastruct, ONLY : t_region
54  USE moderror
55  USE modparameters
57  IMPLICIT NONE
58 
59 ! ... parameters
60  TYPE(t_region), POINTER :: regions(:)
61 
62  INTEGER :: ireg
63 
64 ! ... loop variables
65  INTEGER :: ipatch
66 
67 ! ... local variables
68  INTEGER :: ilev, npatches, bctype, iregsrc, ipatchsrc
69 
70  TYPE(t_patch), POINTER :: patch, patchsrc
71 
72 !******************************************************************************
73 
74  CALL registerfunction( regions(ireg)%global, &
75  'TURB_RFLO_RansBndConditionsRecv', 'TURB_rFLO_RansBndConditionsRecv.F90' )
76 
77  IF (regions(ireg)%turbInput%modelClass /= model_rans) goto 999
78 
79 ! get dimensions --------------------------------------------------------------
80 
81  ilev = regions(ireg)%currLevel
82  npatches = regions(ireg)%nPatches
83 
84 ! receive data (regular cells) from other processors --------------------------
85 
86  DO ipatch=1,npatches
87 
88  patch => regions(ireg)%levels(ilev)%patches(ipatch)
89 
90  bctype = patch%bcType
91  iregsrc = patch%srcRegion
92  ipatchsrc = patch%srcPatch
93 
94 ! - region interface, periodic boundary
95 
96  IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
97  (bctype>=bc_regionint .AND. bctype<=bc_regionint +bc_range) .OR. &
98  (bctype>=bc_regnonconf .AND. bctype<=bc_regnonconf+bc_range) .OR. &
99  (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
100  (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range)) THEN
101  IF (regions(iregsrc)%procid /= regions(ireg)%global%myProcid) THEN
102  patchsrc => regions(iregsrc)%levels(ilev)%patches(ipatchsrc)
103 
104  CALL turb_floransrecvdummyvals( regions(ireg),regions(iregsrc), &
105  patch,patchsrc )
106  ENDIF
107  ENDIF
108 
109  ENDDO ! iPatch
110 
111 ! copy/exchange data for edge and corner cells --------------------------------
112 
113 ! set corner/edge cells outcommented due to extrapolation in tcv update
114 ! CALL TURB_FloRansSetCornEdgeCells( regions(iReg) )
115 
116  DO ipatch=1,npatches
117  patch => regions(ireg)%levels(ilev)%patches(ipatch)
118  bctype = patch%bcType
119  IF ((bctype>=bc_noslipwall .AND. bctype<=bc_noslipwall+bc_range) .OR. &
120  (bctype>=bc_injection .AND. bctype<=bc_injection +bc_range .AND. &
121  regions(ireg)%mixtInput%flowModel==flow_navst) .OR. &
122  (bctype>=bc_symmetry .AND. bctype<=bc_symmetry +bc_range)) THEN
123  CALL turb_floranscorrcornedgecells( regions(ireg),patch,bctype )
124  ENDIF
125  ENDDO ! iPatch
126 
127  CALL turb_floransexchcornedgecells( regions,ireg )
128  CALL turb_floransrecvcornedgecells( regions,ireg )
129 
130 ! finalize --------------------------------------------------------------------
131 
132 999 CONTINUE
133 
134  CALL deregisterfunction( regions(ireg)%global )
135 
136 END SUBROUTINE turb_rflo_ransbndconditionsrecv
137 
138 !******************************************************************************
139 !
140 ! RCS Revision history:
141 !
142 ! $Log: TURB_rFLO_RansBndConditionsRecv.F90,v $
143 ! Revision 1.4 2008/12/06 08:44:44 mtcampbe
144 ! Updated license.
145 !
146 ! Revision 1.3 2008/11/19 22:17:56 mtcampbe
147 ! Added Illinois Open Source License/Copyright
148 !
149 ! Revision 1.2 2004/03/12 02:55:36 wasistho
150 ! changed rocturb routine names
151 !
152 ! Revision 1.1 2004/03/11 03:26:33 wasistho
153 ! changed rocturb nomenclature
154 !
155 ! Revision 1.1 2004/03/08 23:35:45 wasistho
156 ! changed turb nomenclature
157 !
158 ! Revision 1.2 2004/01/23 00:32:43 wasistho
159 ! added receiving RaNS edge/corner variables
160 !
161 ! Revision 1.1 2003/10/07 02:17:03 wasistho
162 ! initial installation of RaNS-SA and DES
163 !
164 !
165 !******************************************************************************
166 
167 
168 
169 
170 
171 
172 
subroutine turb_floransrecvcornedgecells(regions, iReg)
subroutine turb_floransexchcornedgecells(regions, iReg)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
Definition: patch.h:74
subroutine turb_rflo_ransbndconditionsrecv(regions, iReg)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine turb_floranssetcornedgecells(region)
subroutine turb_floranscorrcornedgecells(region, patch, bcType)
subroutine turb_floransrecvdummyvals(region, regionSrc, patch, patchSrc)