Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
standalone/RFLO_GetDeformation.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: obtain deformation to boundary nodes from an external source.
26 !
27 ! Description: none.
28 !
29 ! Input: region = grid dimensions and topology
30 ! boundMoved = flag for boundaries of region which have moved.
31 !
32 ! Output: dNode = deformations at all six boundaries.
33 !
34 ! Notes: variable dNode contains the whole 3-D field.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RFLO_GetDeformation.F90,v 1.6 2008/12/06 08:44:45 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2001 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflo_getdeformation( region,boundMoved,dNode )
45 
46  USE moddatatypes
47  USE modbndpatch, ONLY : t_patch
48  USE moddatastruct, ONLY : t_region
49  USE modglobal, ONLY : t_global
51  USE moderror
52  USE modparameters
53  IMPLICIT NONE
54 
55 #include "Indexing.h"
56 
57 ! ... parameters
58  LOGICAL :: boundmoved(6)
59 
60  REAL(RFREAL), POINTER :: dnode(:,:)
61 
62  TYPE(t_region) :: region
63 
64 ! ... loop variables
65  INTEGER :: ipatch, i, j, k, ijkn
66 
67 ! ... local variables
68  INTEGER :: ilev, lbound, ibeg, iend, jbeg, jend, kbeg, kend, inoff, ijnoff
69 
70  TYPE(t_global), POINTER :: global
71  TYPE(t_patch), POINTER :: patch
72 
73 !******************************************************************************
74 
75  global => region%global
76 
77  CALL registerfunction( global,'RFLO_GetDeformation',&
78  'RFLO_GetDeformation.F90' )
79 
80 ! initialize variables --------------------------------------------------------
81 
82  ilev = 1 ! finest grid
83  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
84 
85 ! zero out displacements
86 
87  dnode(:,:) = 0._rfreal
88 
89 ! reset boundary movement flags
90 
91  boundmoved(:) = .false.
92 
93 ! obtain displacements --------------------------------------------------------
94 
95  DO ipatch=1,region%nPatches
96  patch => region%levels(ilev)%patches(ipatch)
97  lbound = patch%lbound
98 
99  IF (patch%mixt%setMotion) THEN
100  CALL rflo_getpatchindicesnodes( region,patch,ilev, &
101  ibeg,iend,jbeg,jend,kbeg,kend )
102  boundmoved(lbound) = .true.
103 
104  DO k=kbeg,kend
105  DO j=jbeg,jend
106  DO i=ibeg,iend
107  ijkn = indijk(i,j,k,inoff,ijnoff)
108  dnode(xcoord,ijkn) = patch%mixt%bndVel(xcoord)*global%dtMin
109  dnode(ycoord,ijkn) = patch%mixt%bndVel(ycoord)*global%dtMin
110  dnode(zcoord,ijkn) = patch%mixt%bndVel(zcoord)*global%dtMin
111  ENDDO
112  ENDDO
113  ENDDO
114 
115  ENDIF ! motion prescribed internally
116  ENDDO ! iPatch
117 
118  IF (global%internDeform==0) THEN
119 
120 ! - give error message
121 
122  CALL errorstop( region%global,err_external_funct,__line__, &
123  'No internal-motion at boundaries' )
124  ENDIF
125 
126 ! finalize --------------------------------------------------------------------
127 
128  CALL deregisterfunction( global )
129 
130 END SUBROUTINE rflo_getdeformation
131 
132 !******************************************************************************
133 !
134 ! RCS Revision history:
135 !
136 ! $Log: RFLO_GetDeformation.F90,v $
137 ! Revision 1.6 2008/12/06 08:44:45 mtcampbe
138 ! Updated license.
139 !
140 ! Revision 1.5 2008/11/19 22:17:57 mtcampbe
141 ! Added Illinois Open Source License/Copyright
142 !
143 ! Revision 1.4 2006/08/19 15:41:05 mparmar
144 ! Renamed patch variables
145 !
146 ! Revision 1.3 2005/09/30 01:00:41 wasistho
147 ! modified safety, replace used by global%internDeform
148 !
149 ! Revision 1.2 2005/09/09 03:27:18 wasistho
150 ! added internal boundary motion kernel
151 !
152 ! Revision 1.1 2004/12/01 21:29:36 haselbac
153 ! Initial revision after changing case
154 !
155 ! Revision 1.4 2003/05/15 02:57:06 jblazek
156 ! Inlined index function.
157 !
158 ! Revision 1.3 2002/09/20 22:22:37 jblazek
159 ! Finalized integration into GenX.
160 !
161 ! Revision 1.2 2002/09/05 17:40:22 jblazek
162 ! Variable global moved into regions().
163 !
164 ! Revision 1.1 2002/08/15 19:43:11 jblazek
165 ! Prepared solver to be optionally linked with an external driver.
166 !
167 !******************************************************************************
168 
169 
170 
171 
172 
173 
174 
**********************************************************************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 ibeg
j indices k indices k
Definition: Indexing.h:6
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
Definition: patch.h:74
**********************************************************************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 knode iend
subroutine rflo_getpatchindicesnodes(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
blockLoc i
Definition: read.cpp:79
subroutine rflo_getdeformation(region, boundMoved, dNode)
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 knode jend
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
**********************************************************************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 knode jbeg
**********************************************************************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 knode kbeg
subroutine deregisterfunction(global)
Definition: ModError.F90:469