Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_NonCvUpdate.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: update step for non conserved variables.
26 !
27 ! Description: none.
28 !
29 ! Input: region = current region
30 ! iReg = current region number
31 !
32 ! Output: region%plag = plag variables
33 !
34 ! Notes: This corresponds to Part IX Step 26 in RocfluidMP framework.
35 !
36 !******************************************************************************
37 !
38 ! $Id: PLAG_NonCvUpdate.F90,v 1.3 2008/12/06 08:44:34 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE plag_noncvupdate( region )
45 
46  USE moddatatypes
47  USE moddatastruct, ONLY : t_region
48  USE modglobal, ONLY : t_global
49  USE modmixture, ONLY : t_mixt_input
50  USE modpartlag, ONLY : t_plag
53  USE moderror
54  USE modparameters
56  IMPLICIT NONE
57 
58 ! ... parameters
59  TYPE(t_region), POINTER :: region
60 
61 ! ... loop variables
62 
63 ! ... local variables
64  CHARACTER(CHRLEN) :: rcsidentstring
65 
66 #ifdef RFLO
67  INTEGER :: ilev
68 #endif
69 
70  INTEGER :: ipcls
71 
72  INTEGER :: ifile
73  REAL(RFREAL) :: diaml, massl, taulr
74 
75  TYPE(t_plag), POINTER :: pplag
76  TYPE(t_global), POINTER :: global
77 
78 !******************************************************************************
79 
80  rcsidentstring = '$RCSfile: PLAG_NonCvUpdate.F90,v $ $Revision: 1.3 $'
81 
82  global => region%global
83 
84  CALL registerfunction( global, 'PLAG_NonCvUpdate',&
85  'PLAG_NonCvUpdate.F90' )
86 
87 ! get dimensions and set pointer ----------------------------------------------
88 
89 #ifdef RFLO
90  ilev = region%currLevel
91  pplag => region%levels(ilev)%plag
92 #endif
93 #ifdef RFLU
94  pplag => region%plag
95 #endif
96 
97 ! Calculate derived variables and interpolate mixture properties --------------
98 ! Active for non-null number of particles in region --------------------------
99 
100  IF ( pplag%nPcls > 0 ) THEN
101 
102 ! Get derived variables -------------------------------------------------------
103 
104 ! WRITE(STDOUT,'(A)') ' Entering PLAG_CalcDerivedVariables'
105  CALL plag_calcderivedvariables( region )
106 
107 ! Invoke interpolation for mixture properties ---------------------------------
108 
109 ! WRITE(STDOUT,'(A)') ' Entering PLAG_IntrpMixtProperties'
110  CALL plag_intrpmixtproperties( region )
111 
112  END IF ! nPcls
113 
114 ! TEMPORARY
115 !
116 ! iFile = 700
117 ! DO iPcls = 1, 4
118 ! massL = SUM( pPlag%cv(pPlag%cvPlagMass(:),iPcls) )
119 ! diamL = pPlag%dv(DV_PLAG_DIAM,iPcls)
120 !
121 ! IF ( diamL > 1.0E-14_RFREAL ) THEN
122 ! tauLR = 3.0_RFREAL*global%pi*pPlag%tv(TV_PLAG_MUELMIXT,iPcls)*diamL/massL
123 ! ELSE
124 ! tauLR = 0.0_RFREAL
125 ! ENDIF
126 !
127 ! iFile = iFile+1
128 ! WRITE(iFile,'(1PE12.5,2X,I5,20(2X,1PE28.19))') global%currentTime+ global%dtMin, &
129 ! pPlag%aiv(AIV_PLAG_ICELLS,iPcls), &
130 ! pPlag%cv(CV_PLAG_XPOS:CV_PLAG_ZPOS,iPcls), &
131 ! pPlag%cv(pPlag%cvPlagMass(:),iPcls),&
132 ! massL,diamL,1.0_RFREAL/tauLR,pPlag%tv(TV_PLAG_MUELMIXT,iPcls),&
133 ! pPlag%cv(CV_PLAG_XMOM:CV_PLAG_ENER,iPcls), &
134 ! pPlag%dv(DV_PLAG_UVEL:DV_PLAG_WVEL,iPcls), &
135 ! pPlag%dv(DV_PLAG_UVELMIXT:DV_PLAG_WVELMIXT,iPcls)
136 ! END DO ! iPcls
137 !
138 ! END TEMPORARY
139 
140 ! finalize --------------------------------------------------------------------
141 
142  CALL deregisterfunction( global )
143 
144 END SUBROUTINE plag_noncvupdate
145 
146 !******************************************************************************
147 !
148 ! RCS Revision history:
149 !
150 ! $Log: PLAG_NonCvUpdate.F90,v $
151 ! Revision 1.3 2008/12/06 08:44:34 mtcampbe
152 ! Updated license.
153 !
154 ! Revision 1.2 2008/11/19 22:17:47 mtcampbe
155 ! Added Illinois Open Source License/Copyright
156 !
157 ! Revision 1.1 2004/12/01 20:57:53 fnajjar
158 ! Initial revision after changing case
159 !
160 ! Revision 1.9 2004/11/14 19:47:43 haselbac
161 ! Changed interface
162 !
163 ! Revision 1.8 2004/02/26 21:02:16 haselbac
164 ! Removed iReg and iStage arguments, commented out writing to files
165 !
166 ! Revision 1.7 2004/02/06 21:18:20 fnajjar
167 ! Initial Integration of Rocpart with Rocflu
168 !
169 ! Revision 1.6 2003/11/21 22:43:54 fnajjar
170 ! Commented out PLAG output files
171 !
172 ! Revision 1.5 2003/04/18 16:13:14 fnajjar
173 ! Added iReg=10 and error trap for tauLR in I/O
174 !
175 ! Revision 1.4 2003/04/14 20:16:51 fnajjar
176 ! Included iReg=1 only to write debug file
177 !
178 ! Revision 1.3 2003/04/14 19:46:52 fnajjar
179 ! Added particle diameter and response time to file output
180 !
181 ! Revision 1.2 2003/03/25 22:54:28 fnajjar
182 ! Added dtMin in WRITE stamp to align with proper time stamp
183 !
184 ! Revision 1.1 2003/02/04 19:10:11 f-najjar
185 ! Initial Import
186 !
187 !******************************************************************************
188 
189 
190 
191 
192 
193 
194 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine plag_intrpmixtproperties(region)
subroutine plag_noncvupdate(region)
subroutine plag_calcderivedvariables(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469