Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_IntrpMixtProperties.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: Interpolate mixture properties onto particle locations
26 !
27 ! Description: none.
28 !
29 ! Input: region = current region.
30 !
31 ! Output: region%levels%plag%dv
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: PLAG_IntrpMixtProperties.F90,v 1.4 2008/12/06 08:44:34 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE plag_intrpmixtproperties( region )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE modpartlag, ONLY : t_plag, t_plag_input
49  USE modmixture, ONLY : t_mixt
50 #ifdef RFLO
52 #endif
53  USE moderror
54  USE modparameters
56  IMPLICIT NONE
57 
58 #ifdef RFLO
59 #include "Indexing.h"
60 #endif
61 
62 ! ... parameters
63  TYPE(t_region), INTENT(INOUT), TARGET :: region
64 
65 ! ... loop variables
66  INTEGER :: ipcls
67 
68 ! ... local variables
69  CHARACTER(CHRLEN) :: rcsidentstring
70 
71 #ifdef RFLO
72  INTEGER :: ibc,icoff,idcbeg,idcend,iec,ijcoff,ilev, &
74  kdcbeg,kdcend,kpcbeg,kpcend
75 #endif
76  INTEGER :: icell, npcls
77  INTEGER, POINTER, DIMENSION(:,:) :: paiv
78 
79  REAL(RFREAL), POINTER, DIMENSION(:,:) :: pcv, pdv, ptv
80 #ifdef RFLO
81  REAL(RFREAL), POINTER, DIMENSION(:,:) :: pcofg, pcvmixt, pdvmixt, ptvmixt
82 #endif
83 #ifdef RFLU
84  REAL(RFREAL), POINTER, DIMENSION(:,:) :: pcvmixt, pdvmixt, ptvmixt
85 #endif
86 
87  TYPE(t_global), POINTER :: global
88  TYPE(t_plag), POINTER :: pplag
89  TYPE(t_mixt), POINTER :: pmixt
90 
91 !******************************************************************************
92 
93  rcsidentstring = '$RCSfile: PLAG_IntrpMixtProperties.F90,v $ $Revision: 1.4 $'
94 
95  global => region%global
96 
97  CALL registerfunction( global, 'PLAG_IntrpMixtProperties',&
98  'PLAG_IntrpMixtProperties.F90' )
99 
100 ! Get dimensions --------------------------------------------------------------
101 
102 #ifdef RFLO
103  ilev = region%currLevel
104 
105  npcls = region%levels(ilev)%plag%nPcls
106 #endif
107 #ifdef RFLU
108  npcls = region%plag%nPcls
109 #endif
110 
111 ! Set pointers ----------------------------------------------------------------
112 
113 #ifdef RFLO
114  pmixt => region%levels(ilev)%mixt
115  pplag => region%levels(ilev)%plag
116 #endif
117 #ifdef RFLU
118  pmixt => region%mixt
119  pplag => region%plag
120 #endif
121 
122 ! Set pointers for mixture ----------------------------------------------------
123 
124 #ifdef RFLO
125  pcofg => region%levels(ilev)%grid%cofg
126 #endif
127 
128  pcvmixt => pmixt%cv
129  pdvmixt => pmixt%dv
130  ptvmixt => pmixt%tv
131 
132 ! Set pointers for discrete particles -----------------------------------------
133 
134  paiv => pplag%aiv
135  pcv => pplag%cv
136  pdv => pplag%dv
137  ptv => pplag%tv
138 
139 #ifdef RFLO
140 ! Get cell dimensions ---------------------------------------------------------
141 
142  CALL rflo_getdimensdummy( region,ilev,idcbeg,idcend, &
143  jdcbeg,jdcend,kdcbeg,kdcend )
144  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
145  ibc = indijk(idcbeg,jdcbeg,kdcbeg,icoff,ijcoff)
146  iec = indijk(idcend,jdcend,kdcend,icoff,ijcoff)
147 
148 ! Get physical dimensions ----------------------------------------------------
149 
150  CALL rflo_getdimensphys( region,ilev,ipcbeg,ipcend, &
151  jpcbeg,jpcend,kpcbeg,kpcend )
152  CALL rflo_getcelloffset( region,ilev,icoff,ijcoff )
153 #endif
154 
155 #ifdef RFLU
156 ! Check that have primitive state vector --------------------------------------
157 
158  IF ( pmixt%cvState /= cv_mixt_state_duvwp ) THEN
159  CALL errorstop(global,err_cv_state_invalid,__line__)
160  END IF ! region%mixt%cvState
161 #endif
162 
163 ! Assume a piece-wise constant distribution in a cell -------------------------
164 ! Note: Distribution has been properly corrected for RFLU
165 ! with the routine PLAG_RFLU_CorrectMixtProperties.
166 ! This routine is called after the cell gradients are computed
167 
168  DO ipcls = 1, npcls
169 
170  icell = paiv(aiv_plag_icells,ipcls)
171 #ifdef RFLO
172  pdv(dv_plag_uvelmixt,ipcls) = pdvmixt(dv_mixt_uvel,icell)
173  pdv(dv_plag_vvelmixt,ipcls) = pdvmixt(dv_mixt_vvel,icell)
174  pdv(dv_plag_wvelmixt,ipcls) = pdvmixt(dv_mixt_wvel,icell)
175  pdv(dv_plag_presmixt,ipcls) = pdvmixt(dv_mixt_pres,icell)
176  pdv(dv_plag_tempmixt,ipcls) = pdvmixt(dv_mixt_temp,icell)
177  pdv(dv_plag_densmixt,ipcls) = pcvmixt(cv_mixt_dens,icell)
178 #endif
179 #ifdef RFLU
180  pdv(dv_plag_uvelmixt,ipcls) = pcvmixt(cv_mixt_xvel,icell)
181  pdv(dv_plag_vvelmixt,ipcls) = pcvmixt(cv_mixt_yvel,icell)
182  pdv(dv_plag_wvelmixt,ipcls) = pcvmixt(cv_mixt_zvel,icell)
183  pdv(dv_plag_presmixt,ipcls) = pdvmixt(dv_mixt_pres,icell)
184  pdv(dv_plag_tempmixt,ipcls) = pdvmixt(dv_mixt_temp,icell)
185  pdv(dv_plag_densmixt,ipcls) = pcvmixt(cv_mixt_dens,icell)
186 #endif
187 
188  ptv(tv_plag_muelmixt,ipcls) = ptvmixt(tv_mixt_muel,icell)
189  ptv(tv_plag_tcolmixt,ipcls) = ptvmixt(tv_mixt_tcol,icell)
190  END DO ! iPcls
191 
192 ! finalize --------------------------------------------------------------------
193 
194  CALL deregisterfunction( global )
195 
196 END SUBROUTINE plag_intrpmixtproperties
197 
198 !******************************************************************************
199 !
200 ! RCS Revision history:
201 !
202 ! $Log: PLAG_IntrpMixtProperties.F90,v $
203 ! Revision 1.4 2008/12/06 08:44:34 mtcampbe
204 ! Updated license.
205 !
206 ! Revision 1.3 2008/11/19 22:17:46 mtcampbe
207 ! Added Illinois Open Source License/Copyright
208 !
209 ! Revision 1.2 2005/11/30 22:18:57 fnajjar
210 ! Changed bcos of corr routine, now only do piecewise const here
211 !
212 ! Revision 1.1 2004/12/01 20:57:51 fnajjar
213 ! Initial revision after changing case
214 !
215 ! Revision 1.5 2004/02/26 21:02:15 haselbac
216 ! Fixed RFLU bug, removed superfluous statements
217 !
218 ! Revision 1.4 2004/02/06 21:18:20 fnajjar
219 ! Initial Integration of Rocpart with Rocflu
220 !
221 ! Revision 1.3 2003/05/15 02:57:05 jblazek
222 ! Inlined index function.
223 !
224 ! Revision 1.2 2003/01/16 20:18:53 f-najjar
225 ! Removed iRegionGlobal
226 !
227 ! Revision 1.1 2002/10/25 14:16:32 f-najjar
228 ! Initial Import of Rocpart
229 !
230 !
231 !******************************************************************************
232 
233 
234 
235 
236 
237 
238 
**********************************************************************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
**********************************************************************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
subroutine plag_intrpmixtproperties(region)
**********************************************************************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
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 icell
**********************************************************************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
**********************************************************************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 deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)