68 TYPE(t_region
),
POINTER :: regions(:)
74 CHARACTER(2*CHRLEN+17) :: fname
75 CHARACTER(CHRLEN) ::
msg, timestring
77 INTEGER :: ilev, iregfile, ipc, jpc, kpc, ndumcells, nfield, ioff, ijoff, ijk
79 INTEGER :: ndimc, nrvar, noutsol, globalclass, errorflag
80 INTEGER,
ALLOCATABLE :: ivar(:,:)
82 REAL(RFREAL),
POINTER :: tv(:,:), tcv(:,:), vort(:,:), lens(:)
83 REAL(RFREAL),
ALLOCATABLE :: rvar(:,:), solfile(:,:)
89 global => regions(ireg)%global
92 'TURB_rFLO_ReadSolutionRegion.F90' )
98 ALLOCATE( ivar(6,1),stat=errorflag )
99 ALLOCATE( rvar(nrvar,1),stat=errorflag )
100 global%error = errorflag
101 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
105 IF (global%flowType == flow_unsteady)
THEN
106 WRITE(timestring,
'(1PE11.5)') global%timeStamp
108 WRITE(timestring,
'(1PE11.5)') 0._rfreal
117 IF (global%flowType == flow_unsteady)
THEN
118 IF (global%solutFormat == format_ascii)
THEN
119 WRITE(fname,
'(A,1PE11.5)') trim(global%inDir)//trim(global%casename)//
'.turba_', &
121 OPEN(if_turb_solut,file=fname,
form=
'formatted',
status=
'old',iostat=errorflag)
122 ELSE IF (global%solutFormat == format_binary)
THEN
123 WRITE(fname,
'(A,1PE11.5)') trim(global%inDir)//trim(global%casename)//
'.turbb_', &
125 OPEN(if_turb_solut,file=fname,
form=
'unformatted',
status=
'old',iostat=errorflag)
127 CALL
errorstop( global,err_unknown_format,__line__ )
133 IF (global%solutFormat == format_ascii)
THEN
134 WRITE(fname,
'(A,I6.6)') trim(global%inDir)//trim(global%casename)//
'.turba_', &
136 OPEN(if_turb_solut,file=fname,
form=
'formatted',
status=
'old',iostat=errorflag)
137 ELSE IF (global%solutFormat == format_binary)
THEN
138 WRITE(fname,
'(A,I6.6)') trim(global%inDir)//trim(global%casename)//
'.turbb_', &
140 OPEN(if_turb_solut,file=fname,
form=
'unformatted',
status=
'old',iostat=errorflag)
142 CALL
errorstop( global,err_unknown_format,__line__ )
146 global%error = errorflag
147 IF (global%error /= 0) &
148 CALL
errorstop( global,err_file_open,__line__,
'File: '//trim(fname) )
154 IF (global%flowType==flow_unsteady .AND. global%currentTime>0._rfreal)
THEN
155 IF (global%currentTime /= rvar(1,1))
THEN
156 WRITE(
msg,1000) rvar(1,1),global%currentTime
157 CALL
errorstop( global,err_time_solution,__line__,
msg//
' File: '//trim(fname) )
160 global%currentTime = rvar(1,1)
162 global%resInit = rvar(2,1)
163 global%esg1Sum = rvar(3,1)
164 global%esg4Sum = rvar(4,1)
172 IF (regions(ireg)%procid == global%myProcid)
THEN
173 IF (regions(ireg)%turbInput%modelClass == model_les)
THEN
174 globalclass = model_les
178 IF (regions(ireg)%procid == global%myProcid)
THEN
179 IF ((regions(ireg)%mixtInput%turbModel == turb_model_sa) .OR. &
180 (regions(ireg)%mixtInput%turbModel == turb_model_dessa) .OR. &
181 (regions(ireg)%mixtInput%turbModel == turb_model_hdessa))
THEN
182 globalclass = model_rans
188 ilev = regions(ireg)%currLevel
194 ndimc = ijkend - ijkbeg + 1
203 ndumcells = ivar(5,1)
206 IF (iregfile /= ireg) &
207 CALL
errorstop( global,err_region_number,__line__,
'File: '//trim(fname) )
208 IF ((ipc /= regions(ireg)%levels(ilev)%grid%ipc) .OR. &
209 (jpc /= regions(ireg)%levels(ilev)%grid%jpc) .OR. &
210 (kpc /= regions(ireg)%levels(ilev)%grid%kpc))
THEN
211 WRITE(
msg,1005) ireg,ipc,jpc,kpc
212 CALL
errorstop( global,err_grid_dimensions,__line__,
msg )
214 IF (ndumcells /= regions(ireg)%nDumCells)
THEN
215 WRITE(
msg,1010) ireg,ndumcells,regions(ireg)%nDumCells
222 ALLOCATE( solfile(noutsol,ndimc),stat=errorflag )
223 global%error = errorflag
224 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
227 noutsol,ndimc,solfile )
231 IF (regions(ireg)%turbInput%modelClass == model_les)
THEN
232 tv => regions(ireg)%levels(ilev)%mixt%tv
238 ijk = indijk(
i,
j,
k,ioff,ijoff)
239 tv(tv_mixt_muet,ijk) = solfile(1,
n)
243 IF (noutsol == 2)
THEN
244 vort => regions(ireg)%levels(ilev)%turb%vort
250 ijk = indijk(
i,
j,
k,ioff,ijoff)
251 vort(xcoord,ijk) = solfile(2,
n)
257 IF ((regions(ireg)%mixtInput%turbModel == turb_model_sa) .OR. &
258 (regions(ireg)%mixtInput%turbModel == turb_model_dessa) .OR. &
259 (regions(ireg)%mixtInput%turbModel == turb_model_hdessa))
THEN
260 tcv => regions(ireg)%levels(ilev)%turb%cv
266 ijk = indijk(
i,
j,
k,ioff,ijoff)
267 tcv(cv_sa_nutil,ijk) = solfile(1,
n)
271 IF (noutsol == 2)
THEN
272 vort => regions(ireg)%levels(ilev)%turb%vort
278 ijk = indijk(
i,
j,
k,ioff,ijoff)
279 vort(xcoord,ijk) = solfile(2,
n)
284 IF (noutsol == 3)
THEN
285 vort => regions(ireg)%levels(ilev)%turb%vort
286 lens => regions(ireg)%levels(ilev)%turb%lens
292 ijk = indijk(
i,
j,
k,ioff,ijoff)
293 vort(xcoord,ijk) = solfile(2,
n)
294 lens(ijk) = solfile(3,
n)
301 DEALLOCATE( ivar ,stat=errorflag )
302 DEALLOCATE( rvar ,stat=errorflag )
303 DEALLOCATE( solfile,stat=errorflag )
304 global%error = errorflag
305 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
309 IF (ireg == global%nRegions)
THEN
310 CLOSE(if_turb_solut,iostat=errorflag)
311 global%error = errorflag
312 IF (global%error /= 0) &
313 CALL
errorstop( global,err_file_close,__line__,
'File: '//trim(fname) )
318 1000
FORMAT(
'Time in file is= ',1pe12.5,
' but it should be= ',e12.5,
'.')
319 1005
FORMAT(
'Region ',i5,
', ipc= ',i6,
', jpc= ',i6,
', kpc= ',i6,
'.')
320 1010
FORMAT(
'Region ',i5,
', # dummy cells=',i2,
' but should be= ',i1)
**********************************************************************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
subroutine turb_rflo_readsolutionregion(iReg, regions)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine rflo_readdatafileint(global, fileId, form, nDim1, nDim2, ivar)
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
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 form
**********************************************************************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 jdcbeg
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine rflo_readdatafilereal(global, fileId, form, nDim1, nDim2, var)