Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PerfgasTransportVars.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: compute transport variables for a thermally and calorically
26 ! perfect gas using various mdoels.
27 !
28 ! Description: none.
29 !
30 ! Input: inBeg = first value to update
31 ! inEnd = last value to update
32 ! indCp = indicates if cp varies over cells (=1) or is constant (=0)
33 ! indMol = indicates if the mol mass varies over cells (=1) or is
34 ! constant (=0)
35 ! viscModel= viscosity Model
36 ! prLam = laminar Prandtl number
37 ! refVisc = reference viscosity
38 ! refTemp = reference temperature
39 ! suthCoef = reference SutherLand coefficient
40 ! cv = conservative variables
41 ! dv = dependent variables
42 ! gv = gas variables (cp, Mol)
43 !
44 ! Output: tv = transport variables (viscosity, heat conductivity)
45 !
46 ! Notes: values are calculated for laminar flow only.
47 !
48 !******************************************************************************
49 !
50 ! $Id: PerfgasTransportVars.F90,v 1.3 2008/12/06 08:44:09 mtcampbe Exp $
51 !
52 ! Copyright: (c) 2001 by the University of Illinois
53 !
54 !******************************************************************************
55 
56 SUBROUTINE perfgastransportvars( inBeg,inEnd,indCp,indMol,viscModel,prLam, &
57  refvisc,reftemp,suthcoef,cv,dv,gv,tv )
58 
59  USE moddatatypes
60  USE modparameters
61  IMPLICIT NONE
62 
63 ! ... parameters
64  INTEGER :: inbeg, inend, indcp, indmol, viscmodel
65 
66  REAL(RFREAL) :: prlam, reftemp, refvisc, suthcoef
67  REAL(RFREAL), POINTER :: cv(:,:), dv(:,:), gv(:,:), tv(:,:)
68 
69 ! ... loop variables
70  INTEGER :: ic
71 
72 ! ... local variables
73  REAL(RFREAL) :: abstemp, s1, s2, s12, s3, s4, prrl, rat
74 
75 !******************************************************************************
76 
77  prrl = 1._rfreal/prlam
78 
79  SELECT CASE (viscmodel)
80 
81 ! - Sutherland formula --------------------------------------------------------
82 
83  CASE (visc_suthr)
84  s1 = reftemp
85  s2 = suthcoef
86  s12 = 1._rfreal + s1/s2
87 
88  DO ic=inbeg,inend
89  rat = sqrt(dv(dv_mixt_temp,ic)/s2) &
90  * s12/(1._rfreal+s1/dv(dv_mixt_temp,ic))
91 
92  tv(tv_mixt_muel,ic) = refvisc*rat
93  tv(tv_mixt_tcol,ic) = gv(gv_mixt_cp,ic*indcp)*tv(tv_mixt_muel,ic)*prrl
94  ENDDO ! ic
95 
96 ! - constant viscosity --------------------------------------------------------
97 
98  CASE (visc_fixed)
99  DO ic=inbeg,inend
100  tv(tv_mixt_muel,ic) = refvisc
101  tv(tv_mixt_tcol,ic) = gv(gv_mixt_cp,ic*indcp)*tv(tv_mixt_muel,ic)*prrl
102  ENDDO ! ic
103 
104 ! - Antibes formula -----------------------------------------------------------
105 
106  CASE (visc_antib)
107  s1 = 110.0_rfreal
108  s2 = 120.0_rfreal
109  s3 = 230.0_rfreal
110  s4 = 1._rfreal/reftemp * sqrt(s2/reftemp) *(reftemp+s1)/s3
111 
112  IF ( reftemp <= s2 ) THEN
113  DO ic=inbeg,inend
114  abstemp = abs( dv(dv_mixt_temp,ic) )
115 
116  IF ( abstemp < s2 ) THEN
117  rat = abstemp/reftemp
118  ELSE
119  rat = sqrt(abstemp/s2) *(abstemp/reftemp) *( s3/(abstemp+s1) )
120  ENDIF ! absTemp
121 
122  tv(tv_mixt_muel,ic) = refvisc*rat
123  tv(tv_mixt_tcol,ic) = gv(gv_mixt_cp,ic*indcp)*tv(tv_mixt_muel,ic)*prrl
124  ENDDO ! ic
125 
126  ELSE
127  DO ic=inbeg,inend
128  abstemp = abs( dv(dv_mixt_temp,ic) )
129 
130  IF ( abstemp < s2 ) THEN
131  rat = s4
132  ELSE
133  rat = sqrt(abstemp/reftemp) *( abstemp/reftemp ) &
134  * ( reftemp+s1 )/( abstemp+s1 )
135  ENDIF ! absTemp
136 
137  tv(tv_mixt_muel,ic) = refvisc*rat
138  tv(tv_mixt_tcol,ic) = gv(gv_mixt_cp,ic*indcp)*tv(tv_mixt_muel,ic)*prrl
139  ENDDO ! ic
140  ENDIF ! refTemp
141 
142  END SELECT ! viscModel
143 
144 END SUBROUTINE perfgastransportvars
145 
146 !******************************************************************************
147 !
148 ! RCS Revision history:
149 !
150 ! $Log: PerfgasTransportVars.F90,v $
151 ! Revision 1.3 2008/12/06 08:44:09 mtcampbe
152 ! Updated license.
153 !
154 ! Revision 1.2 2008/11/19 22:17:23 mtcampbe
155 ! Added Illinois Open Source License/Copyright
156 !
157 ! Revision 1.1 2004/12/01 16:50:06 haselbac
158 ! Initial revision after changing case
159 !
160 ! Revision 1.6 2003/05/06 20:05:39 jblazek
161 ! Corrected bug in grid motion (corner "averaging").
162 !
163 ! Revision 1.5 2003/04/10 23:27:29 fnajjar
164 ! Added 2 new viscosity models and aligned calling sequence
165 !
166 ! Revision 1.4 2002/09/05 17:40:20 jblazek
167 ! Variable global moved into regions().
168 !
169 ! Revision 1.3 2002/02/09 01:47:01 jblazek
170 ! Added multi-probe option, residual smoothing, physical time step.
171 !
172 ! Revision 1.2 2002/01/23 03:51:24 jblazek
173 ! Added low-level time-stepping routines.
174 !
175 ! Revision 1.1 2002/01/10 00:02:06 jblazek
176 ! Added calculation of mixture properties.
177 !
178 !******************************************************************************
179 
180 
181 
182 
183 
184 
**********************************************************************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 ic
double sqrt(double d)
Definition: double.h:73
subroutine perfgastransportvars(inBeg, inEnd, indCp, indMol, viscModel, prLam, refVisc, refTemp, suthCoef, cv, dv, gv, tv)