471 INTEGER,
PARAMETER :: icnum = 19
472 REAL,
PARAMETER :: gamma = 1.4
474 INTEGER,
PARAMETER :: mgeo = cartesian
479 INTEGER,
PARAMETER :: xres = 100
480 INTEGER,
PARAMETER :: yres = 100
481 INTEGER,
PARAMETER :: zres = 1
482 REAL,
PARAMETER :: rmin = 1.0e-4
484 INTEGER,
PARAMETER :: onum = 1
485 CHARACTER(LEN=256),
PARAMETER &
487 CHARACTER(LEN=256),
PARAMETER &
488 :: ofname =
'riemann2d' 490 CLASS(
fosite),
Dimension(:),
ALLOCATABLE :: sim
502 CALL sim(ic)%InitFosite()
511 CALL initdata(sim(ic)%Mesh, sim(ic)%Physics, sim(ic)%Timedisc, ic)
514 CALL sim(ic)%Finalize()
515 tap_check(.true.,
"Simulation finished")
530 TYPE(Dict_TYP),
POINTER :: config
535 TYPE(Dict_TYP),
POINTER :: mesh, physics, boundary, datafile, &
537 REAL :: x1,x2,y1,y2,z1,z2,sc
538 REAL :: test_stoptime
539 CHARACTER(LEN=3) :: fext
554 bc(west) = no_gradients
555 bc(east) = no_gradients
556 bc(south) = no_gradients
557 bc(north) = no_gradients
558 bc(bottom)= no_gradients
559 bc(top) = no_gradients
601 CALL sim%Physics%Error(
"riemann2d::MakeConfig", &
602 " geometry should be one of cartesian,polar,logpolar,tanpolar,sinhpolar")
606 mesh => dict(
"meshtype" / midpoint, &
620 boundary => dict(
"western" / bc(west), &
621 "eastern" / bc(east), &
622 "southern" / bc(south), &
623 "northern" / bc(north), &
624 "bottomer" / bc(bottom),&
628 physics => dict(
"problem" / euler, &
632 fluxes => dict(
"order" / linear, &
634 "variables" / conservative, &
635 "limiter" / monocent, &
679 CALL sim%Physics%Error(
"InitProgram", &
680 "Sorry, this 2D Riemann problem is currently not supported!")
685 "method" / modified_euler, &
688 "stoptime" / test_stoptime, &
689 "dtlimit" / 1.0e-10, &
690 "maxiter" / 10000000)
694 WRITE (fext,
'(A,I2.2)')
"_", ic
698 "fileformat" / vtk, &
699 "filename" / (trim(odir) // trim(ofname) // trim(fext)), &
702 config => dict(
"mesh" / mesh, &
703 "physics" / physics, &
704 "boundary" / boundary, &
706 "timedisc" / timedisc, &
708 "datafile" / datafile)
712 SUBROUTINE initdata(Mesh,Physics,Timedisc,ic)
715 CLASS(Physics_base) :: Physics
716 CLASS(Mesh_base) :: Mesh
717 CLASS(Timedisc_base):: Timedisc
721 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX, &
Mesh%KGMIN:Mesh%KGMAX,2) :: vxy
722 REAL :: xmin,ymin,xmax,ymax,x0,y0
724 REAL :: xmin_all,xmax_all,ymin_all,ymax_all
727 CHARACTER(LEN=64) :: teststr
729 INTENT(IN) :: mesh,physics,ic
730 INTENT(INOUT) :: timedisc
733 xmin = minval(mesh%bccart(:,:,:,1))
734 ymin = minval(mesh%bccart(:,:,:,2))
735 xmax = maxval(mesh%bccart(:,:,:,1))
736 ymax = maxval(mesh%bccart(:,:,:,2))
738 CALL mpi_allreduce(xmin,xmin_all,1,default_mpi_real,mpi_min,mesh%comm_cart,ierr)
740 CALL mpi_allreduce(ymin,ymin_all,1,default_mpi_real,mpi_min,mesh%comm_cart,ierr)
742 CALL mpi_allreduce(xmax,xmax_all,1,default_mpi_real,mpi_max,mesh%comm_cart,ierr)
744 CALL mpi_allreduce(ymax,ymax_all,1,default_mpi_real,mpi_max,mesh%comm_cart,ierr)
747 x0 = xmin + 0.5*abs(xmax-xmin)
748 y0 = ymin + 0.5*abs(ymax-ymin)
750 timedisc%pvar%data4d(:,:,:,:) = 0.
755 teststr =
"2D Riemann problem no. 1" 756 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
758 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
759 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
760 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
762 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .5197
763 vxy(:,:,:,1) = -.7259
764 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .4
765 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
767 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .1072
768 vxy(:,:,:,1) = -.7259
769 vxy(:,:,:,2) = -1.4045
770 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .0439
771 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
773 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .2579
774 vxy(:,:,:,2) = -1.4045
775 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .15
779 teststr =
"2D Riemann problem no. 2" 780 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
782 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
783 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
784 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
786 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .5197
787 vxy(:,:,:,1) = -.7259
788 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .4
789 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
791 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
792 vxy(:,:,:,1) = -.7259
793 vxy(:,:,:,2) = -.7259
794 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
795 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
797 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .5197
798 vxy(:,:,:,2) = -.7259
799 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .4
803 teststr =
"2D Riemann problem no. 3" 804 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
806 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.5
807 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.5
808 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
810 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .5323
812 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .3
813 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
815 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.138
818 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.029
819 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
821 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .5323
823 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .3
827 teststr =
"2D Riemann problem no. 4" 828 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
830 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.1
831 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.1
832 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
834 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .5065
836 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .35
837 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
839 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.1
842 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.1
843 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
845 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = .5065
847 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = .35
851 teststr =
"2D Riemann problem no. 5" 852 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
854 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
857 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
858 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
860 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
863 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
864 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
866 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
869 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
870 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
872 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 3.
875 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
878 teststr =
"2D Riemann problem no. 6" 879 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
881 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
884 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
885 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
887 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
890 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
891 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
893 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
896 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
897 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
899 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 3.
902 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
905 teststr =
"2D Riemann problem no. 7" 906 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
908 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
911 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
912 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
914 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
915 vxy(:,:,:,1) = -0.6259
917 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
918 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
920 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.8
923 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
924 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
926 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
928 vxy(:,:,:,2) = -0.6259
929 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
932 teststr =
"2D Riemann problem no. 8" 933 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
935 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
938 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
939 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
941 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
942 vxy(:,:,:,1) = -0.6259
944 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
945 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
947 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.8
950 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
951 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
953 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
955 vxy(:,:,:,2) = -0.6259
956 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
959 teststr =
"2D Riemann problem no. 9" 960 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
962 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
965 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
966 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
968 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
971 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
972 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
974 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.039
976 vxy(:,:,:,2) = -0.8133
977 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
978 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
980 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
982 vxy(:,:,:,2) = -0.4259
983 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
986 teststr =
"2D Riemann problem no. 10" 987 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
989 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
991 vxy(:,:,:,2) = 0.4297
992 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
993 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
995 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5
997 vxy(:,:,:,2) = 0.6076
998 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
999 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1001 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.2281
1003 vxy(:,:,:,2) = -0.6076
1004 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.3333
1005 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1007 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.4562
1009 vxy(:,:,:,2) = -0.4297
1010 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.3333
1013 teststr =
"2D Riemann problem no. 11" 1014 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1016 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1019 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1020 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1022 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5313
1023 vxy(:,:,:,1) = 0.8276
1025 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1026 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1028 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.8
1031 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1032 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1034 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5313
1036 vxy(:,:,:,2) = 0.7276
1037 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1040 teststr =
"2D Riemann problem no. 12" 1041 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1043 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5313
1046 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1047 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1049 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1050 vxy(:,:,:,1) = 0.7276
1052 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1053 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1055 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.8
1058 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1059 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1061 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1063 vxy(:,:,:,2) = 0.7276
1064 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1067 teststr =
"2D Riemann problem no. 13" 1068 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1070 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1073 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1074 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1076 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
1079 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1080 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1082 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.0625
1084 vxy(:,:,:,2) = 0.8145
1085 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1086 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1088 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5313
1090 vxy(:,:,:,2) = 0.4276
1091 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1094 teststr =
"2D Riemann problem no. 14" 1095 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1097 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
1099 vxy(:,:,:,2) = -0.5606
1100 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 8.
1101 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1103 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1105 vxy(:,:,:,2) = -1.2172
1106 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 8.
1107 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1109 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.4736
1111 vxy(:,:,:,2) = 1.2172
1112 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 2.6667
1113 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1115 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.9474
1117 vxy(:,:,:,2) = 1.1606
1118 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 2.6667
1121 teststr =
"2D Riemann problem no. 15" 1122 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1124 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1127 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1128 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1130 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
1131 vxy(:,:,:,1) = -0.6259
1133 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1134 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1136 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.8
1139 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1140 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1142 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5313
1144 vxy(:,:,:,2) = 0.4276
1145 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1148 teststr =
"2D Riemann problem no. 16" 1149 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1151 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5313
1154 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1155 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1157 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.02222
1158 vxy(:,:,:,1) = -0.6179
1160 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1161 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1163 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.8
1166 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1167 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1169 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1171 vxy(:,:,:,2) = 0.8276
1172 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1175 teststr =
"2D Riemann problem no. 17" 1176 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1178 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1181 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1182 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1184 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
1187 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1188 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1190 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.0625
1192 vxy(:,:,:,2) = 0.2145
1193 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1194 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1196 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
1198 vxy(:,:,:,2) = -1.1259
1199 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1203 teststr =
"2D Riemann problem no. 18" 1204 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1206 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1209 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1210 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1212 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
1215 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1216 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1218 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.0625
1220 vxy(:,:,:,2) = 0.2145
1221 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1222 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1224 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
1226 vxy(:,:,:,2) = 0.2741
1227 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1231 teststr =
"2D Riemann problem no. 19" 1232 WHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1234 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.
1237 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1238 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).GE.y0) )
1240 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 2.
1243 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 1.
1244 ELSEWHERE ( (mesh%bccart(:,:,:,1).LT.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1246 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 1.0625
1248 vxy(:,:,:,2) = 0.2145
1249 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1250 ELSEWHERE ( (mesh%bccart(:,:,:,1).GE.x0).AND.(mesh%bccart(:,:,:,2).LT.y0) )
1252 timedisc%pvar%data4d(:,:,:,physics%DENSITY) = 0.5197
1254 vxy(:,:,:,2) = -0.4259
1255 timedisc%pvar%data4d(:,:,:,physics%PRESSURE) = 0.4
1259 CALL mesh%Error(
"InitData", &
1260 "Sorry, this 2D Riemann problem is currently not supported!")
1265 timedisc%pvar%data4d(:,:,:,physics%XVELOCITY) = vxy(:,:,:,1)
1266 timedisc%pvar%data4d(:,:,:,physics%YVELOCITY) = vxy(:,:,:,2)
1267 CALL physics%Convert2Conservative(timedisc%pvar,timedisc%cvar)
1268 CALL mesh%Info(
" DATA-----> initial condition: " // trim(teststr))
1331
subroutine initdata(Mesh, Physics, Fluxes, Timedisc)
elemental real function, public asinh(x)
inverse hyperbolic sine function
subroutine makeconfig(Sim, config)