59 CHARACTER(CHRLEN) :: RCSIdentString = &
60 '$RCSfile: RFLU_ModReadBcInputFile.F90,v $ $Revision: 1.27 $'
102 TYPE(t_region
),
POINTER :: pregion
108 INTEGER,
PARAMETER :: nvals_max = 13
110 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
111 CHARACTER(10) :: keys(nvals_max)
112 CHARACTER(256) :: ifilename
113 CHARACTER(CHRLEN) :: bcname
114 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,ipatchbeg, &
115 ipatchend,nbfacestot,
nvals
116 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
118 TYPE(t_patch),
POINTER :: ppatch
125 global => pregion%global
128 'RFLU_ModReadBcInputFile.F90')
148 keys(13) =
'THRUSTFLAG'
151 distrib,ifilename,bcname,defined )
157 IF ( ipatchend > global%nPatches )
THEN
158 CALL
errorstop(global,err_patch_range,__line__)
165 DO ipatch = 1,pregion%grid%nPatches
166 ppatch => pregion%patches(ipatch)
172 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
173 ppatch%iPatchGlobal <= ipatchend )
THEN
174 ppatch%bcType = bc_farfield
175 ppatch%bcName = bcname
180 ppatch%cReconst = constr_none
181 ppatch%plotStatsFlag = .false.
184 ppatch%movePatch = .false.
185 ppatch%smoothGrid = .false.
192 IF ( defined(12) .EQV. .true. )
THEN
193 IF ( (nint(vals(12)) >= bc_kind_min) .AND. &
194 (nint(vals(12)) <= bc_kind_max) )
THEN
195 ppatch%bcKind = nint(vals(12))
198 ppatch%bcKind = bc_kind_simple
201 ppatch%bcKind = bc_kind_simple
208 IF ( defined(13) .EQV. .true. )
THEN
209 IF ( (vals(13) > 0.5_rfreal) .AND. &
210 (vals(13) < 1.5_rfreal) )
THEN
211 ppatch%thrustFlag = .true.
213 ppatch%thrustFlag = .false.
216 ppatch%thrustFlag = .false.
223 ppatch%mixt%nSwitches = 1
225 ALLOCATE(ppatch%mixt%switches(ppatch%mixt%nSwitches), &
227 global%error = errorflag
228 IF ( global%error /= err_none )
THEN
229 CALL
errorstop(global,err_allocate,__line__)
236 IF ( defined(1) .EQV. .true. )
THEN
237 IF ( (nint(vals(1)) == bcopt_corr_yes) .OR. &
238 (nint(vals(1)) == bcopt_corr_no ) )
THEN
239 ppatch%mixt%switches(bcswi_farf_corr) = nint(vals(1))
241 CALL
errorstop(global,err_val_bcswitch,__line__,
'(farfield type).')
244 CALL
errorstop(global,err_no_bcswitch,__line__,
'(farfield type).')
251 ppatch%mixt%nData = 5
252 ppatch%mixt%distrib = distrib
254 IF ( ppatch%mixt%distrib == bcdat_constant )
THEN
257 DO i = 0,ppatch%mixt%nData-1
258 IF ( defined(2+
i) .EQV. .true. )
THEN
259 checksum = checksum + 1
263 IF ( checksum /= ppatch%mixt%nData )
THEN
264 CALL
errorstop(global,err_bcval_missing,__line__)
272 IF ( defined(9) .EQV. .true. )
THEN
273 IF ( nint(vals(9)) == 2 )
THEN
274 ppatch%spaceOrder = 2
276 ppatch%spaceOrder = 1
279 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
286 IF ( defined(10) .EQV. .true. )
THEN
287 ppatch%movePatchDir = vals(10)
289 ppatch%movePatchDir = movepatch_dir_none
296 IF ( defined(11) .EQV. .true. )
THEN
297 ppatch%bcCoupled = vals(11)
299 ppatch%bcCoupled = bc_not_coupled
309 DO ipatch = 1,pregion%grid%nPatches
310 ppatch => pregion%patches(ipatch)
316 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
317 ppatch%iPatchGlobal <= ipatchend )
THEN
324 IF ( ppatch%mixt%distrib == bcdat_distrib )
THEN
325 nbfacestot = ppatch%nBTrisTot + ppatch%nBQuadsTot
327 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,nbfacestot), &
329 global%error = errorflag
330 IF ( global%error /= err_none )
THEN
331 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
334 DO ifl = 1,nbfacestot
335 DO idata = 1,ppatch%mixt%nData
336 ppatch%mixt%vals(idata,ifl) =
REAL(crazy_value_int,kind=rfreal)
345 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,0:1), &
347 global%error = errorflag
348 IF ( global%error /= err_none )
THEN
349 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
352 ppatch%mixt%vals(bcdat_farf_mach ,0:1) = vals(2)
353 ppatch%mixt%vals(bcdat_farf_attack,0:1) = vals(3)*global%deg2rad
354 ppatch%mixt%vals(bcdat_farf_slip ,0:1) = vals(4)*global%deg2rad
355 ppatch%mixt%vals(bcdat_farf_press ,0:1) = vals(5)
356 ppatch%mixt%vals(bcdat_farf_temp ,0:1) = vals(6)
406 TYPE(t_region
),
POINTER :: pregion
412 INTEGER,
PARAMETER :: nvals_max = 15
414 LOGICAL :: ifileexists
415 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
416 CHARACTER(10) :: keys(nvals_max)
417 CHARACTER(256) :: ifilename
418 CHARACTER(CHRLEN) :: bcname
419 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,ireg,
nvals, &
420 ipatchbeg,ipatchend,nbfacestot,switch
421 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
423 TYPE(t_patch),
POINTER :: ppatch
430 global => pregion%global
433 'RFLU_ModReadBcInputFile.F90')
454 keys(14) =
'THRUSTFLAG'
458 distrib,ifilename,bcname,defined)
464 IF ( ipatchend > global%nPatches )
THEN
465 CALL
errorstop(global,err_patch_range,__line__)
472 DO ipatch = 1,pregion%grid%nPatches
473 ppatch => pregion%patches(ipatch)
479 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
480 ppatch%iPatchGlobal <= ipatchend )
THEN
481 ppatch%bcType = bc_inflow_totang
482 ppatch%bcName = bcname
487 ppatch%cReconst = constr_none
488 ppatch%plotStatsFlag = .false.
491 ppatch%movePatch = .false.
492 ppatch%smoothGrid = .false.
495 ppatch%mixt%distrib = distrib
501 ppatch%mixt%nSwitches = 2
503 ALLOCATE(ppatch%mixt%switches(ppatch%mixt%nSwitches), &
505 global%error = errorflag
506 IF ( global%error /= err_none )
THEN
507 CALL
errorstop(global,err_allocate,__line__)
514 IF ( defined(1) .EQV. .true. )
THEN
515 IF ( (nint(vals(1)) >= bcopt_supersonic) .AND. &
516 (nint(vals(1)) <= bcopt_mixed ) )
THEN
517 ppatch%mixt%switches(bcswi_inflow_type) = nint(vals(1))
519 CALL
errorstop(global,err_val_bcswitch,__line__,
'(inflow type).')
522 CALL
errorstop(global,err_no_bcswitch,__line__,
'(inflow type).')
525 IF ( defined(2) .EQV. .true. )
THEN
526 IF ( (nint(vals(2)) >= bcopt_fixed_no ) .AND. &
527 (nint(vals(2)) <= bcopt_fixed_yes) )
THEN
528 ppatch%mixt%switches(bcswi_inflow_fixed) = nint(vals(2))
530 CALL
errorstop(global,err_val_bcswitch,__line__,
'(fixed).')
533 ppatch%mixt%switches(bcswi_inflow_fixed) = bcopt_fixed_no
540 IF ( defined(12) .EQV. .true. )
THEN
541 IF ( (nint(vals(12)) >= bc_kind_min) .AND. &
542 (nint(vals(12)) <= bc_kind_max) )
THEN
543 ppatch%bcKind = nint(vals(12))
546 ppatch%bcKind = bc_kind_simple
549 ppatch%bcKind = bc_kind_simple
556 IF ( defined(13) .EQV. .true. )
THEN
557 IF ( nint(vals(13)) == bc_reflecting )
THEN
558 ppatch%reflect = bc_reflecting
560 ppatch%reflect = bc_nonreflecting
563 ppatch%reflect = bc_reflecting
570 IF ( defined(14) .EQV. .true. )
THEN
571 IF ( (vals(14) > 0.5_rfreal) .AND. &
572 (vals(14) < 1.5_rfreal) )
THEN
573 ppatch%thrustFlag = .true.
575 ppatch%thrustFlag = .false.
578 ppatch%thrustFlag = .false.
585 IF ( defined(15) .EQV. .true. )
THEN
586 IF ( nint(vals(15)) == 2 )
THEN
587 ppatch%spaceOrder = 2
589 ppatch%spaceOrder = 1
592 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
600 IF ( ppatch%mixt%switches(bcswi_inflow_type) /= bcopt_subsonic )
THEN
601 ppatch%mixt%nData = 5
603 ppatch%mixt%nData = 4
606 IF ( ppatch%mixt%distrib == bcdat_constant )
THEN
609 DO i = 0,ppatch%mixt%nData-1
610 IF ( defined(3+
i) .EQV. .true. )
THEN
611 checksum = checksum + 1
615 IF ( checksum /= ppatch%mixt%nData )
THEN
616 CALL
errorstop(global,err_bcval_missing,__line__)
624 IF ( defined(10) .EQV. .true. )
THEN
625 ppatch%movePatchDir = vals(10)
627 ppatch%movePatchDir = movepatch_dir_none
634 IF ( defined(11) .EQV. .true. )
THEN
635 ppatch%bcCoupled = vals(11)
637 ppatch%bcCoupled = bc_not_coupled
647 DO ipatch = 1,pregion%grid%nPatches
648 ppatch => pregion%patches(ipatch)
654 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
655 ppatch%iPatchGlobal <= ipatchend )
THEN
656 switch = ppatch%mixt%switches(bcswi_inflow_type)
663 IF ( ppatch%mixt%distrib == bcdat_distrib )
THEN
664 nbfacestot = ppatch%nBTrisTot + ppatch%nBQuadsTot
666 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,nbfacestot), &
668 global%error = errorflag
669 IF ( global%error /= err_none )
THEN
670 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
673 DO ifl = 1,nbfacestot
674 DO idata = 1,ppatch%mixt%nData
675 ppatch%mixt%vals(idata,ifl) =
REAL(crazy_value_int,kind=rfreal)
684 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,0:1),stat=errorflag)
685 global%error = errorflag
686 IF ( global%error /= err_none )
THEN
687 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
690 ppatch%mixt%vals(bcdat_inflow_ptot, 0:1) = vals(3)
691 ppatch%mixt%vals(bcdat_inflow_ttot, 0:1) = vals(4)
692 ppatch%mixt%vals(bcdat_inflow_betah,0:1) = vals(5)*global%deg2rad
693 ppatch%mixt%vals(bcdat_inflow_betav,0:1) = vals(6)*global%deg2rad
695 IF ( switch /= bcopt_subsonic )
THEN
696 ppatch%mixt%vals(bcdat_inflow_mach,0:1) = vals(7)
749 TYPE(t_region
),
POINTER :: pregion
755 INTEGER,
PARAMETER :: nvals_max = 14
757 LOGICAL :: ifileexists
758 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
759 CHARACTER(10) :: keys(nvals_max)
760 CHARACTER(256) :: ifilename
761 CHARACTER(CHRLEN) :: bcname
762 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,ireg,nbfacestot, &
763 nvals,ipatchbeg,ipatchend,switch
764 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
766 TYPE(t_patch),
POINTER :: ppatch
773 global => pregion%global
776 'RFLU_ModReadBcInputFile.F90')
796 keys(13) =
'THRUSTFLAG'
800 distrib,ifilename,bcname,defined)
806 IF ( ipatchend > global%nPatches )
THEN
807 CALL
errorstop(global,err_patch_range,__line__)
814 DO ipatch = 1,pregion%grid%nPatches
815 ppatch => pregion%patches(ipatch)
821 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
822 ppatch%iPatchGlobal <= ipatchend )
THEN
823 ppatch%bcType = bc_inflow_veltemp
824 ppatch%bcName = bcname
829 ppatch%cReconst = constr_none
830 ppatch%plotStatsFlag = .false.
833 ppatch%movePatch = .false.
834 ppatch%smoothGrid = .false.
837 ppatch%mixt%distrib = distrib
843 ppatch%mixt%nSwitches = 1
845 ALLOCATE(ppatch%mixt%switches(ppatch%mixt%nSwitches), &
847 global%error = errorflag
848 IF ( global%error /= err_none )
THEN
849 CALL
errorstop(global,err_allocate,__line__)
856 IF ( defined(1) .EQV. .true. )
THEN
857 IF ( (nint(vals(1)) >= bcopt_supersonic) .AND. &
858 (nint(vals(1)) <= bcopt_mixed ) )
THEN
859 ppatch%mixt%switches(bcswi_inflow_type) = nint(vals(1))
861 CALL
errorstop(global,err_val_bcswitch,__line__,
'(inflow type).')
864 CALL
errorstop(global,err_no_bcswitch,__line__,
'(inflow type).')
871 IF ( defined(11) .EQV. .true. )
THEN
872 IF ( (nint(vals(11)) >= bc_kind_min) .AND. &
873 (nint(vals(11)) <= bc_kind_max) )
THEN
874 ppatch%bcKind = nint(vals(11))
877 ppatch%bcKind = bc_kind_simple
880 ppatch%bcKind = bc_kind_simple
887 IF ( defined(12) .EQV. .true. )
THEN
888 IF ( nint(vals(12)) == bc_reflecting )
THEN
889 ppatch%reflect = bc_reflecting
891 ppatch%reflect = bc_nonreflecting
894 ppatch%reflect = bc_reflecting
901 IF ( defined(13) .EQV. .true. )
THEN
902 IF ( (vals(13) > 0.5_rfreal) .AND. &
903 (vals(13) < 1.5_rfreal) )
THEN
904 ppatch%thrustFlag = .true.
906 ppatch%thrustFlag = .false.
909 ppatch%thrustFlag = .false.
916 IF ( defined(14) .EQV. .true. )
THEN
917 IF ( nint(vals(14)) == 2 )
THEN
918 ppatch%spaceOrder = 2
920 ppatch%spaceOrder = 1
923 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
931 IF ( ppatch%mixt%switches(bcswi_inflow_type) /= bcopt_subsonic )
THEN
932 ppatch%mixt%nData = 5
934 ppatch%mixt%nData = 4
937 IF ( ppatch%mixt%distrib == bcdat_constant )
THEN
940 DO i = 0,ppatch%mixt%nData-1
941 IF ( defined(2+
i) .EQV. .true. )
THEN
942 checksum = checksum + 1
946 IF ( checksum /= ppatch%mixt%nData )
THEN
947 CALL
errorstop(global,err_bcval_missing,__line__)
955 IF ( defined(9) .EQV. .true. )
THEN
956 ppatch%movePatchDir = vals(9)
958 ppatch%movePatchDir = movepatch_dir_none
965 IF ( defined(10) .EQV. .true. )
THEN
966 ppatch%bcCoupled = vals(10)
968 ppatch%bcCoupled = bc_not_coupled
978 DO ipatch = 1,pregion%grid%nPatches
979 ppatch => pregion%patches(ipatch)
985 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
986 ppatch%iPatchGlobal <= ipatchend )
THEN
987 switch = ppatch%mixt%switches(bcswi_inflow_type)
994 IF ( ppatch%mixt%distrib == bcdat_distrib )
THEN
995 nbfacestot = ppatch%nBTrisTot + ppatch%nBQuadsTot
997 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,nbfacestot), &
999 global%error = errorflag
1000 IF ( global%error /= err_none )
THEN
1001 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
1004 DO ifl = 1,nbfacestot
1005 DO idata = 1,ppatch%mixt%nData
1006 ppatch%mixt%vals(idata,ifl) =
REAL(crazy_value_int,kind=rfreal)
1015 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,0:1),stat=errorflag)
1016 global%error = errorflag
1017 IF ( global%error /= err_none )
THEN
1018 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
1021 ppatch%mixt%vals(bcdat_inflow_u,0:1) = vals(2)
1022 ppatch%mixt%vals(bcdat_inflow_v,0:1) = vals(3)
1023 ppatch%mixt%vals(bcdat_inflow_w,0:1) = vals(4)
1024 ppatch%mixt%vals(bcdat_inflow_t,0:1) = vals(5)
1026 IF ( switch /= bcopt_subsonic )
THEN
1027 ppatch%mixt%vals(bcdat_inflow_p,0:1) = vals(6)
1080 TYPE(t_region
),
POINTER :: pregion
1086 INTEGER,
PARAMETER :: nvals_max = 12
1088 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
1089 CHARACTER(10) :: keys(nvals_max)
1090 CHARACTER(256) :: fname
1091 CHARACTER(CHRLEN) :: bcname
1092 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,ipatchbeg, &
1093 ipatchend,ireg,nbfacestot,
nvals
1094 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
1096 TYPE(t_patch),
POINTER :: ppatch
1103 global => pregion%global
1106 'RFLU_ModReadBcInputFile.F90')
1122 keys(9) =
'CRECONST'
1124 keys(11)=
'THRUSTFLAG'
1128 distrib,fname,bcname,defined )
1134 IF ( ipatchend > global%nPatches )
THEN
1135 CALL
errorstop(global,err_patch_range,__line__)
1142 DO ipatch = 1,pregion%grid%nPatches
1143 ppatch => pregion%patches(ipatch)
1149 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
1150 ppatch%iPatchGlobal <= ipatchend )
THEN
1151 ppatch%bcType = bc_injection
1152 ppatch%bcName = bcname
1155 ppatch%movePatch = .false.
1156 ppatch%smoothGrid = .false.
1159 ppatch%mixt%nData = 2
1160 ppatch%mixt%nSwitches = 0
1166 IF ( defined(10) .EQV. .true. )
THEN
1167 IF ( (nint(vals(10)) >= bc_kind_min) .AND. &
1168 (nint(vals(10)) <= bc_kind_max) )
THEN
1169 ppatch%bcKind = nint(vals(10))
1172 ppatch%bcKind = bc_kind_simple
1175 ppatch%bcKind = bc_kind_simple
1182 IF ( defined(11) .EQV. .true. )
THEN
1183 IF ( (vals(11) > 0.5_rfreal) .AND. &
1184 (vals(11) < 1.5_rfreal) )
THEN
1185 ppatch%thrustFlag = .true.
1187 ppatch%thrustFlag = .false.
1190 ppatch%thrustFlag = .false.
1197 IF ( defined(12) .EQV. .true. )
THEN
1198 IF ( nint(vals(12)) == 2 )
THEN
1199 ppatch%spaceOrder = 2
1201 ppatch%spaceOrder = 1
1204 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
1212 IF ( defined(3) .EQV. .true. )
THEN
1213 IF ( nint(vals(3)) == bc_burning )
THEN
1214 ppatch%bcCoupled = nint(vals(3))
1215 ppatch%mixt%distrib = bcdat_distrib
1216 ELSE IF ( nint(vals(3)) == bc_not_burning )
THEN
1217 global%warnCounter = global%warnCounter + 1
1219 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1220 'Invalid coupling input for patch ',ipatch, &
1221 '. Overriding coupling input.'
1223 ppatch%bcCoupled = bc_burning
1224 ppatch%mixt%distrib = bcdat_distrib
1225 ELSE IF ( nint(vals(3)) == bc_not_coupled )
THEN
1226 ppatch%bcCoupled = nint(vals(3))
1227 ppatch%mixt%distrib = distrib
1229 global%warnCounter = global%warnCounter + 1
1231 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1232 'Invalid coupling input for patch ',ipatch, &
1233 '. Overriding coupling input.'
1235 ppatch%bcCoupled = bc_not_coupled
1236 ppatch%mixt%distrib = distrib
1239 ppatch%bcCoupled = bc_not_coupled
1240 ppatch%mixt%distrib = distrib
1243 IF ( defined(3) .EQV. .true. )
THEN
1244 IF ( nint(vals(3)) /= bc_not_coupled )
THEN
1245 global%warnCounter = global%warnCounter + 1
1247 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1248 'Invalid coupling input for patch ',ipatch, &
1249 '. Overriding user input.'
1251 ppatch%bcCoupled = bc_not_coupled
1253 ppatch%bcCoupled = bc_not_coupled
1256 ppatch%mixt%distrib = distrib
1258 ppatch%bcCoupled = bc_not_coupled
1259 ppatch%mixt%distrib = bcdat_constant
1268 IF ( defined(4) .EQV. .true. )
THEN
1269 ppatch%bFlagInit = vals(4)
1271 IF ( ppatch%bFlagInit < 0 .OR. ppatch%bFlagInit > 1 )
THEN
1272 global%warnCounter = global%warnCounter + 1
1274 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1275 'Invalid burning flag input for patch ',ipatch, &
1276 '. Overriding burning flag input.'
1277 ppatch%bFlagInit = 1
1280 global%warnCounter = global%warnCounter + 1
1282 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1283 'Missing burning flag input for patch ',ipatch, &
1284 '. Setting burning flag input.'
1285 ppatch%bFlagInit = 1
1293 IF ( ppatch%mixt%distrib == bcdat_constant )
THEN
1296 DO i = 0,ppatch%mixt%nData-1
1297 IF ( defined(1+
i) .EQV. .true. )
THEN
1298 checksum = checksum + 1
1302 IF ( checksum /= ppatch%mixt%nData )
THEN
1303 CALL
errorstop(global,err_bcval_missing,__line__)
1311 IF ( defined(7) .EQV. .true. )
THEN
1312 ppatch%movePatchDir = vals(7)
1314 ppatch%movePatchDir = movepatch_dir_none
1321 IF ( defined(8) .EQV. .true. )
THEN
1322 IF ( nint(vals(8)) == 1 )
THEN
1323 ppatch%plotStatsFlag = .true.
1325 ppatch%plotStatsFlag = .false.
1328 ppatch%plotStatsFlag = .false.
1335 IF ( defined(9) .EQV. .true. )
THEN
1336 IF ( nint(vals(9)) == 1 )
THEN
1337 ppatch%cReconst = constr_weighted
1339 ppatch%cReconst = constr_none
1342 ppatch%cReconst = constr_none
1351 DO ipatch = 1,pregion%grid%nPatches
1352 ppatch => pregion%patches(ipatch)
1358 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
1359 ppatch%iPatchGlobal <= ipatchend )
THEN
1366 IF ( ppatch%mixt%distrib == bcdat_distrib )
THEN
1367 nbfacestot = ppatch%nBTrisTot + ppatch%nBQuadsTot
1369 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,nbfacestot), &
1371 global%error = errorflag
1372 IF ( global%error /= err_none )
THEN
1373 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
1378 IF ( ppatch%bcCoupled == bc_not_coupled )
THEN
1379 DO ifl = 1,nbfacestot
1380 DO idata = 1,ppatch%mixt%nData
1381 ppatch%mixt%vals(idata,ifl) = &
1382 REAL(crazy_value_int,kind=rfreal)
1389 DO ifl = 1,nbfacestot
1390 DO idata = 1,ppatch%mixt%nData
1391 ppatch%mixt%vals(idata,ifl) = 0.0_rfreal
1401 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,0:1), &
1403 global%error = errorflag
1404 IF ( global%error /= err_none )
THEN
1405 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
1408 ppatch%mixt%vals(bcdat_inject_mfrate,0:1) = vals(1)
1409 ppatch%mixt%vals(bcdat_inject_temp ,0:1) = vals(2)
1460 TYPE(t_region
),
POINTER :: pregion
1466 CHARACTER(CHRLEN) :: bccoupledstring,ifilename,movestring,smoothstring
1467 CHARACTER(256) ::
line
1468 INTEGER :: errorflag,ipatch,loopcounter
1469 TYPE(t_patch),
POINTER :: ppatch
1477 global => pregion%global
1480 'RFLU_ModReadBcInputFile.F90')
1482 IF ( global%myProcid == masterproc .AND. &
1483 global%verbLevel >= verbose_low )
THEN
1484 WRITE(stdout,
'(A,1X,A)') solver_name
1485 WRITE(stdout,
'(A,1X,A)') solver_name, &
1486 'Reading Rocflu boundary condition file...'
1495 OPEN(if_input,file=ifilename,
form=
'FORMATTED',
status=
'OLD',iostat=errorflag)
1496 global%error = errorflag
1497 IF ( global%error /= err_none )
THEN
1498 CALL
errorstop(global,err_file_open,__line__,
'File: '//trim(ifilename))
1508 READ(if_input,
'(A256)',iostat=errorflag)
line
1510 IF ( errorflag > 0 )
THEN
1511 CALL
errorstop(global,err_file_read,__line__,
'File: '//trim(ifilename))
1512 ELSE IF ( errorflag < 0 )
THEN
1516 SELECT CASE( trim(
line) )
1520 CASE (
'# BC_INFLOW')
1523 CASE (
'# BC_INFLOW_TOTANG')
1525 CASE (
'# BC_INFLOW_VELTEMP')
1527 CASE (
'# BC_INJECT')
1530 CASE (
'# BC_NOSLIP')
1533 CASE (
'# BC_NOSLIP_HFLUX')
1535 CASE (
'# BC_NOSLIP_TEMP')
1537 CASE (
'# BC_OUTFLOW')
1539 CASE (
'# BC_PERIODIC')
1543 CASE (
'# BC_SYMMETRY')
1545 CASE (
'# BC_VIRTUAL')
1551 loopcounter = loopcounter + 1
1553 IF ( loopcounter >= limit_infinite_loop )
THEN
1554 CALL
errorstop(global,err_infinite_loop ,__line__)
1562 CLOSE(if_input,iostat=errorflag)
1563 global%error = errorflag
1564 IF ( global%error /= err_none )
THEN
1565 CALL
errorstop(global,err_file_close,__line__,
'File: '//trim(ifilename))
1572 IF ( global%myProcid == masterproc .AND. &
1573 global%verbLevel >= verbose_med )
THEN
1574 WRITE(stdout,
'(A,3X,A)') solver_name,
'Boundary condition information:'
1575 WRITE(stdout,
'(A,5X,A,2X,A,2X,A,2X,A,12X,A,2X,A,3X,A,15X,A)') &
1576 solver_name,
'Local',
'Global',
'Type',
'Name',
'Order',
'Constr', &
1579 DO ipatch = 1,pregion%grid%nPatches
1580 ppatch => pregion%patches(ipatch)
1582 IF ( ppatch%bcCoupled == bc_not_coupled )
THEN
1583 bccoupledstring =
'Not coupled'
1584 ELSE IF ( ppatch%bcCoupled == bc_not_burning )
THEN
1585 bccoupledstring =
'Coupled, not burning'
1586 ELSE IF ( ppatch%bcCoupled == bc_burning )
THEN
1587 bccoupledstring =
'Coupled, burning'
1589 CALL
errorstop(global,err_reached_default,__line__)
1592 WRITE(stdout,
'(A,4X,I4,4X,I4,4X,I3,3X,A,2X,I2,6X,I2,5X,A,5X,I2)') &
1593 solver_name,ipatch,ppatch%iPatchGlobal,ppatch%bcType, &
1594 ppatch%bcName(1:15),ppatch%spaceOrder,ppatch%cReconst, &
1595 bccoupledstring(1:20),ppatch%movePatchDir
1603 IF ( global%myProcid == masterproc .AND. &
1604 global%verbLevel >= verbose_med )
THEN
1605 WRITE(stdout,
'(A,1X,A)') solver_name, &
1606 'Reading Rocflu boundary condition file done.'
1607 WRITE(stdout,
'(A,1X,A)') solver_name
1651 TYPE(t_region
),
POINTER :: pregion
1663 global => pregion%global
1666 'RFLU_ModReadBcInputFile.F90')
1683 IF ( global%specUsed .EQV. .true. )
THEN
1731 TYPE(t_region
),
POINTER :: pregion
1737 INTEGER,
PARAMETER :: nvals_max = 10
1738 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
1739 CHARACTER(10) :: keys(nvals_max)
1740 CHARACTER(256) :: ifilename
1741 CHARACTER(CHRLEN) :: bcname
1742 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,
nvals,ipatchbeg, &
1743 ipatchend,nbfacestot
1744 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
1746 TYPE(t_patch),
POINTER :: ppatch
1753 global => pregion%global
1756 'RFLU_ModReadBcInputFile.F90')
1770 keys(7) =
'CRECONST'
1772 keys(9) =
'THRUSTFLAG'
1776 distrib,ifilename,bcname,defined)
1782 IF ( ipatchend > global%nPatches )
THEN
1783 CALL
errorstop(global,err_patch_range,__line__)
1790 DO ipatch = 1,pregion%grid%nPatches
1791 ppatch => pregion%patches(ipatch)
1797 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
1798 ppatch%iPatchGlobal <= ipatchend )
THEN
1799 ppatch%bcType = bc_noslipwall_hflux
1800 ppatch%bcName = bcname
1803 ppatch%movePatch = .false.
1804 ppatch%smoothGrid = .false.
1807 ppatch%mixt%nData = 1
1808 ppatch%mixt%nSwitches = 0
1810 ppatch%mixt%distrib = bcdat_constant
1816 IF ( ppatch%mixt%distrib == bcdat_constant )
THEN
1819 DO i = 0,ppatch%mixt%nData-1
1820 IF ( defined(1+
i) .EQV. .true. )
THEN
1821 checksum = checksum + 1
1825 IF ( checksum /= ppatch%mixt%nData )
THEN
1826 CALL
errorstop(global,err_bcval_missing,__line__)
1834 IF ( defined(8) .EQV. .true. )
THEN
1835 IF ( (nint(vals(8)) >= bc_kind_min) .AND. &
1836 (nint(vals(8)) <= bc_kind_max) )
THEN
1837 ppatch%bcKind = nint(vals(8))
1840 ppatch%bcKind = bc_kind_simple
1843 ppatch%bcKind = bc_kind_simple
1850 IF ( defined(9) .EQV. .true. )
THEN
1851 IF ( (vals(9) > 0.5_rfreal) .AND. &
1852 (vals(9) < 1.5_rfreal) )
THEN
1853 ppatch%thrustFlag = .true.
1855 ppatch%thrustFlag = .false.
1858 ppatch%thrustFlag = .false.
1865 IF ( defined(10) .EQV. .true. )
THEN
1866 IF ( nint(vals(10)) == 2 )
THEN
1867 ppatch%spaceOrder = 2
1869 ppatch%spaceOrder = 1
1872 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
1880 IF ( defined(2) .EQV. .true. )
THEN
1881 IF ( nint(vals(2)) == bc_not_burning )
THEN
1882 ppatch%bcCoupled = nint(vals(2))
1883 ppatch%mixt%distrib = bcdat_distrib
1884 ELSE IF ( nint(vals(2)) == bc_burning )
THEN
1885 global%warnCounter = global%warnCounter + 1
1887 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1888 'Invalid coupling input for patch ',ipatch, &
1889 '. Overriding user input.'
1891 ppatch%bcCoupled = bc_not_burning
1892 ppatch%mixt%distrib = bcdat_distrib
1893 ELSE IF ( nint(vals(2)) == bc_not_coupled )
THEN
1894 ppatch%bcCoupled = nint(vals(2))
1895 ppatch%mixt%distrib = distrib
1897 global%warnCounter = global%warnCounter + 1
1899 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1900 'Invalid coupling input for patch ',ipatch, &
1901 '. Overriding user input.'
1903 ppatch%bcCoupled = bc_not_coupled
1904 ppatch%mixt%distrib = distrib
1907 ppatch%bcCoupled = bc_not_coupled
1908 ppatch%mixt%distrib = distrib
1911 IF ( defined(2) .EQV. .true. )
THEN
1912 IF ( nint(vals(2)) /= bc_not_coupled )
THEN
1913 global%warnCounter = global%warnCounter + 1
1915 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
1916 'Invalid coupling input for patch ',ipatch, &
1917 '. Overriding user input.'
1919 ppatch%bcCoupled = bc_not_coupled
1921 ppatch%bcCoupled = bc_not_coupled
1924 ppatch%mixt%distrib = distrib
1926 ppatch%bcCoupled = bc_not_coupled
1927 ppatch%mixt%distrib = bcdat_constant
1935 IF ( defined(5) .EQV. .true. )
THEN
1936 ppatch%movePatchDir = vals(5)
1938 ppatch%movePatchDir = movepatch_dir_none
1945 IF ( defined(6) .EQV. .true. )
THEN
1946 IF ( nint(vals(6)) == 1 )
THEN
1947 ppatch%plotStatsFlag = .true.
1949 ppatch%plotStatsFlag = .false.
1952 ppatch%plotStatsFlag = .false.
1959 IF ( defined(7) .EQV. .true. )
THEN
1960 IF ( nint(vals(7)) == 1 )
THEN
1961 ppatch%cReconst = constr_weighted
1963 ppatch%cReconst = constr_none
1966 ppatch%cReconst = constr_none
1975 DO ipatch = 1,pregion%grid%nPatches
1976 ppatch => pregion%patches(ipatch)
1982 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
1983 ppatch%iPatchGlobal <= ipatchend )
THEN
1990 IF ( ppatch%mixt%distrib == bcdat_distrib )
THEN
1991 nbfacestot = ppatch%nBTrisTot + ppatch%nBQuadsTot
1993 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,nbfacestot), &
1995 global%error = errorflag
1996 IF ( global%error /= err_none )
THEN
1997 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
2000 DO ifl = 1,nbfacestot
2001 DO idata = 1,ppatch%mixt%nData
2002 ppatch%mixt%vals(idata,ifl) =
REAL(crazy_value_int,kind=rfreal)
2011 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,0:1), &
2013 global%error = errorflag
2014 IF ( global%error /= err_none )
THEN
2015 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
2018 ppatch%mixt%vals(bcdat_noslip_q,0:1) = vals(1)
2068 TYPE(t_region
),
POINTER :: pregion
2074 INTEGER,
PARAMETER :: nvals_max = 10
2075 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
2076 CHARACTER(10) :: keys(nvals_max)
2077 CHARACTER(256) :: ifilename
2078 CHARACTER(CHRLEN) :: bcname
2079 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,nbfacestot, &
2080 nvals,ipatchbeg,ipatchend
2081 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
2083 TYPE(t_patch),
POINTER :: ppatch
2090 global => pregion%global
2093 'RFLU_ModReadBcInputFile.F90')
2107 keys(7) =
'CRECONST'
2109 keys(9) =
'THRUSTFLAG'
2113 distrib,ifilename,bcname,defined)
2119 IF ( ipatchend > global%nPatches )
THEN
2120 CALL
errorstop(global,err_patch_range,__line__)
2127 DO ipatch = 1,pregion%grid%nPatches
2128 ppatch => pregion%patches(ipatch)
2134 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
2135 ppatch%iPatchGlobal <= ipatchend )
THEN
2136 ppatch%bcType = bc_noslipwall_temp
2137 ppatch%bcName = bcname
2140 ppatch%movePatch = .false.
2141 ppatch%smoothGrid = .false.
2144 ppatch%mixt%nData = 1
2145 ppatch%mixt%nSwitches = 0
2151 IF ( defined(8) .EQV. .true. )
THEN
2152 IF ( (nint(vals(8)) >= bc_kind_min) .AND. &
2153 (nint(vals(8)) <= bc_kind_max) )
THEN
2154 ppatch%bcKind = nint(vals(8))
2157 ppatch%bcKind = bc_kind_simple
2160 ppatch%bcKind = bc_kind_simple
2167 IF ( defined(9) .EQV. .true. )
THEN
2168 IF ( (vals(9) > 0.5_rfreal) .AND. &
2169 (vals(9) < 1.5_rfreal) )
THEN
2170 ppatch%thrustFlag = .true.
2172 ppatch%thrustFlag = .false.
2175 ppatch%thrustFlag = .false.
2182 IF ( defined(10) .EQV. .true. )
THEN
2183 IF ( nint(vals(10)) == 2 )
THEN
2184 ppatch%spaceOrder = 2
2186 ppatch%spaceOrder = 1
2189 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
2197 IF ( defined(2) .EQV. .true. )
THEN
2198 IF ( nint(vals(2)) == bc_not_burning )
THEN
2199 ppatch%bcCoupled = nint(vals(2))
2200 ppatch%mixt%distrib = bcdat_distrib
2201 ELSE IF ( nint(vals(2)) == bc_burning )
THEN
2202 global%warnCounter = global%warnCounter + 1
2204 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
2205 'Invalid coupling input for patch ',ipatch, &
2206 '. Overriding user input.'
2208 ppatch%bcCoupled = bc_not_burning
2209 ppatch%mixt%distrib = bcdat_distrib
2210 ELSE IF ( nint(vals(2)) == bc_not_coupled )
THEN
2211 ppatch%bcCoupled = nint(vals(2))
2212 ppatch%mixt%distrib = distrib
2214 global%warnCounter = global%warnCounter + 1
2216 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
2217 'Invalid coupling input for patch ',ipatch, &
2218 '. Overriding user input.'
2220 ppatch%bcCoupled = bc_not_coupled
2221 ppatch%mixt%distrib = distrib
2224 ppatch%bcCoupled = bc_not_coupled
2225 ppatch%mixt%distrib = distrib
2228 IF ( defined(2) .EQV. .true. )
THEN
2229 IF ( nint(vals(2)) /= bc_not_coupled )
THEN
2230 global%warnCounter = global%warnCounter + 1
2232 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
2233 'Invalid coupling input for patch ',ipatch, &
2234 '. Overriding user input.'
2236 ppatch%bcCoupled = bc_not_coupled
2238 ppatch%bcCoupled = bc_not_coupled
2241 ppatch%mixt%distrib = distrib
2243 ppatch%bcCoupled = bc_not_coupled
2244 ppatch%mixt%distrib = bcdat_constant
2252 IF ( ppatch%mixt%distrib == bcdat_constant )
THEN
2255 DO i = 0,ppatch%mixt%nData-1
2256 IF ( defined(1+
i) .EQV. .true. )
THEN
2257 checksum = checksum + 1
2261 IF ( checksum /= ppatch%mixt%nData )
THEN
2262 CALL
errorstop(global,err_bcval_missing,__line__)
2270 IF ( defined(5) .EQV. .true. )
THEN
2271 ppatch%movePatchDir = vals(5)
2273 ppatch%movePatchDir = movepatch_dir_none
2280 IF ( defined(6) .EQV. .true. )
THEN
2281 IF ( nint(vals(6)) == 1 )
THEN
2282 ppatch%plotStatsFlag = .true.
2284 ppatch%plotStatsFlag = .false.
2287 ppatch%plotStatsFlag = .false.
2294 IF ( defined(7) .EQV. .true. )
THEN
2295 IF ( nint(vals(7)) == 1 )
THEN
2296 ppatch%cReconst = constr_weighted
2298 ppatch%cReconst = constr_none
2301 ppatch%cReconst = constr_none
2310 DO ipatch = 1,pregion%grid%nPatches
2311 ppatch => pregion%patches(ipatch)
2317 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
2318 ppatch%iPatchGlobal <= ipatchend )
THEN
2325 IF ( ppatch%mixt%distrib == bcdat_distrib )
THEN
2326 nbfacestot = ppatch%nBTrisTot + ppatch%nBQuadsTot
2328 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,nbfacestot), &
2330 global%error = errorflag
2331 IF ( global%error /= err_none )
THEN
2332 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
2337 IF ( ppatch%bcCoupled == bc_not_coupled )
THEN
2338 DO ifl = 1,nbfacestot
2339 DO idata = 1,ppatch%mixt%nData
2340 ppatch%mixt%vals(idata,ifl) = &
2341 REAL(crazy_value_int,kind=rfreal)
2348 DO ifl = 1,nbfacestot
2349 DO idata = 1,ppatch%mixt%nData
2350 ppatch%mixt%vals(idata,ifl) = 0.0_rfreal
2360 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,0:1), &
2362 global%error = errorflag
2363 IF ( global%error /= err_none )
THEN
2364 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
2367 ppatch%mixt%vals(bcdat_noslip_t,0:1) = vals(1)
2417 TYPE(t_region
),
POINTER :: pregion
2423 INTEGER,
PARAMETER :: nvals_max = 12
2425 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
2426 CHARACTER(10) :: keys(nvals_max)
2427 CHARACTER(256) :: ifilename
2428 CHARACTER(CHRLEN) :: bcname
2429 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,ireg,ipatchbeg, &
2431 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
2433 TYPE(t_patch),
POINTER :: ppatch
2440 global => pregion%global
2443 'RFLU_ModReadBcInputFile.F90')
2460 keys(10) =
'REFLECT'
2462 keys(12) =
'THRUSTFLAG'
2465 distrib,ifilename,bcname,defined )
2471 IF ( ipatchend > global%nPatches )
THEN
2472 CALL
errorstop(global,err_patch_range,__line__)
2479 DO ipatch = 1,pregion%grid%nPatches
2480 ppatch => pregion%patches(ipatch)
2486 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
2487 ppatch%iPatchGlobal <= ipatchend )
THEN
2488 ppatch%bcType = bc_outflow
2489 ppatch%bcName = bcname
2494 ppatch%cReconst = constr_none
2495 ppatch%plotStatsFlag = .false.
2498 ppatch%movePatch = .false.
2499 ppatch%smoothGrid = .false.
2506 ppatch%mixt%nSwitches = 1
2507 ppatch%mixt%distrib = distrib
2509 ALLOCATE(ppatch%mixt%switches(ppatch%mixt%nSwitches), &
2511 global%error = errorflag
2512 IF ( global%error /= err_none )
THEN
2513 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%switches')
2520 IF ( defined(9) .EQV. .true. )
THEN
2521 IF ( (nint(vals(9)) >= bc_kind_min) .AND. &
2522 (nint(vals(9)) <= bc_kind_max) )
THEN
2523 ppatch%bcKind = nint(vals(9))
2526 ppatch%bcKind = bc_kind_simple
2529 ppatch%bcKind = bc_kind_simple
2536 IF ( defined(10) .EQV. .true. )
THEN
2537 IF ( nint(vals(10)) == bc_reflecting )
THEN
2538 ppatch%reflect = bc_reflecting
2540 ppatch%reflect = bc_nonreflecting
2543 ppatch%reflect = bc_reflecting
2546 IF ( defined(11) .EQV. .true. )
THEN
2547 ppatch%nscbcK = vals(11)
2554 IF ( defined(12) .EQV. .true. )
THEN
2555 IF ( (vals(12) > 0.5_rfreal) .AND. &
2556 (vals(12) < 1.5_rfreal) )
THEN
2557 ppatch%thrustFlag = .true.
2559 ppatch%thrustFlag = .false.
2562 ppatch%thrustFlag = .false.
2569 IF ( defined(1) .EQV. .true. )
THEN
2570 IF ( nint(vals(1)) == 0 )
THEN
2571 ppatch%mixt%switches(bcswi_outflow_type) = bcopt_supersonic
2572 ELSE IF ( nint(vals(1)) == 1 )
THEN
2573 ppatch%mixt%switches(bcswi_outflow_type) = bcopt_subsonic
2574 ELSE IF ( nint(vals(1)) == 2 )
THEN
2575 ppatch%mixt%switches(bcswi_outflow_type) = bcopt_mixed
2577 CALL
errorstop(global,err_val_bcswitch,__line__,
'(outflow type).')
2580 CALL
errorstop(global,err_no_bcswitch,__line__,
'(outflow type).')
2587 IF ( ppatch%mixt%switches(bcswi_outflow_type) /= &
2588 bcopt_supersonic )
THEN
2589 ppatch%mixt%nData = 1
2591 IF ( ppatch%mixt%distrib == bcdat_constant )
THEN
2592 IF ( defined(2) .EQV. .false. )
THEN
2593 CALL
errorstop(global,err_bcval_missing,__line__)
2597 ppatch%mixt%nData = 0
2604 IF ( defined(5) .EQV. .true. )
THEN
2605 IF ( nint(vals(5)) == 2 )
THEN
2606 ppatch%spaceOrder = 2
2608 ppatch%spaceOrder = 1
2611 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
2618 IF ( defined(6) .EQV. .true. )
THEN
2619 IF ( nint(vals(6)) == 1 )
THEN
2620 ppatch%plotStatsFlag = .true.
2622 ppatch%plotStatsFlag = .false.
2625 ppatch%plotStatsFlag = .false.
2632 IF ( defined(7) .EQV. .true. )
THEN
2633 ppatch%movePatchDir = vals(7)
2635 ppatch%movePatchDir = movepatch_dir_none
2642 IF ( defined(8) .EQV. .true. )
THEN
2643 ppatch%bcCoupled = vals(8)
2645 ppatch%bcCoupled = bc_not_coupled
2655 DO ipatch = 1,pregion%grid%nPatches
2656 ppatch => pregion%patches(ipatch)
2662 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
2663 ppatch%iPatchGlobal <= ipatchend )
THEN
2665 IF ( ppatch%mixt%switches(bcswi_outflow_type) /= &
2666 bcopt_supersonic )
THEN
2673 IF ( ppatch%mixt%distrib == bcdat_distrib )
THEN
2674 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,ppatch%nBFaces), &
2676 global%error = errorflag
2677 IF ( global%error /= err_none )
THEN
2678 CALL
errorstop(global,err_allocate,__line__)
2681 DO ifl = 1,ppatch%nBFaces
2682 DO idata = 1,ppatch%mixt%nData
2683 ppatch%mixt%vals(idata,ifl) = &
2684 REAL(crazy_value_int,kind=rfreal)
2693 ALLOCATE(ppatch%mixt%vals(ppatch%mixt%nData,0:1), &
2695 global%error = errorflag
2696 IF ( global%error /= err_none )
THEN
2697 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%vals')
2700 ppatch%mixt%vals(bcdat_outflow_press,0:1) = vals(2)
2703 nullify(ppatch%mixt%vals)
2754 TYPE(t_region
),
POINTER :: pregion
2760 INTEGER,
PARAMETER :: nvals_max = 5
2762 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
2763 CHARACTER(10) :: keys(nvals_max)
2764 CHARACTER(256) :: ifilename
2765 CHARACTER(CHRLEN) :: bcname
2766 INTEGER :: checksum,distrib,errorflag,
i,idata,ifl,ipatch,ireg,ipatchbeg, &
2768 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
2770 TYPE(t_patch),
POINTER :: ppatch
2777 global => pregion%global
2780 'RFLU_ModReadBcInputFile.F90')
2788 keys(1) =
'RELPATCH'
2795 distrib,ifilename,bcname,defined )
2801 IF ( ipatchend > global%nPatches )
THEN
2802 CALL
errorstop(global,err_patch_range,__line__)
2809 DO ipatch = 1,pregion%grid%nPatches
2810 ppatch => pregion%patches(ipatch)
2816 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
2817 ppatch%iPatchGlobal <= ipatchend )
THEN
2818 ppatch%bcType = bc_periodic
2819 ppatch%bcName = bcname
2820 ppatch%bcCoupled = bc_not_coupled
2822 ppatch%mixt%nData = 0
2823 ppatch%mixt%nSwitches = 0
2824 ppatch%mixt%distrib = bcdat_constant
2826 ppatch%bcKind = bc_kind_simple
2827 ppatch%thrustFlag = .false.
2829 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
2830 ppatch%cReconst = constr_none
2833 ppatch%movePatch = .false.
2834 ppatch%smoothGrid = .false.
2837 IF ( defined(1) .EQV. .false. )
THEN
2838 CALL
errorstop(global,err_bcval_missing,__line__)
2840 ppatch%iPatchRelated = nint(vals(1))
2843 IF ( defined(2) .EQV. .false. )
THEN
2844 CALL
errorstop(global,err_bcval_missing,__line__)
2846 ppatch%angleRelated = vals(2)*global%deg2rad
2849 IF ( defined(3) .EQV. .false. )
THEN
2850 CALL
errorstop(global,err_bcval_missing,__line__)
2852 ppatch%axisRelated = nint(vals(3))
2901 TYPE(t_region
),
POINTER :: pregion
2907 INTEGER,
PARAMETER :: nvals_max = 9
2909 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
2910 CHARACTER(10) :: keys(nvals_max)
2911 CHARACTER(256) :: ifilename
2912 CHARACTER(CHRLEN) :: bcname
2913 INTEGER :: distrib,errorflag,ipatch,
nvals,ipatchbeg,ipatchend
2914 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
2916 TYPE(t_patch),
POINTER :: ppatch
2923 global => pregion%global
2926 'RFLU_ModReadBcInputFile.F90')
2939 keys(6) =
'CRECONST'
2941 keys(8) =
'THRUSTFLAG'
2945 distrib,ifilename,bcname,defined)
2951 IF ( ipatchend > global%nPatches )
THEN
2952 CALL
errorstop(global,err_patch_range,__line__)
2959 DO ipatch = 1,pregion%grid%nPatches
2960 ppatch => pregion%patches(ipatch)
2966 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
2967 ppatch%iPatchGlobal <= ipatchend )
THEN
2968 ppatch%bcType = bc_slipwall
2969 ppatch%bcName = bcname
2972 ppatch%movePatch = .false.
2973 ppatch%smoothGrid = .false.
2976 ppatch%mixt%nData = 0
2977 ppatch%mixt%nSwitches = 0
2978 ppatch%mixt%distrib = bcdat_constant
2980 nullify(ppatch%mixt%switches)
2981 nullify(ppatch%mixt%vals)
2987 IF ( defined(7) .EQV. .true. )
THEN
2988 IF ( (nint(vals(7)) >= bc_kind_min) .AND. &
2989 (nint(vals(7)) <= bc_kind_max) )
THEN
2990 ppatch%bcKind = nint(vals(7))
2993 ppatch%bcKind = bc_kind_simple
2996 ppatch%bcKind = bc_kind_simple
3003 IF ( defined(8) .EQV. .true. )
THEN
3004 IF ( (vals(8) > 0.5_rfreal) .AND. &
3005 (vals(8) < 1.5_rfreal) )
THEN
3006 ppatch%thrustFlag = .true.
3008 ppatch%thrustFlag = .false.
3011 ppatch%thrustFlag = .false.
3018 IF ( defined(9) .EQV. .true. )
THEN
3019 IF ( nint(vals(9)) == 2 )
THEN
3020 ppatch%spaceOrder = 2
3022 ppatch%spaceOrder = 1
3025 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
3033 IF ( defined(1) .EQV. .true. )
THEN
3034 IF ( nint(vals(1)) == bc_not_burning )
THEN
3035 ppatch%bcCoupled = nint(vals(1))
3036 ELSE IF ( nint(vals(1)) == bc_burning )
THEN
3037 global%warnCounter = global%warnCounter + 1
3039 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
3040 'Invalid coupling input for patch ',ipatch, &
3041 '. Overriding user input.'
3043 ppatch%bcCoupled = bc_not_burning
3044 ELSE IF ( nint(vals(1)) == bc_not_coupled )
THEN
3045 ppatch%bcCoupled = nint(vals(1))
3047 global%warnCounter = global%warnCounter + 1
3049 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
3050 'Invalid coupling input for patch ',ipatch, &
3051 '. Overriding user input.'
3053 ppatch%bcCoupled = bc_not_coupled
3056 ppatch%bcCoupled = bc_not_coupled
3059 IF ( defined(1) .EQV. .true. )
THEN
3060 IF ( nint(vals(1)) /= bc_not_coupled )
THEN
3061 global%warnCounter = global%warnCounter + 1
3063 WRITE(stdout,
'(A,3X,A,1X,A,I3,A)') solver_name,
'*** WARNING ***', &
3064 'Invalid coupling input for patch ',ipatch, &
3065 '. Overriding user input.'
3067 ppatch%bcCoupled = bc_not_coupled
3069 ppatch%bcCoupled = bc_not_coupled
3072 ppatch%bcCoupled = bc_not_coupled
3080 IF ( defined(4) .EQV. .true. )
THEN
3081 ppatch%movePatchDir = vals(4)
3083 ppatch%movePatchDir = movepatch_dir_none
3090 IF ( defined(5) .EQV. .true. )
THEN
3091 IF ( nint(vals(5)) == 1 )
THEN
3092 ppatch%plotStatsFlag = .true.
3094 ppatch%plotStatsFlag = .false.
3097 ppatch%plotStatsFlag = .false.
3104 IF ( defined(6) .EQV. .true. )
THEN
3105 IF ( nint(vals(6)) == 1 )
THEN
3106 ppatch%cReconst = constr_weighted
3108 ppatch%cReconst = constr_none
3111 ppatch%cReconst = constr_none
3162 TYPE(t_region
),
POINTER :: pregion
3168 INTEGER,
PARAMETER :: nvals_max = 2
3170 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
3171 CHARACTER(10) :: keys(nvals_max)
3172 CHARACTER(256) :: ifilename
3173 CHARACTER(CHRLEN) :: bcname
3174 INTEGER :: distrib,errorflag,ipatch,
nvals,ipatchbeg,ipatchend
3175 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
3177 TYPE(t_patch),
POINTER :: ppatch
3184 global => pregion%global
3187 'RFLU_ModReadBcInputFile.F90')
3199 distrib,ifilename,bcname,defined)
3205 IF ( ipatchend > global%nPatches )
THEN
3206 CALL
errorstop(global,err_patch_range,__line__)
3213 DO ipatch = 1,pregion%grid%nPatches
3214 ppatch => pregion%patches(ipatch)
3220 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
3221 ppatch%iPatchGlobal <= ipatchend )
THEN
3223 ppatch%bcType = bc_symmetry
3224 ppatch%bcName = bcname
3225 ppatch%bcCoupled = bc_not_coupled
3227 ppatch%iPatchRelated = ipatch
3229 ppatch%mixt%nData = 0
3230 ppatch%mixt%nSwitches = 0
3231 ppatch%mixt%distrib = bcdat_constant
3233 ppatch%bcKind = bc_kind_simple
3234 ppatch%thrustFlag = .false.
3236 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
3237 ppatch%cReconst = constr_none
3240 ppatch%movePatch = .false.
3241 ppatch%smoothGrid = .false.
3244 ALLOCATE(ppatch%mixt%switches(ppatch%mixt%nSwitches), &
3246 global%error = errorflag
3247 IF ( global%error /= err_none )
THEN
3248 CALL
errorstop(global,err_allocate,__line__)
3251 nullify(ppatch%mixt%vals)
3300 TYPE(t_region
),
POINTER :: pregion
3306 INTEGER,
PARAMETER :: nvals_max = 1
3308 LOGICAL,
DIMENSION(NVALS_MAX) :: defined
3309 CHARACTER(10) :: keys(nvals_max)
3310 CHARACTER(256) :: ifilename
3311 CHARACTER(CHRLEN) :: bcname
3312 INTEGER :: distrib,errorflag,ipatch,
nvals,ipatchbeg,ipatchend
3313 REAL(RFREAL),
DIMENSION(NVALS_MAX) :: vals
3315 TYPE(t_patch),
POINTER :: ppatch
3322 global => pregion%global
3325 'RFLU_ModReadBcInputFile.F90')
3336 distrib,ifilename,bcname,defined)
3342 IF ( ipatchend > global%nPatches )
THEN
3343 CALL
errorstop(global,err_patch_range,__line__)
3350 DO ipatch = 1,pregion%grid%nPatches
3351 ppatch => pregion%patches(ipatch)
3357 IF ( ppatch%iPatchGlobal >= ipatchbeg .AND. &
3358 ppatch%iPatchGlobal <= ipatchend )
THEN
3359 ppatch%bcType = bc_virtual
3360 ppatch%bcName = bcname
3362 ppatch%bcCoupled = bc_not_coupled
3363 ppatch%movePatchDir = movepatch_dir_none
3365 ppatch%mixt%nData = 0
3366 ppatch%mixt%nSwitches = 0
3367 ppatch%mixt%distrib = bcdat_constant
3369 ppatch%bcKind = bc_kind_simple
3370 ppatch%thrustFlag = .false.
3372 ppatch%spaceOrder = pregion%mixtInput%spaceOrderBFaces
3373 ppatch%cReconst = constr_none
3374 ppatch%plotStatsFlag = .false.
3377 ppatch%movePatch = .false.
3378 ppatch%smoothGrid = .false.
3381 nullify(ppatch%mixt%switches)
3382 nullify(ppatch%mixt%vals)
CImg< T > & line(const unsigned int y0)
Get a line.
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine buildfilenameplain(global, dest, ext, fileName)
subroutine readpatchsection(global, fileID, nvals, keys, vals, brbeg, brend, prbeg, prend, distrib, profType, fname, defined)
**********************************************************************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 USE ModDataTypes USE nvals
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)