56 TYPE(t_region
),
POINTER :: regions(:)
62 CHARACTER(CHRLEN) :: rcsidentstring
66 INTEGER :: flowmodel, turbmodel, ilev, nsv, nst, errorflag
68 REAL(RFREAL) :: one3rd, filtlscale, rndel(3)
73 rcsidentstring =
'$RCSfile: TURB_DerivedInputValues.F90,v $'
75 global => regions(1)%global
77 'TURB_DerivedInputValues.F90' )
79 IF ( global%myProcid == masterproc .AND. &
80 global%verbLevel > verbose_none )
THEN
81 WRITE(stdout,
'(A,1X,A)') solver_name,
'Entering TURB_DerivedInputValues...'
87 one3rd = 1._rfreal/3._rfreal
93 DO ireg = 1,global%nRegions
96 DO ireg = lbound(regions,1),ubound(regions,1)
99 flowmodel = regions(ireg)%mixtInput%flowModel
100 turbmodel = regions(ireg)%mixtInput%turbModel
101 input => regions(ireg)%turbInput
106 DO ilev=1,regions(ireg)%nGridLevels
107 regions(ireg)%levels(ilev)%mixt%nTv = 4
111 regions(ireg)%mixtInput%nTv = 4
117 IF (regions(ireg)%nDumCells < 3)
THEN
118 IF ((turbmodel==turb_model_scalsim).OR. &
119 (turbmodel==turb_model_dynsmag))
THEN
120 IF ((
input%filterWidth(diri) > 1) .OR. &
121 (
input%filterWidth(dirj) > 1) .OR. &
122 (
input%filterWidth(dirk) > 1))
THEN
123 regions(ireg)%nDumCells = 3
125 ELSEIF (turbmodel==turb_model_dynmixd .OR. &
126 turbmodel==turb_model_hdessa)
THEN
127 regions(ireg)%nDumCells = 3
136 IF ((turbmodel==turb_model_fixsmag).OR. &
137 (turbmodel==turb_model_scalsim).OR. &
138 (turbmodel==turb_model_dynsmag).OR. &
139 (turbmodel==turb_model_dynmixd))
THEN
140 input%modelClass = model_les
141 ELSEIF ((turbmodel==turb_model_sa).OR. &
142 (turbmodel==turb_model_dessa).OR. &
143 (turbmodel==turb_model_hdessa))
THEN
144 input%modelClass = model_rans
151 IF (
input%modelClass == model_les)
THEN
153 ELSEIF (
input%modelClass == model_rans)
THEN
154 IF ((turbmodel==turb_model_sa).OR. &
155 (turbmodel==turb_model_dessa).OR. &
156 (turbmodel==turb_model_hdessa))
THEN
163 IF (turbmodel==turb_model_fixsmag .OR. &
164 turbmodel==turb_model_dynsmag .OR. &
165 turbmodel==turb_model_dynmixd)
THEN
167 global%calcFaceCtr = .true.
175 IF ((global%flowType == flow_unsteady) .AND. &
176 (global%doStat == active) .AND. &
177 (global%turbNStat > 0))
THEN
190 IF ((turbmodel == turb_model_dynsmag).OR. &
191 (turbmodel == turb_model_dynmixd))
THEN
198 ELSEIF ((turbmodel == turb_model_sa).OR. &
199 (turbmodel == turb_model_dessa).OR. &
200 (turbmodel == turb_model_hdessa))
THEN
215 IF (
input%deltaType == deltype_cbrt)
THEN
216 filtlscale = 1._rfreal
217 ELSEIF (
input%deltaType == deltype_sqrt)
THEN
218 filtlscale = 3._rfreal
221 rndel(1) =
REAL(input%filterWidth(DIRI))
222 rndel(2) =
REAL(input%filterWidth(DIRJ))
223 rndel(3) =
REAL(input%filterWidth(DIRK))
224 input%delFac2 = (rndel(1)*rndel(2)*rndel(3))**one3rd
225 IF (
input%delFac2 < real_small)
THEN
226 input%delFac2 =
sqrt(rndel(1)*rndel(2))+ &
227 sqrt(rndel(1)*rndel(3))+ &
228 sqrt(rndel(2)*rndel(3))
230 IF ((
input%filterWidth(diri)/=0.AND.
input%filterWidth(dirj)==0 &
231 .AND.
input%filterWidth(dirk)==0).OR. &
232 (
input%filterWidth(diri)==0.AND.
input%filterWidth(dirj)/=0 &
233 .AND.
input%filterWidth(dirk)==0).OR. &
234 (
input%filterWidth(diri)==0.AND.
input%filterWidth(dirj)==0 &
235 .AND.
input%filterWidth(dirk)/=0))
THEN
236 input%delFac2 = rndel(1)+rndel(2)+rndel(3)
245 IF (turbmodel==turb_model_fixsmag)
THEN
246 input%delFac2 = 1._rfreal
253 IF (global%flowType == flow_unsteady)
THEN
254 input%smoocf = -1._rfreal
258 IF ((turbmodel == turb_model_sa).OR. &
259 (turbmodel == turb_model_dessa).OR. &
260 (turbmodel == turb_model_hdessa))
THEN
261 ALLOCATE(
input%const(mc_sa_nelm),stat=errorflag )
262 global%error = errorflag
263 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
265 input%const(mc_sa_cb1) = 0.1355_rfreal
266 input%const(mc_sa_cb2) = 0.622_rfreal
267 input%const(mc_sa_cw2) = 0.3_rfreal
268 input%const(mc_sa_cw3) = 2.0_rfreal
269 input%const(mc_sa_cv1) = 7.1_rfreal
270 input%const(mc_sa_rsig) = 3.0_rfreal/2.0_rfreal
271 input%const(mc_sa_rkap) = 1.0_rfreal/0.41_rfreal
272 input%const(mc_sa_cw1) = &
273 input%const(mc_sa_cb1)*
input%const(mc_sa_rkap)**2 + &
274 (1._rfreal+
input%const(mc_sa_cb2))*
input%const(mc_sa_rsig)
276 nullify(
input%const )
283 IF ( global%myProcid == masterproc .AND. &
284 global%verbLevel > verbose_none )
THEN
285 WRITE(stdout,
'(A,1X,A)') solver_name,
'Leaving TURB_DerivedInputValues.'
subroutine registerfunction(global, funName, fileName)
subroutine input(X, NNODE, NDC, NCELL, NFCE, NBPTS, NBFACE, ITYP, NPROP, XBNDY, XFAR, YFAR, ZFAR)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)