72 CHARACTER(CHRLEN) :: RCSIdentString = &
73 '$RCSfile: SPEC_RFLU_ModReadWriteVars.F90,v $ $Revision: 1.4 $'
118 LOGICAL :: fileexists
119 CHARACTER(CHRLEN) :: errorstring,ifilename,ifilenameold,sectionstring, &
120 timestring1,timestring2
121 INTEGER :: errorflag,
i,ifile,ivars,
j,loopcounter,ncellstot,ncellsexpected, &
122 nvars,nvarsexpected,precactual,precexpected,rangeactual, &
124 REAL(RFREAL) :: currenttime
125 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv
126 TYPE(t_grid),
POINTER :: pgrid
133 TYPE(t_region
),
POINTER :: pregion
139 global => pregion%global
142 'SPEC_RFLU_ModReadWriteVars.F90')
144 IF ( global%myProcid == masterproc .AND. &
145 global%verbLevel > verbose_none )
THEN
146 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading ASCII species cv file...'
149 IF ( global%flowType == flow_unsteady )
THEN
151 pregion%iRegionGlobal,global%currentTime, &
154 pregion%iRegionGlobal,global%currentTime, &
158 pregion%iRegionGlobal,global%currentIter, &
161 pregion%iRegionGlobal,global%currentIter, &
167 INQUIRE(file=ifilename,exist=fileexists)
169 IF ( fileexists .EQV. .true. )
THEN
170 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
171 global%error = errorflag
172 IF ( global%error /= err_none )
THEN
173 CALL
errorstop(global,err_file_open,__line__,ifilename)
176 OPEN(ifile,file=ifilenameold,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
177 global%error = errorflag
178 IF ( global%error /= err_none )
THEN
179 CALL
errorstop(global,err_file_open,__line__,ifilenameold)
187 pregion%spec%cvState = cv_mixt_state_cons
193 IF ( global%myProcid == masterproc .AND. &
194 global%verbLevel > verbose_low )
THEN
195 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
198 READ(ifile,
'(A)') sectionstring
199 IF ( trim(sectionstring) /=
'# ROCFLU species file' )
THEN
200 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
207 READ(ifile,
'(A)') sectionstring
208 IF ( trim(sectionstring) /=
'# Precision and range' )
THEN
209 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
213 rangeexpected = range(1.0_rfreal)
215 READ(ifile,
'(2(I8))') precactual,rangeactual
216 IF ( precactual < precexpected .OR. rangeactual < rangeexpected )
THEN
217 CALL
errorstop(global,err_prec_range,__line__)
224 READ(ifile,
'(A)') sectionstring
225 IF ( trim(sectionstring) /=
'# Physical time' )
THEN
226 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
229 READ(ifile,
'(E23.16)') currenttime
231 IF ( global%flowType == flow_unsteady )
THEN
232 IF ( global%currentTime < 0.0_rfreal )
THEN
233 global%currentTime = currenttime
235 WRITE(timestring1,
'(1PE11.5)') global%currentTime
236 WRITE(timestring2,
'(1PE11.5)') currenttime
237 IF ( trim(timestring1) /= trim(timestring2) )
THEN
238 CALL
errorstop(global,err_time_solution,__line__,trim(ifilename))
247 pgrid => pregion%grid
249 nvarsexpected = pregion%specInput%nSpecies
250 ncellsexpected = pgrid%nCellsTot
252 READ(ifile,
'(A)') sectionstring
253 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
254 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
257 READ(ifile,
'(2(I8))') ncellstot,nvars
258 IF ( ncellstot /= ncellsexpected )
THEN
259 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',ncellstot, &
260 'but expected:',ncellsexpected
261 CALL
errorstop(global,err_invalid_ncells,__line__,errorstring)
264 IF ( nvars /= nvarsexpected )
THEN
265 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',nvars, &
266 'but expected:',nvarsexpected
267 CALL
errorstop(global,err_invalid_nvars,__line__)
278 loopcounter = loopcounter + 1
280 READ(ifile,
'(A)') sectionstring
282 SELECT CASE ( trim(sectionstring) )
289 IF ( global%myProcid == masterproc .AND. &
290 global%verbLevel > verbose_low )
THEN
291 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species concentration...'
294 pcv => pregion%spec%cv
297 READ(ifile,
'(5(E23.16))') (pcv(ivars,
j),
j=1,pgrid%nCellsTot)
304 IF ( global%myProcid == masterproc .AND. &
305 global%verbLevel > verbose_low )
THEN
306 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
316 IF ( global%verbLevel > verbose_low )
THEN
317 WRITE(stdout,
'(A,3X,A)') solver_name,sectionstring
320 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
328 IF ( loopcounter >= limit_infinite_loop )
THEN
329 CALL
errorstop(global,err_infinite_loop,__line__)
338 IF ( ivars /= nvars )
THEN
339 CALL
errorstop(global,err_invalid_nvars,__line__)
346 CLOSE(ifile,iostat=errorflag)
347 global%error = errorflag
348 IF ( global%error /= err_none )
THEN
349 CALL
errorstop(global,err_file_close,__line__,ifilename)
356 IF ( global%myProcid == masterproc .AND. &
357 global%verbLevel > verbose_none )
THEN
358 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading ASCII species cv file done.'
401 LOGICAL :: fileexists
402 CHARACTER(CHRLEN) :: errorstring,ifilename,ifilenameold,sectionstring, &
403 timestring1,timestring2
404 INTEGER :: errorflag,
i,ifile,ivars,
j,loopcounter,ncellstot,ncellsexpected, &
405 nvars,nvarsexpected,precactual,precexpected,rangeactual, &
407 REAL(RFREAL) :: currenttime
408 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv
409 TYPE(t_grid),
POINTER :: pgrid
416 TYPE(t_region
),
POINTER :: pregion
422 global => pregion%global
425 'SPEC_RFLU_ModReadWriteVars.F90')
427 IF ( global%myProcid == masterproc .AND. &
428 global%verbLevel > verbose_none )
THEN
429 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading binary species cv file...'
432 IF ( global%flowType == flow_unsteady )
THEN
434 pregion%iRegionGlobal,global%currentTime, &
437 pregion%iRegionGlobal,global%currentTime, &
441 pregion%iRegionGlobal,global%currentIter, &
444 pregion%iRegionGlobal,global%currentIter, &
450 INQUIRE(file=ifilename,exist=fileexists)
452 IF ( fileexists .EQV. .true. )
THEN
453 OPEN(ifile,file=ifilename,
form=
"UNFORMATTED",
status=
"OLD",iostat=errorflag)
454 global%error = errorflag
455 IF ( global%error /= err_none )
THEN
456 CALL
errorstop(global,err_file_open,__line__,ifilename)
459 OPEN(ifile,file=ifilenameold,
form=
"UNFORMATTED",
status=
"OLD", &
461 global%error = errorflag
462 IF ( global%error /= err_none )
THEN
463 CALL
errorstop(global,err_file_open,__line__,ifilenameold)
471 pregion%spec%cvState = cv_mixt_state_cons
477 IF ( global%myProcid == masterproc .AND. &
478 global%verbLevel > verbose_low )
THEN
479 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
482 READ(ifile) sectionstring
483 IF ( trim(sectionstring) /=
'# ROCFLU species file' )
THEN
484 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
491 READ(ifile) sectionstring
492 IF ( trim(sectionstring) /=
'# Precision and range' )
THEN
493 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
497 rangeexpected = range(1.0_rfreal)
499 READ(ifile) precactual,rangeactual
500 IF ( precactual < precexpected .OR. rangeactual < rangeexpected )
THEN
501 CALL
errorstop(global,err_prec_range,__line__)
508 READ(ifile) sectionstring
509 IF ( trim(sectionstring) /=
'# Physical time' )
THEN
510 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
513 READ(ifile) currenttime
515 IF ( global%flowType == flow_unsteady )
THEN
516 IF ( global%currentTime < 0.0_rfreal )
THEN
517 global%currentTime = currenttime
519 WRITE(timestring1,
'(1PE11.5)') global%currentTime
520 WRITE(timestring2,
'(1PE11.5)') currenttime
521 IF ( trim(timestring1) /= trim(timestring2) )
THEN
522 CALL
errorstop(global,err_time_solution,__line__,trim(ifilename))
531 pgrid => pregion%grid
533 nvarsexpected = pregion%specInput%nSpecies
534 ncellsexpected = pgrid%nCellsTot
536 READ(ifile) sectionstring
537 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
538 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
541 READ(ifile) ncellstot,nvars
542 IF ( ncellstot /= ncellsexpected )
THEN
543 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',ncellstot, &
544 'but expected:',ncellsexpected
545 CALL
errorstop(global,err_invalid_ncells,__line__,errorstring)
548 IF ( nvars /= nvarsexpected )
THEN
549 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',nvars, &
550 'but expected:',nvarsexpected
551 CALL
errorstop(global,err_invalid_nvars,__line__)
562 loopcounter = loopcounter + 1
564 READ(ifile) sectionstring
566 SELECT CASE ( trim(sectionstring) )
573 IF ( global%myProcid == masterproc .AND. &
574 global%verbLevel > verbose_low )
THEN
575 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species concentration...'
578 pcv => pregion%spec%cv
581 READ(ifile) (pcv(ivars,
j),
j=1,pgrid%nCellsTot)
588 IF ( global%myProcid == masterproc .AND. &
589 global%verbLevel > verbose_low )
THEN
590 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
600 IF ( global%verbLevel > verbose_low )
THEN
601 WRITE(stdout,
'(A,3X,A)') solver_name,sectionstring
604 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
612 IF ( loopcounter >= limit_infinite_loop )
THEN
613 CALL
errorstop(global,err_infinite_loop,__line__)
622 IF ( ivars /= nvars )
THEN
623 CALL
errorstop(global,err_invalid_nvars,__line__)
630 CLOSE(ifile,iostat=errorflag)
631 global%error = errorflag
632 IF ( global%error /= err_none )
THEN
633 CALL
errorstop(global,err_file_close,__line__,ifilename)
640 IF ( global%myProcid == masterproc .AND. &
641 global%verbLevel > verbose_none )
THEN
642 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading binary species cv file done.'
686 CHARACTER(CHRLEN) :: errorstring,ifilename,sectionstring,timestring1, &
688 INTEGER :: errorflag,ifile,ispeceevtemp,ispeceevxvel,ispeceevyvel, &
689 ispeceevzvel,ivars,
j,loopcounter,ncellstot,ncellsexpected, &
690 nvars,nvarsexpected,precactual,precexpected,rangeactual, &
692 REAL(RFREAL) :: currenttime
693 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: peev
694 TYPE(t_grid),
POINTER :: pgrid
701 TYPE(t_region
),
POINTER :: pregion
707 global => pregion%global
710 'SPEC_RFLU_ModReadWriteVars.F90')
712 IF ( global%myProcid == masterproc .AND. &
713 global%verbLevel > verbose_none )
THEN
714 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading ASCII species eev file...'
717 IF ( global%flowType == flow_unsteady )
THEN
719 pregion%iRegionGlobal,global%currentTime, &
723 pregion%iRegionGlobal,global%currentIter,ifilename)
727 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"OLD",iostat=errorflag)
728 global%error = errorflag
729 IF ( global%error /= err_none )
THEN
730 CALL
errorstop(global,err_file_open,__line__,ifilename)
737 IF ( global%myProcid == masterproc .AND. &
738 global%verbLevel > verbose_low )
THEN
739 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
742 READ(ifile,
'(A)') sectionstring
743 IF ( trim(sectionstring) /=
'# ROCFLU species eev file' )
THEN
744 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
751 READ(ifile,
'(A)') sectionstring
752 IF ( trim(sectionstring) /=
'# Precision and range' )
THEN
753 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
757 rangeexpected = range(1.0_rfreal)
759 READ(ifile,
'(2(I8))') precactual,rangeactual
760 IF ( precactual < precexpected .OR. rangeactual < rangeexpected )
THEN
761 CALL
errorstop(global,err_prec_range,__line__)
768 READ(ifile,
'(A)') sectionstring
769 IF ( trim(sectionstring) /=
'# Physical time' )
THEN
770 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
773 READ(ifile,
'(E23.16)') currenttime
775 IF ( global%flowType == flow_unsteady )
THEN
776 IF ( global%currentTime < 0.0_rfreal )
THEN
777 global%currentTime = currenttime
779 WRITE(timestring1,
'(1PE11.5)') global%currentTime
780 WRITE(timestring2,
'(1PE11.5)') currenttime
781 IF ( trim(timestring1) /= trim(timestring2) )
THEN
782 CALL
errorstop(global,err_time_solution,__line__,trim(ifilename))
791 pgrid => pregion%grid
793 nvarsexpected = pregion%specInput%nSpeciesEE*eev_spec_nvar
794 ncellsexpected = pgrid%nCellsTot
796 READ(ifile,
'(A)') sectionstring
797 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
798 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
801 READ(ifile,
'(2(I8))') ncellstot,nvars
802 IF ( ncellstot /= ncellsexpected )
THEN
803 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',ncellstot, &
804 'but expected:',ncellsexpected
805 CALL
errorstop(global,err_invalid_ncells,__line__,errorstring)
808 IF ( nvars /= nvarsexpected )
THEN
809 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',nvars, &
810 'but expected:',nvarsexpected
811 CALL
errorstop(global,err_invalid_nvars,__line__)
825 loopcounter = loopcounter + 1
827 READ(ifile,
'(A)') sectionstring
829 SELECT CASE ( trim(sectionstring) )
835 CASE (
'# x-velocity' )
836 IF ( global%myProcid == masterproc .AND. &
837 global%verbLevel > verbose_low )
THEN
838 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species x-velocity...'
841 peev => pregion%spec%eev
843 ispeceevxvel = ispeceevxvel + 1
844 READ(ifile,
'(5(E23.16))') (peev(eev_spec_xvel,ispeceevxvel,
j), &
851 CASE (
'# y-velocity' )
852 IF ( global%myProcid == masterproc .AND. &
853 global%verbLevel > verbose_low )
THEN
854 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species y-velocity...'
857 peev => pregion%spec%eev
859 ispeceevyvel = ispeceevyvel + 1
860 READ(ifile,
'(5(E23.16))') (peev(eev_spec_yvel,ispeceevyvel,
j), &
867 CASE (
'# z-velocity' )
868 IF ( global%myProcid == masterproc .AND. &
869 global%verbLevel > verbose_low )
THEN
870 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species z-velocity...'
873 peev => pregion%spec%eev
875 ispeceevzvel = ispeceevzvel + 1
876 READ(ifile,
'(5(E23.16))') (peev(eev_spec_zvel,ispeceevzvel,
j), &
883 CASE (
'# Temperature' )
884 IF ( global%myProcid == masterproc .AND. &
885 global%verbLevel > verbose_low )
THEN
886 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species temperature...'
889 peev => pregion%spec%eev
891 ispeceevtemp = ispeceevtemp + 1
892 READ(ifile,
'(5(E23.16))') (peev(eev_spec_temp,ispeceevtemp,
j), &
900 IF ( global%myProcid == masterproc .AND. &
901 global%verbLevel > verbose_low )
THEN
902 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
912 IF ( global%verbLevel > verbose_low )
THEN
913 WRITE(stdout,
'(A,3X,A)') solver_name,sectionstring
916 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
924 IF ( loopcounter >= limit_infinite_loop )
THEN
925 CALL
errorstop(global,err_infinite_loop,__line__)
933 nvars = ispeceevxvel + ispeceevyvel + ispeceevzvel + ispeceevtemp
935 IF ( nvars /= nvarsexpected )
THEN
936 CALL
errorstop(global,err_invalid_nvars,__line__)
943 CLOSE(ifile,iostat=errorflag)
944 global%error = errorflag
945 IF ( global%error /= err_none )
THEN
946 CALL
errorstop(global,err_file_close,__line__,ifilename)
953 IF ( global%myProcid == masterproc .AND. &
954 global%verbLevel > verbose_none )
THEN
955 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading ASCII species eev file done.'
997 CHARACTER(CHRLEN) :: errorstring,ifilename,sectionstring,timestring1, &
999 INTEGER :: errorflag,ifile,ispeceevtemp,ispeceevxvel,ispeceevyvel, &
1000 ispeceevzvel,ivars,
j,loopcounter,ncellstot,ncellsexpected, &
1001 nvars,nvarsexpected,precactual,precexpected,rangeactual, &
1003 REAL(RFREAL) :: currenttime
1004 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: peev
1005 TYPE(t_grid),
POINTER :: pgrid
1012 TYPE(t_region
),
POINTER :: pregion
1018 global => pregion%global
1021 'SPEC_RFLU_ModReadWriteVars.F90')
1023 IF ( global%myProcid == masterproc .AND. &
1024 global%verbLevel > verbose_none )
THEN
1025 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading binary species eev file...'
1028 IF ( global%flowType == flow_unsteady )
THEN
1030 pregion%iRegionGlobal,global%currentTime, &
1034 pregion%iRegionGlobal,global%currentIter,ifilename)
1038 OPEN(ifile,file=ifilename,
form=
"UNFORMATTED",
status=
"OLD",iostat=errorflag)
1039 global%error = errorflag
1040 IF ( global%error /= err_none )
THEN
1041 CALL
errorstop(global,err_file_open,__line__,ifilename)
1048 IF ( global%myProcid == masterproc .AND. &
1049 global%verbLevel > verbose_low )
THEN
1050 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
1053 READ(ifile) sectionstring
1054 IF ( trim(sectionstring) /=
'# ROCFLU species eev file' )
THEN
1055 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1062 READ(ifile) sectionstring
1063 IF ( trim(sectionstring) /=
'# Precision and range' )
THEN
1064 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1068 rangeexpected = range(1.0_rfreal)
1070 READ(ifile) precactual,rangeactual
1071 IF ( precactual < precexpected .OR. rangeactual < rangeexpected )
THEN
1072 CALL
errorstop(global,err_prec_range,__line__)
1079 READ(ifile) sectionstring
1080 IF ( trim(sectionstring) /=
'# Physical time' )
THEN
1081 CALL
errorstop(global,err_invalid_marker,__line__,ifilename)
1084 READ(ifile) currenttime
1086 IF ( global%flowType == flow_unsteady )
THEN
1087 IF ( global%currentTime < 0.0_rfreal )
THEN
1088 global%currentTime = currenttime
1090 WRITE(timestring1,
'(1PE11.5)') global%currentTime
1091 WRITE(timestring2,
'(1PE11.5)') currenttime
1092 IF ( trim(timestring1) /= trim(timestring2) )
THEN
1093 CALL
errorstop(global,err_time_solution,__line__,trim(ifilename))
1102 pgrid => pregion%grid
1104 nvarsexpected = pregion%specInput%nSpeciesEE*eev_spec_nvar
1105 ncellsexpected = pgrid%nCellsTot
1107 READ(ifile) sectionstring
1108 IF ( trim(sectionstring) /=
'# Dimensions' )
THEN
1109 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1112 READ(ifile) ncellstot,nvars
1113 IF ( ncellstot /= ncellsexpected )
THEN
1114 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',ncellstot, &
1115 'but expected:',ncellsexpected
1116 CALL
errorstop(global,err_invalid_ncells,__line__,errorstring)
1119 IF ( nvars /= nvarsexpected )
THEN
1120 WRITE(errorstring,
'(A,1X,I6,1X,A,1X,I6)')
'Specified:',nvars, &
1121 'but expected:',nvarsexpected
1122 CALL
errorstop(global,err_invalid_nvars,__line__)
1136 loopcounter = loopcounter + 1
1138 READ(ifile) sectionstring
1140 SELECT CASE ( trim(sectionstring) )
1146 CASE (
'# x-velocity' )
1147 IF ( global%myProcid == masterproc .AND. &
1148 global%verbLevel > verbose_low )
THEN
1149 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species x-velocity...'
1152 peev => pregion%spec%eev
1154 ispeceevxvel = ispeceevxvel + 1
1155 READ(ifile) (peev(eev_spec_xvel,ispeceevxvel,
j),
j=1,pgrid%nCellsTot)
1161 CASE (
'# y-velocity' )
1162 IF ( global%myProcid == masterproc .AND. &
1163 global%verbLevel > verbose_low )
THEN
1164 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species y-velocity...'
1167 peev => pregion%spec%eev
1169 ispeceevyvel = ispeceevyvel + 1
1170 READ(ifile) (peev(eev_spec_yvel,ispeceevyvel,
j),
j=1,pgrid%nCellsTot)
1176 CASE (
'# z-velocity' )
1177 IF ( global%myProcid == masterproc .AND. &
1178 global%verbLevel > verbose_low )
THEN
1179 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species z-velocity...'
1182 peev => pregion%spec%eev
1184 ispeceevzvel = ispeceevzvel + 1
1185 READ(ifile) (peev(eev_spec_zvel,ispeceevzvel,
j),
j=1,pgrid%nCellsTot)
1191 CASE (
'# Temperature' )
1192 IF ( global%myProcid == masterproc .AND. &
1193 global%verbLevel > verbose_low )
THEN
1194 WRITE(stdout,
'(A,3X,A)') solver_name,
'Species temperature...'
1197 peev => pregion%spec%eev
1199 ispeceevtemp = ispeceevtemp + 1
1200 READ(ifile) (peev(eev_spec_temp,ispeceevtemp,
j),
j=1,pgrid%nCellsTot)
1207 IF ( global%myProcid == masterproc .AND. &
1208 global%verbLevel > verbose_low )
THEN
1209 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1219 IF ( global%verbLevel > verbose_low )
THEN
1220 WRITE(stdout,
'(A,3X,A)') solver_name,sectionstring
1223 CALL
errorstop(global,err_invalid_marker,__line__,sectionstring)
1231 IF ( loopcounter >= limit_infinite_loop )
THEN
1232 CALL
errorstop(global,err_infinite_loop,__line__)
1240 nvars = ispeceevxvel + ispeceevyvel + ispeceevzvel + ispeceevtemp
1242 IF ( nvars /= nvarsexpected )
THEN
1243 CALL
errorstop(global,err_invalid_nvars,__line__)
1250 CLOSE(ifile,iostat=errorflag)
1251 global%error = errorflag
1252 IF ( global%error /= err_none )
THEN
1253 CALL
errorstop(global,err_file_close,__line__,ifilename)
1260 IF ( global%myProcid == masterproc .AND. &
1261 global%verbLevel > verbose_none )
THEN
1262 WRITE(stdout,
'(A,1X,A)') solver_name,
'Reading binary species eev file done.'
1305 CHARACTER(CHRLEN) :: ifilename,sectionstring
1306 INTEGER :: errorflag,ifile,ivar,
j,nvars
1307 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv
1308 TYPE(t_grid),
POINTER :: pgrid
1315 TYPE(t_region
),
POINTER :: pregion
1321 global => pregion%global
1324 'SPEC_RFLU_ModReadWriteVars.F90')
1326 IF ( global%myProcid == masterproc .AND. &
1327 global%verbLevel > verbose_none )
THEN
1328 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII species cv file...'
1331 IF ( global%flowType == flow_unsteady )
THEN
1333 pregion%iRegionGlobal,global%currentTime, &
1337 pregion%iRegionGlobal,global%currentIter, &
1342 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN", &
1344 global%error = errorflag
1345 IF ( global%error /= err_none )
THEN
1346 CALL
errorstop(global,err_file_open,__line__,ifilename)
1353 IF ( global%myProcid == masterproc .AND. &
1354 global%verbLevel > verbose_low )
THEN
1355 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
1358 sectionstring =
'# ROCFLU species file'
1359 WRITE(ifile,
'(A)') sectionstring
1361 sectionstring =
'# Precision and range'
1362 WRITE(ifile,
'(A)') sectionstring
1363 WRITE(ifile,
'(2(I8))')
precision(1.0_rfreal),range(1.0_rfreal)
1365 sectionstring =
'# Physical time'
1366 WRITE(ifile,
'(A)') sectionstring
1367 WRITE(ifile,
'(E23.16)') global%currentTime
1373 nvars = pregion%specInput%nSpecies
1375 pgrid => pregion%grid
1377 sectionstring =
'# Dimensions'
1378 WRITE(ifile,
'(A)') sectionstring
1379 WRITE(ifile,
'(2(I8))') pgrid%nCellsTot,nvars
1385 pcv => pregion%spec%cv
1388 sectionstring =
'# Density'
1389 WRITE(ifile,
'(A)') sectionstring
1390 WRITE(ifile,
'(5(E23.16))') (pcv(ivar,
j),
j=1,pgrid%nCellsTot)
1397 IF ( global%myProcid == masterproc .AND. &
1398 global%verbLevel > verbose_low )
THEN
1399 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1402 sectionstring =
'# End'
1403 WRITE(ifile,
'(A)') sectionstring
1409 CLOSE(ifile,iostat=errorflag)
1410 global%error = errorflag
1411 IF ( global%error /= err_none )
THEN
1412 CALL
errorstop(global,err_file_close,__line__,ifilename)
1419 IF ( global%myProcid == masterproc .AND. &
1420 global%verbLevel > verbose_none )
THEN
1421 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII species cv file done.'
1463 CHARACTER(CHRLEN) :: ifilename,sectionstring
1464 INTEGER :: errorflag,ifile,ivar,
j,nvars
1465 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv
1466 TYPE(t_grid),
POINTER :: pgrid
1473 TYPE(t_region
),
POINTER :: pregion
1479 global => pregion%global
1482 'SPEC_RFLU_ModReadWriteVars.F90')
1484 IF ( global%myProcid == masterproc .AND. &
1485 global%verbLevel > verbose_none )
THEN
1486 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing binary species cv file...'
1489 IF ( global%flowType == flow_unsteady )
THEN
1491 pregion%iRegionGlobal,global%currentTime, &
1495 pregion%iRegionGlobal,global%currentIter, &
1500 OPEN(ifile,file=ifilename,
form=
"UNFORMATTED",
status=
"UNKNOWN", &
1502 global%error = errorflag
1503 IF ( global%error /= err_none )
THEN
1504 CALL
errorstop(global,err_file_open,__line__,ifilename)
1511 IF ( global%myProcid == masterproc .AND. &
1512 global%verbLevel > verbose_low )
THEN
1513 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
1516 sectionstring =
'# ROCFLU species file'
1517 WRITE(ifile) sectionstring
1519 sectionstring =
'# Precision and range'
1520 WRITE(ifile) sectionstring
1521 WRITE(ifile)
precision(1.0_rfreal),range(1.0_rfreal)
1523 sectionstring =
'# Physical time'
1524 WRITE(ifile) sectionstring
1525 WRITE(ifile) global%currentTime
1531 nvars = pregion%specInput%nSpecies
1533 pgrid => pregion%grid
1535 sectionstring =
'# Dimensions'
1536 WRITE(ifile) sectionstring
1537 WRITE(ifile) pgrid%nCellsTot,nvars
1543 pcv => pregion%spec%cv
1546 sectionstring =
'# Density'
1547 WRITE(ifile) sectionstring
1548 WRITE(ifile) (pcv(ivar,
j),
j=1,pgrid%nCellsTot)
1555 IF ( global%myProcid == masterproc .AND. &
1556 global%verbLevel > verbose_low )
THEN
1557 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1560 sectionstring =
'# End'
1561 WRITE(ifile) sectionstring
1567 CLOSE(ifile,iostat=errorflag)
1568 global%error = errorflag
1569 IF ( global%error /= err_none )
THEN
1570 CALL
errorstop(global,err_file_close,__line__,ifilename)
1577 IF ( global%myProcid == masterproc .AND. &
1578 global%verbLevel > verbose_none )
THEN
1579 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing binary species cv file done.'
1620 CHARACTER(CHRLEN) :: ifilename,sectionstring
1621 INTEGER :: errorflag,ifile,ispecee,
j,nvars
1622 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: peev
1623 TYPE(t_grid),
POINTER :: pgrid
1630 TYPE(t_region
),
POINTER :: pregion
1636 global => pregion%global
1639 'SPEC_RFLU_ModReadWriteVars.F90')
1641 IF ( global%myProcid == masterproc .AND. &
1642 global%verbLevel > verbose_none )
THEN
1643 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII species eev file...'
1646 IF ( global%flowType == flow_unsteady )
THEN
1648 pregion%iRegionGlobal,global%currentTime, &
1652 pregion%iRegionGlobal,global%currentIter,ifilename)
1656 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN",iostat=errorflag)
1657 global%error = errorflag
1658 IF ( global%error /= err_none )
THEN
1659 CALL
errorstop(global,err_file_open,__line__,ifilename)
1666 IF ( global%myProcid == masterproc .AND. &
1667 global%verbLevel > verbose_low )
THEN
1668 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
1671 sectionstring =
'# ROCFLU species eev file'
1672 WRITE(ifile,
'(A)') sectionstring
1674 sectionstring =
'# Precision and range'
1675 WRITE(ifile,
'(A)') sectionstring
1676 WRITE(ifile,
'(2(I8))')
precision(1.0_rfreal),range(1.0_rfreal)
1678 sectionstring =
'# Physical time'
1679 WRITE(ifile,
'(A)') sectionstring
1680 WRITE(ifile,
'(E23.16)') global%currentTime
1686 nvars = pregion%specInput%nSpeciesEE*eev_spec_nvar
1688 pgrid => pregion%grid
1690 sectionstring =
'# Dimensions'
1691 WRITE(ifile,
'(A)') sectionstring
1692 WRITE(ifile,
'(2(I8))') pgrid%nCellsTot,nvars
1698 peev => pregion%spec%eev
1700 DO ispecee = 1,pregion%specInput%nSpeciesEE
1701 sectionstring =
'# x-velocity'
1702 WRITE(ifile,
'(A)') sectionstring
1703 WRITE(ifile,
'(5(E23.16))') (peev(eev_spec_xvel,ispecee,
j), &
1704 j=1,pgrid%nCellsTot)
1706 sectionstring =
'# y-velocity'
1707 WRITE(ifile,
'(A)') sectionstring
1708 WRITE(ifile,
'(5(E23.16))') (peev(eev_spec_yvel,ispecee,
j), &
1709 j=1,pgrid%nCellsTot)
1711 sectionstring =
'# z-velocity'
1712 WRITE(ifile,
'(A)') sectionstring
1713 WRITE(ifile,
'(5(E23.16))') (peev(eev_spec_zvel,ispecee,
j), &
1714 j=1,pgrid%nCellsTot)
1716 sectionstring =
'# Temperature'
1717 WRITE(ifile,
'(A)') sectionstring
1718 WRITE(ifile,
'(5(E23.16))') (peev(eev_spec_temp,ispecee,
j), &
1719 j=1,pgrid%nCellsTot)
1726 IF ( global%myProcid == masterproc .AND. &
1727 global%verbLevel > verbose_low )
THEN
1728 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1731 sectionstring =
'# End'
1732 WRITE(ifile,
'(A)') sectionstring
1738 CLOSE(ifile,iostat=errorflag)
1739 global%error = errorflag
1740 IF ( global%error /= err_none )
THEN
1741 CALL
errorstop(global,err_file_close,__line__,ifilename)
1748 IF ( global%myProcid == masterproc .AND. &
1749 global%verbLevel > verbose_none )
THEN
1750 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII species eev file done.'
1790 CHARACTER(CHRLEN) :: ifilename,sectionstring
1791 INTEGER :: errorflag,ifile,ispecee,
j,nvars
1792 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: peev
1793 TYPE(t_grid),
POINTER :: pgrid
1800 TYPE(t_region
),
POINTER :: pregion
1806 global => pregion%global
1809 'SPEC_RFLU_ModReadWriteVars.F90')
1811 IF ( global%myProcid == masterproc .AND. &
1812 global%verbLevel > verbose_none )
THEN
1813 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing binary species eev file...'
1816 IF ( global%flowType == flow_unsteady )
THEN
1818 pregion%iRegionGlobal,global%currentTime, &
1822 pregion%iRegionGlobal,global%currentIter,ifilename)
1826 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN",iostat=errorflag)
1827 global%error = errorflag
1828 IF ( global%error /= err_none )
THEN
1829 CALL
errorstop(global,err_file_open,__line__,ifilename)
1836 IF ( global%myProcid == masterproc .AND. &
1837 global%verbLevel > verbose_low )
THEN
1838 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
1841 sectionstring =
'# ROCFLU species eev file'
1842 WRITE(ifile) sectionstring
1844 sectionstring =
'# Precision and range'
1845 WRITE(ifile) sectionstring
1846 WRITE(ifile)
precision(1.0_rfreal),range(1.0_rfreal)
1848 sectionstring =
'# Physical time'
1849 WRITE(ifile) sectionstring
1850 WRITE(ifile) global%currentTime
1856 nvars = pregion%specInput%nSpeciesEE*eev_spec_nvar
1858 pgrid => pregion%grid
1860 sectionstring =
'# Dimensions'
1861 WRITE(ifile) sectionstring
1862 WRITE(ifile) pgrid%nCellsTot,nvars
1868 peev => pregion%spec%eev
1870 DO ispecee = 1,pregion%specInput%nSpeciesEE
1871 sectionstring =
'# x-velocity'
1872 WRITE(ifile) sectionstring
1873 WRITE(ifile) (peev(eev_spec_xvel,ispecee,
j),
j=1,pgrid%nCellsTot)
1875 sectionstring =
'# y-velocity'
1876 WRITE(ifile) sectionstring
1877 WRITE(ifile) (peev(eev_spec_yvel,ispecee,
j),
j=1,pgrid%nCellsTot)
1879 sectionstring =
'# z-velocity'
1880 WRITE(ifile) sectionstring
1881 WRITE(ifile) (peev(eev_spec_zvel,ispecee,
j),
j=1,pgrid%nCellsTot)
1883 sectionstring =
'# Temperature'
1884 WRITE(ifile) sectionstring
1885 WRITE(ifile) (peev(eev_spec_temp,ispecee,
j),
j=1,pgrid%nCellsTot)
1892 IF ( global%myProcid == masterproc .AND. &
1893 global%verbLevel > verbose_low )
THEN
1894 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
1897 sectionstring =
'# End'
1898 WRITE(ifile) sectionstring
1904 CLOSE(ifile,iostat=errorflag)
1905 global%error = errorflag
1906 IF ( global%error /= err_none )
THEN
1907 CALL
errorstop(global,err_file_close,__line__,ifilename)
1914 IF ( global%myProcid == masterproc .AND. &
1915 global%verbLevel > verbose_none )
THEN
1916 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII species eev file done.'
subroutine, public spec_rflu_readcvbinary(pRegion)
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine, public spec_rflu_writeeevbinary(pRegion)
subroutine, public spec_rflu_readeevbinary(pRegion)
subroutine, public spec_rflu_writecvbinary(pRegion)
**********************************************************************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
subroutine, public spec_rflu_readcvascii(pRegion)
subroutine, public spec_rflu_writeeevascii(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public spec_rflu_writecvascii(pRegion)
subroutine, public spec_rflu_readeevascii(pRegion)
subroutine deregisterfunction(global)
subroutine buildfilenamesteady(global, dest, ext, id, it, fileName)
subroutine buildfilenameunsteady(global, dest, ext, id, tm, fileName)