77 TYPE(t_region
) :: region
80 TYPE(t_region
),
TARGET :: region
84 INTEGER :: ipatch, in, l, ifl
87 CHARACTER(CHRLEN) :: rcsidentstring
90 TYPE(t_turb),
POINTER :: turb
95 REAL(RFREAL) :: triploc(xcoord:zcoord), treshold
96 REAL(RFREAL),
POINTER :: tv(:,:), tcv(:,:), tcvold(:,:), tdv(:,:), vort(:,:)
97 REAL(RFREAL),
POINTER :: dsterm(:,:)
99 INTEGER :: ilev, inoff, ijnoff, ibn, ien
103 CHARACTER(2*CHRLEN+17) :: fname
104 LOGICAL :: fileexists
107 INTEGER :: ibc, iec, ibn, ien,
ic, ifg, ifgbeg
111 rcsidentstring =
'$RCSfile: TURB_InitSolution.F90,v $'
113 global => region%global
115 'TURB_InitSolution.F90' )
121 iec = region%grid%nCellsTot
128 ilev = region%currLevel
137 ien = region%grid%nFaces
142 turbmodel = region%mixtInput%turbModel
145 grid => region%levels(ilev)%grid
146 turb => region%levels(ilev)%turb
147 tv => region%levels(ilev)%mixt%tv
149 IF (region%turbInput%nDv > 0)
THEN
152 IF (region%turbInput%nCv > 0)
THEN
155 dsterm => turb%dsterm
163 IF (region%turbInput%nDv > 0)
THEN
164 tdv => region%turb%dv
166 IF (region%turbInput%nCv > 0)
THEN
167 tcv => region%turb%cv
168 tcvold => region%turb%cvOld
169 dsterm => region%turb%dsterm
179 IF (global%solutFormat == format_ascii .OR. global%solutFormat == format_hdf)
THEN
180 WRITE(fname,
'(A,1PE11.5)') trim(global%inDir)//trim(global%casename)//
'.turba_', &
182 INQUIRE(file=fname,exist=fileexists)
183 ELSE IF (global%solutFormat == format_binary)
THEN
184 WRITE(fname,
'(A,I6.6)') trim(global%inDir)//trim(global%casename)//
'.turbb_', &
186 INQUIRE(file=fname,exist=fileexists)
188 CALL
errorstop( global,err_unknown_format,__line__ )
191 IF ((global%flowType == flow_unsteady .AND. &
192 global%timeStamp <= 0._rfreal) .OR. &
193 (global%flowType == flow_steady .AND. &
194 global%currentIter <= 0) .OR. &
195 (global%flowType == flow_unsteady .AND. &
196 global%timeStamp > 0._rfreal .AND. &
197 fileexists .EQV. .false.) .OR. &
198 (global%flowType == flow_steady .AND. &
199 global%currentIter > 0 .AND. &
200 fileexists .EQV. .false.))
THEN
201 tv(tv_mixt_muet,:) = 0._rfreal
202 global%esg1Sum = 0._rfreal
203 global%esg4Sum = 0._rfreal
204 IF (region%turbInput%nCv > 0)
THEN
206 tcv(cv_sa_nutil,:)= tv(tv_mixt_muel,:)
209 tcv(cv_sa_nutil,:)= region%mixtInput%refVisc
211 tcvold(:,:) = 0._rfreal
214 tv(tv_mixt_tcot,:) = 0._rfreal
216 IF (region%turbInput%nCv > 0)
THEN
217 dsterm(:,:) = 0._rfreal
220 IF (region%turbInput%nDv > 0)
THEN
224 IF (
ASSOCIATED( turb%vort ))
THEN
225 turb%vort = 0._rfreal
230 IF ((region%mixtInput%turbModel == turb_model_sa) .OR. &
231 (region%mixtInput%turbModel == turb_model_dessa) .OR. &
232 (region%mixtInput%turbModel == turb_model_hdessa))
THEN
239 IF ((turbmodel==turb_model_fixsmag) .OR. &
240 (turbmodel==turb_model_dynsmag) .OR. &
241 (turbmodel==turb_model_dynmixd))
THEN
255 IF (((turbmodel==turb_model_scalsim) .OR. &
256 (turbmodel==turb_model_dynsmag) .OR. &
257 (turbmodel==turb_model_dynmixd)) .AND. &
258 (region%turbInput%filterType == filtype_nonunif))
THEN
260 ALLOCATE( turb%workI(2,ibn:ien),stat=errorflag )
261 ALLOCATE( turb%workJ(2,ibn:ien),stat=errorflag )
262 ALLOCATE( turb%workK(2,ibn:ien),stat=errorflag )
263 global%error = errorflag
264 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
269 DEALLOCATE( turb%workI,turb%workJ,turb%workK )
275 IF (region%turbInput%nZof > 0)
THEN
277 turb%zofi = 1._rfreal
278 turb%zofj = 1._rfreal
279 turb%zofk = 1._rfreal
282 turb%zofi = 1._rfreal
283 turb%bZofi = 1._rfreal
289 IF (turbmodel==turb_model_fixsmag .OR. &
290 turbmodel==turb_model_dynsmag .OR. &
291 turbmodel==turb_model_dynmixd)
THEN
292 triploc(:) = region%turbInput%xyzSmag(:)
293 treshold = -huge( 1.0_rfreal )/1000._rfreal
295 IF ((triploc(xcoord) > treshold) .OR. &
296 (triploc(ycoord) > treshold) .OR. &
297 (triploc(zcoord) > treshold))
THEN
302 IF (
grid%cfcI(l,in) < triploc(l))
THEN
303 turb%zofi(l,zof_les_eddyvis,in) = 0._rfreal
305 turb%zofi(l,zof_les_eddyvis,in) = 1._rfreal
309 IF (
grid%cfcJ(l,in) < triploc(l))
THEN
310 turb%zofj(l,zof_les_eddyvis,in) = 0._rfreal
312 turb%zofj(l,zof_les_eddyvis,in) = 1._rfreal
316 IF (
grid%cfcK(l,in) < triploc(l))
THEN
317 turb%zofk(l,zof_les_eddyvis,in) = 0._rfreal
319 turb%zofk(l,zof_les_eddyvis,in) = 1._rfreal
327 IF (
grid%fc(l,in) < triploc(l))
THEN
328 turb%zofi(l,zof_les_eddyvis,in) = 0._rfreal
330 turb%zofi(l,zof_les_eddyvis,in) = 1._rfreal
334 DO ipatch = 1,
grid%nPatches
335 patch => region%patches(ipatch)
339 DO ifl = 1,
patch%nBFaces
344 IF (
grid%cofg(l,
ic) < triploc(l))
THEN
345 turb%bZofi(l,zof_les_eddyvis,ifg) = 0._rfreal
347 turb%bZofi(l,zof_les_eddyvis,ifg) = 1._rfreal
360 DO ipatch=1,region%nPatches
361 patch1 => region%levels(1)%patches(ipatch)
362 patch => region%levels(ilev)%patches(ipatch)
365 DO ipatch=1,region%grid%nPatches
366 patch => region%patches(ipatch)
371 IF (
patch%bcType>=bc_noslipwall .AND. &
372 patch%bcType<=bc_noslipwall+bc_range)
THEN
373 IF (
patch%valBola%switches(wlm_input_model) /= wlm_model_nomodel)
THEN
379 IF (dowlm .eqv. .true.)
THEN
388 IF (
patch%valBola%distrib==bcdat_distrib)
THEN
391 CALL
errorstop( global,err_val_bcval,__line__,
'No variable roughness yet' )
394 patch%valBola%vals(:,wlm_vals_rough)= patch1%valBola%vals(1,wlm_vals_rough)
397 IF (
patch%valBola%switches(wlm_input_model) == wlm_model_extern)
THEN
subroutine registerfunction(global, funName, fileName)
**********************************************************************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
subroutine turb_flofacewidth(region)
subroutine turb_flowlmmetric(region, patch)
**********************************************************************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 jdnbeg
**********************************************************************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 idnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************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 jdnend
**********************************************************************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 idnbeg
subroutine turb_wlminitia(region, patch)
subroutine turb_flolesgencoff(region)
subroutine turb_ranssageteddyvis(region)
subroutine turb_flofacevolume(region, ijk)
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine turb_initsolution(region)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine mixtureproperties(region, inBeg, inEnd, gasUpdate)
subroutine deregisterfunction(global)
subroutine turb_flufacevolume(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 kdnbeg
subroutine turb_flolesgencocc(region)