76 CHARACTER(CHRLEN) :: plttype, level, stamp, outfmt,
msg, &
77 versionstring, headerstring, npeulstr
79 INTEGER :: plottype, outputformat, npeul
80 INTEGER :: ipc, jpc, kpc, ibc, iec, ibn, ien
83 INTEGER :: icoff, ijcoff, inoff, ijnoff
84 INTEGER :: margin, versionwidth, errorflag
85 INTEGER,
PARAMETER :: headerwidth = 53
88 TYPE(t_region
),
POINTER :: regions(:)
90 TYPE(t_mixt) ,
POINTER :: mixt
91 TYPE(t_peul) ,
POINTER :: peul
103 global%verbLevel = verbose_none
105 global%flowType = flow_steady
106 global%currentTime = -1._rfreal
107 global%currentIter = -1
112 global%nProcAlloc = 1
113 global%myProcid = masterproc
114 global%mpierr = err_none
115 global%error = err_none
117 global%pi = 4._rfreal*atan(1._rfreal)
118 global%rad = global%pi/180._rfreal
123 CALL mpi_init( global%mpierr )
124 IF (global%mpierr /=0 ) CALL
errorstop( global,err_mpi_trouble,__line__ )
130 versionwidth = len_trim(versionstring)
131 margin = (headerwidth-versionwidth)/2
132 headerstring(margin+1:margin+versionwidth) = versionstring(1:versionwidth)
133 headerstring(1:1) =
'*'
134 headerstring(headerwidth:headerwidth) =
'*'
136 WRITE(stdout,
'(/,A)') solver_name//
' *****************************************************'
137 WRITE(stdout,
'(A)') solver_name//
' * *'
138 WRITE(stdout,
'(A)') solver_name//
' * ROCSMOKE: Solution Postprocessing *'
139 WRITE(stdout,
'(A)') solver_name//
' * ================================= *'
140 WRITE(stdout,
'(A)') solver_name//
' * *'
141 WRITE(stdout,
'(A)') solver_name//
' '//trim(headerstring)
142 WRITE(stdout,
'(A)') solver_name//
' * Copyright (c) by the University of Illinois *'
143 WRITE(stdout,
'(A)') solver_name//
' * *'
144 WRITE(stdout,
'(A,/)') solver_name//
' *****************************************************'
148 CALL getarg(1,global%casename)
149 CALL getarg(2,plttype)
152 CALL getarg(5,outfmt)
153 CALL getarg(6,npeulstr)
155 IF (len_trim(global%casename)==0 .OR. &
156 len_trim(plttype)==0 .OR. &
157 len_trim(level)==0 .OR. &
158 len_trim(stamp)==0 .OR. &
159 len_trim(outfmt)==0 .OR. &
160 len_trim(npeulstr)==0 )
THEN
161 WRITE(stdout,
'(/,A,/,A,/,9(A,/))') &
162 solver_name//
' Usage: peulpost <casename> <type> <level> <time/iter> <format> <nPeul>', &
164 solver_name//
' type = 1 - grid + smoke only', &
165 solver_name//
' = 2 - grid + fluid + smoke fields', &
167 solver_name//
' level = grid level (>0)', &
168 solver_name//
' time/iter = time or iteration number', &
170 solver_name//
' format = 3 - Tecplot ASCII', &
171 solver_name//
' nPeul = number of smoke fields included'
173 CALL mpi_finalize( global%mpierr )
178 READ(plttype ,*) plottype
179 READ(level ,*) global%startLevel
180 READ(outfmt ,*) outputformat
181 READ(npeulstr,*) npeul
183 IF (plottype <= 1)
THEN
184 plottype = plot_grid_only
186 plottype = plot_grid_flow
189 IF (outputformat == 3)
THEN
190 outputformat = plot_fmt_tecascii
192 WRITE(stdout,
'(/,A,/)') solver_name// &
193 ' Sorry, binary output not yet supported.'
195 CALL mpi_finalize( global%mpierr )
202 WRITE(stdout,
'(/,A)') solver_name//
' Reading region topology ...'
206 DO ireg=1,global%nRegions
207 regions(ireg)%startLevel = global%startLevel
208 regions(ireg)%currLevel = global%startLevel
209 IF (regions(ireg)%nGridLevels < regions(ireg)%currLevel)
THEN
210 WRITE(
msg,1000) solver_name,ireg,global%startLevel
213 DO ilev=2,regions(ireg)%nGridLevels
214 ipc = regions(ireg)%levels(ilev-1)%grid%ipc
215 jpc = regions(ireg)%levels(ilev-1)%grid%jpc
216 kpc = regions(ireg)%levels(ilev-1)%grid%kpc
217 regions(ireg)%levels(ilev)%grid%ipc = ipc/2
218 regions(ireg)%levels(ilev)%grid%jpc = jpc/2
219 regions(ireg)%levels(ilev)%grid%kpc = kpc/2
225 WRITE(stdout,
'(/,A)') solver_name//
' Reading user input ...'
235 IF (global%flowType == flow_steady)
THEN
236 READ(stamp,*) global%currentIter
238 READ(stamp,*) global%timeStamp
239 global%currentTime = global%timeStamp
244 IF (plottype == plot_grid_only)
THEN
245 WRITE(stdout,
'(A)') solver_name// &
246 ' Reading grid + smoke and writing plot file ...'
248 WRITE(stdout,
'(A)') solver_name// &
249 ' Reading grid + fluid + smoke and writing plot file ...'
252 DO ireg=1,global%nRegions
254 WRITE(stdout,
'(A,I5.5)') solver_name//
' - region ',ireg
258 DO ilev=1,regions(ireg)%nGridLevels
264 grid => regions(ireg)%levels(ilev)%grid
265 ALLOCATE(
grid%xyz(3,ibn:ien),stat=errorflag )
266 global%error = errorflag
267 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
272 ilev = regions(ireg)%currLevel
273 grid => regions(ireg)%levels(ilev)%grid
274 mixt => regions(ireg)%levels(ilev)%mixt
275 peul => regions(ireg)%levels(ilev)%peul
289 IF (regions(ireg)%mixtInput%moveGrid)
THEN
290 ALLOCATE(
grid%siVel(ibn:ien),stat=errorflag )
291 ALLOCATE(
grid%sjVel(ibn:ien),stat=errorflag )
292 ALLOCATE(
grid%skVel(ibn:ien),stat=errorflag )
294 global%error = errorflag
295 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
297 IF (plottype == plot_grid_flow)
THEN
298 ALLOCATE( mixt%cv(5,ibc:iec),stat=errorflag )
299 ALLOCATE( mixt%dv(mixt%nDv,ibc:iec),stat=errorflag )
300 IF (regions(ireg)%mixtInput%computeTv)
THEN
301 ALLOCATE( mixt%tv(mixt%nTv,ibc:iec),stat=errorflag )
303 IF (regions(ireg)%mixtInput%gasModel == gas_model_tcperf)
THEN
304 ALLOCATE( mixt%gv(mixt%nGv,0:1),stat=errorflag )
306 ALLOCATE( mixt%gv(mixt%nGv,ibc:iec),stat=errorflag )
311 regions(ireg)%peulInput%nPtypes = npeul
313 ALLOCATE( peul%cv(npeul,ibc:iec),stat=errorflag )
316 global%error = errorflag
317 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
327 IF (plottype == plot_grid_flow)
THEN
335 WRITE(*,*)
' Entering PEUL_ReadSolutionRegion: iReg = ', ireg
337 WRITE(*,*)
' Exiting PEUL_ReadSolutionRegion: iReg = ', ireg
340 IF (outputformat == plot_fmt_tecascii)
THEN
350 DO ilev=1,regions(ireg)%nGridLevels
351 grid => regions(ireg)%levels(ilev)%grid
352 DEALLOCATE(
grid%xyz,stat=errorflag )
353 global%error = errorflag
354 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
357 ilev = regions(ireg)%currLevel
358 IF (regions(ireg)%mixtInput%moveGrid)
THEN
359 grid => regions(ireg)%levels(ilev)%grid
360 DEALLOCATE(
grid%siVel,stat=errorflag )
361 DEALLOCATE(
grid%sjVel,stat=errorflag )
362 DEALLOCATE(
grid%skVel,stat=errorflag )
364 IF (plottype == plot_grid_flow)
THEN
365 DEALLOCATE( mixt%cv ,stat=errorflag )
366 DEALLOCATE( mixt%dv ,stat=errorflag )
367 DEALLOCATE( mixt%tv ,stat=errorflag )
368 DEALLOCATE( mixt%gv ,stat=errorflag )
370 IF (npeul > 0)
DEALLOCATE( peul%cv ,stat=errorflag )
371 global%error = errorflag
372 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
380 WRITE(stdout,
'(/,A)') solver_name//
' Finished.'
383 CALL mpi_finalize( global%mpierr )
386 1000
FORMAT(
a,
' Region ',i5,
', grid level= ',i2,
'.')
subroutine rflo_copygeometrydummy(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 idcend
subroutine registerfunction(global, funName, fileName)
subroutine rflo_readsolutionregion(iReg, regions)
**********************************************************************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
subroutine rflo_readgridregion(iReg, regions)
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 idnbeg
subroutine buildversionstring(versionString)
**********************************************************************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 writetecplotascii(iReg, region)
subroutine peul_readsolutionregion(iReg, regions)
subroutine rflo_generatecoarsegrids(region)
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 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 rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine rflo_readregiontopology(global, regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine mixtureproperties(region, inBeg, inEnd, gasUpdate)
subroutine deregisterfunction(global)
**********************************************************************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