├── examples ├── 1D │ └── shock_tube │ │ └── SOD │ │ ├── ibm │ │ ├── IBM │ │ ├── input │ │ │ ├── procmap-mpi.dat │ │ │ ├── procmap-no_mpi.dat │ │ │ ├── solver.dat │ │ │ ├── initial_species.dat │ │ │ └── blocks_description.dat │ │ ├── ibm_options.dat │ │ └── run_IBM.sh │ │ ├── off │ │ ├── OFF │ │ ├── input │ │ ├── off_options.dat │ │ └── run_OFF.sh │ │ ├── pog │ │ ├── POG │ │ ├── input │ │ ├── output-ref │ │ │ ├── sod.g01.b001.plt │ │ │ └── sod.g01.b002.plt │ │ ├── r.gnu │ │ ├── run_POG.sh │ │ └── exact_sod-100-t02-block-split.dat │ │ └── readme.txt └── 2D │ └── two_dimensional_riemann_problems │ ├── kt-c03 │ ├── ibm │ │ ├── IBM │ │ ├── run_IBM.sh │ │ ├── ibm_options.dat │ │ └── input │ │ │ ├── procmap-mpi.dat │ │ │ ├── initial_species.dat │ │ │ ├── procmap-no_mpi.dat │ │ │ ├── solver.dat │ │ │ └── blocks_description.dat │ ├── off │ │ ├── OFF │ │ ├── run_OFF.sh │ │ └── off_options.dat │ └── pog │ │ ├── POG │ │ ├── input │ │ ├── run_POG.sh │ │ └── kt-c03-scaled-r.png │ ├── kt-c04 │ ├── ibm │ │ ├── IBM │ │ ├── run_IBM.sh │ │ ├── ibm_options.dat │ │ └── input │ │ │ ├── procmap-mpi.dat │ │ │ ├── initial_species.dat │ │ │ ├── procmap-no_mpi.dat │ │ │ ├── solver.dat │ │ │ └── blocks_description.dat │ ├── off │ │ ├── OFF │ │ ├── run_OFF.sh │ │ └── off_options.dat │ └── pog │ │ ├── POG │ │ ├── run_POG.sh │ │ └── kt-c04-scaled-r.png │ ├── kt-c05 │ ├── ibm │ │ ├── IBM │ │ ├── run_IBM.sh │ │ ├── ibm_options.dat │ │ └── input │ │ │ ├── procmap-mpi.dat │ │ │ ├── initial_species.dat │ │ │ ├── procmap-no_mpi.dat │ │ │ ├── solver.dat │ │ │ └── blocks_description.dat │ ├── off │ │ ├── OFF │ │ ├── run_OFF.sh │ │ └── off_options.dat │ └── pog │ │ ├── POG │ │ ├── run_POG.sh │ │ └── kt-c05-scaled-r.png │ ├── kt-c06 │ ├── ibm │ │ ├── IBM │ │ ├── run_IBM.sh │ │ ├── ibm_options.dat │ │ └── input │ │ │ ├── procmap-mpi.dat │ │ │ ├── initial_species.dat │ │ │ ├── procmap-no_mpi.dat │ │ │ ├── solver.dat │ │ │ └── blocks_description.dat │ ├── off │ │ ├── OFF │ │ ├── run_OFF.sh │ │ └── off_options.dat │ └── pog │ │ ├── POG │ │ ├── run_POG.sh │ │ └── kt-c06-scaled-r.png │ ├── kt-c12 │ ├── ibm │ │ ├── IBM │ │ ├── run_IBM.sh │ │ ├── ibm_options.dat │ │ └── input │ │ │ ├── procmap-mpi.dat │ │ │ ├── initial_species.dat │ │ │ ├── procmap-no_mpi.dat │ │ │ ├── solver.dat │ │ │ └── blocks_description.dat │ ├── off │ │ ├── OFF │ │ ├── run_OFF.sh │ │ └── off_options.dat │ └── pog │ │ ├── POG │ │ ├── run_POG.sh │ │ └── kt-c12-scaled-r.png │ ├── kt-c17 │ ├── ibm │ │ ├── IBM │ │ ├── run_IBM.sh │ │ ├── ibm_options.dat │ │ └── input │ │ │ ├── procmap-mpi.dat │ │ │ ├── initial_species.dat │ │ │ ├── procmap-no_mpi.dat │ │ │ ├── solver.dat │ │ │ └── blocks_description.dat │ ├── off │ │ ├── OFF │ │ ├── run_OFF.sh │ │ └── off_options.dat │ └── pog │ │ ├── POG │ │ ├── run_POG.sh │ │ └── kt-c17-scaled-r.png │ ├── common │ ├── procmap-mpi.dat │ ├── procmap-no_mpi.dat │ ├── ibm_options.dat │ ├── run_IBM.sh │ ├── off_options.dat │ ├── run_OFF.sh │ ├── initial_species.dat │ └── run_POG.sh │ └── readme.txt ├── doc ├── disspeedup050x050.png ├── disspeedup200x200.png ├── shaspeedup050x050.png ├── shaspeedup100x100.png ├── shaspeedup200x200.png ├── shaspeedup400x400.png ├── fpp.sh └── off-layout.xml ├── fobos.OFF.serial.nulj.nulk.intel ├── inputs-template ├── in1.001.bco ├── ibm_option-blocks.dat ├── ibm_option-icemcfd.dat ├── solver.dat ├── off_option.dat ├── initial_species.dat └── blocks.dat ├── util ├── runPOG └── POG-ui ├── CONTRIBUTING.md ├── README.md ├── src ├── Data_Type_Face.f90 ├── Data_Type_Cell.f90 ├── Lib_Profiling.f90 ├── Data_Type_OS.f90 ├── Lib_Thermodynamic_Laws_Ideal.f90 ├── Data_Type_Probe.f90 └── Data_Type_HashID.f90 └── EXAMPLE.md /examples/1D/shock_tube/SOD/ibm/IBM: -------------------------------------------------------------------------------- 1 | ../../../../../IBM -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/off/OFF: -------------------------------------------------------------------------------- 1 | ../../../../../OFF -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/off/input: -------------------------------------------------------------------------------- 1 | ../ibm/output -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/pog/POG: -------------------------------------------------------------------------------- 1 | ../../../../../POG -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/pog/input: -------------------------------------------------------------------------------- 1 | ../off/output -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/IBM: -------------------------------------------------------------------------------- 1 | ../../../../../IBM -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/off/OFF: -------------------------------------------------------------------------------- 1 | ../../../../../OFF -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/pog/POG: -------------------------------------------------------------------------------- 1 | ../../../../../POG -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/pog/input: -------------------------------------------------------------------------------- 1 | ../off/output -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/IBM: -------------------------------------------------------------------------------- 1 | ../../../../../IBM -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/off/OFF: -------------------------------------------------------------------------------- 1 | ../../../../../OFF -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/pog/POG: -------------------------------------------------------------------------------- 1 | ../../../../../POG -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/IBM: -------------------------------------------------------------------------------- 1 | ../../../../../IBM -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/off/OFF: -------------------------------------------------------------------------------- 1 | ../../../../../OFF -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/pog/POG: -------------------------------------------------------------------------------- 1 | ../../../../../POG -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/IBM: -------------------------------------------------------------------------------- 1 | ../../../../../IBM -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/off/OFF: -------------------------------------------------------------------------------- 1 | ../../../../../OFF -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/pog/POG: -------------------------------------------------------------------------------- 1 | ../../../../../POG -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/IBM: -------------------------------------------------------------------------------- 1 | ../../../../../IBM -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/off/OFF: -------------------------------------------------------------------------------- 1 | ../../../../../OFF -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/pog/POG: -------------------------------------------------------------------------------- 1 | ../../../../../POG -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/IBM: -------------------------------------------------------------------------------- 1 | ../../../../../IBM -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/off/OFF: -------------------------------------------------------------------------------- 1 | ../../../../../OFF -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/pog/POG: -------------------------------------------------------------------------------- 1 | ../../../../../POG -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/run_IBM.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_IBM.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/off/run_OFF.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_OFF.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/pog/run_POG.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_POG.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/run_IBM.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_IBM.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/off/run_OFF.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_OFF.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/pog/run_POG.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_POG.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/run_IBM.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_IBM.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/off/run_OFF.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_OFF.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/pog/run_POG.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_POG.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/run_IBM.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_IBM.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/off/run_OFF.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_OFF.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/pog/run_POG.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_POG.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/run_IBM.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_IBM.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/off/run_OFF.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_OFF.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/pog/run_POG.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_POG.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/run_IBM.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_IBM.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/off/run_OFF.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_OFF.sh -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/pog/run_POG.sh: -------------------------------------------------------------------------------- 1 | ../../common/run_POG.sh -------------------------------------------------------------------------------- /doc/disspeedup050x050.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/doc/disspeedup050x050.png -------------------------------------------------------------------------------- /doc/disspeedup200x200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/doc/disspeedup200x200.png -------------------------------------------------------------------------------- /doc/shaspeedup050x050.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/doc/shaspeedup050x050.png -------------------------------------------------------------------------------- /doc/shaspeedup100x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/doc/shaspeedup100x100.png -------------------------------------------------------------------------------- /doc/shaspeedup200x200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/doc/shaspeedup200x200.png -------------------------------------------------------------------------------- /doc/shaspeedup400x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/doc/shaspeedup400x400.png -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/ibm_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/off/off_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/off_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/ibm_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/off/off_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/off_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/ibm_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/off/off_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/off_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/ibm_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/off/off_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/off_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/ibm_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/off/off_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/off_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/ibm_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/off/off_options.dat: -------------------------------------------------------------------------------- 1 | ../../common/off_options.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/input/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/input/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/input/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/input/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/input/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/input/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/input/initial_species.dat: -------------------------------------------------------------------------------- 1 | ../../../common/initial_species.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/input/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-no_mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/input/initial_species.dat: -------------------------------------------------------------------------------- 1 | ../../../common/initial_species.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/input/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-no_mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/input/initial_species.dat: -------------------------------------------------------------------------------- 1 | ../../../common/initial_species.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/input/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-no_mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/input/initial_species.dat: -------------------------------------------------------------------------------- 1 | ../../../common/initial_species.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/input/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-no_mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/input/initial_species.dat: -------------------------------------------------------------------------------- 1 | ../../../common/initial_species.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/input/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-no_mpi.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/input/initial_species.dat: -------------------------------------------------------------------------------- 1 | ../../../common/initial_species.dat -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/input/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | ../../../common/procmap-no_mpi.dat -------------------------------------------------------------------------------- /doc/fpp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cpp -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN -DDOXYGEN_SKIP -DOPENMP -DMPI2 -I.. $* 3 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/pog/output-ref/sod.g01.b001.plt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/1D/shock_tube/SOD/pog/output-ref/sod.g01.b001.plt -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/pog/output-ref/sod.g01.b002.plt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/1D/shock_tube/SOD/pog/output-ref/sod.g01.b002.plt -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/pog/kt-c03-scaled-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/2D/two_dimensional_riemann_problems/kt-c03/pog/kt-c03-scaled-r.png -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/pog/kt-c04-scaled-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/2D/two_dimensional_riemann_problems/kt-c04/pog/kt-c04-scaled-r.png -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/pog/kt-c05-scaled-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/2D/two_dimensional_riemann_problems/kt-c05/pog/kt-c05-scaled-r.png -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/pog/kt-c06-scaled-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/2D/two_dimensional_riemann_problems/kt-c06/pog/kt-c06-scaled-r.png -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/pog/kt-c12-scaled-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/2D/two_dimensional_riemann_problems/kt-c12/pog/kt-c12-scaled-r.png -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/pog/kt-c17-scaled-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/szaghi/OFF/HEAD/examples/2D/two_dimensional_riemann_problems/kt-c17/pog/kt-c17-scaled-r.png -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/ibm/input/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | 2 Nb_tot = number of total blocks 2 | 3 | 0 proc(bth) = rank of process where bth block is loaded 4 | 1 proc(bth) = rank of process where bth block is loaded 5 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/ibm/input/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | 2 Nb_tot = number of total blocks 2 | 3 | 0 proc(bth) = rank of process where bth block is loaded 4 | 0 proc(bth) = rank of process where bth block is loaded 5 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/pog/r.gnu: -------------------------------------------------------------------------------- 1 | set style func linespoints 2 | set style line 1 lt 1 lc rgb "red" lw 1 ps 1 pt 6 3 | set style line 2 lt 1 lc rgb "blue" lw 1 ps 1 pt 6 4 | plot 'output-ref/sod.g01.b001.gnu.dat' u 1:4 ls 2 w lp notitle, 'output-ref/sod.g01.b002.gnu.dat' u 1:4 ls 2 w lp title "OFF Reference",\ 5 | 'output/sod.g01.b001.gnu.dat' u 1:4 ls 1 w lp notitle, 'output/sod.g01.b002.gnu.dat' u 1:4 ls 1 w lp title "OFF output" 6 | pause -1 7 | -------------------------------------------------------------------------------- /fobos.OFF.serial.nulj.nulk.intel: -------------------------------------------------------------------------------- 1 | [builder] 2 | compiler=intel 3 | cflags=-O3 -cpp -c -module ./mod/ -static -assume protect_parens -assume realloc_lhs -fp-model source -D_OSYSTEMuix -DNULj -DNULk -DSMSWz 4 | lflags=-O3 -static -assume protect_parens -assume realloc_lhs -fp-model source 5 | dmod=./mod/ 6 | dobj=./obj/ 7 | dexe=./ 8 | src=./src/ 9 | colors=True 10 | quiet=False 11 | j=10 12 | [files] 13 | target=src/OFF.f90 14 | output=OFF.ser.nulj.nulk 15 | log=False 16 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/procmap-mpi.dat: -------------------------------------------------------------------------------- 1 | 4 Nb_tot = number of total blocks 2 | 3 | 0 proc(bth) = rank of process where bth block is loaded 4 | 1 proc(bth) = rank of process where bth block is loaded 5 | 2 proc(bth) = rank of process where bth block is loaded 6 | 3 proc(bth) = rank of process where bth block is loaded 7 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/procmap-no_mpi.dat: -------------------------------------------------------------------------------- 1 | 4 Nb_tot = number of total blocks 2 | 3 | 0 proc(bth) = rank of process where bth block is loaded 4 | 0 proc(bth) = rank of process where bth block is loaded 5 | 0 proc(bth) = rank of process where bth block is loaded 6 | 0 proc(bth) = rank of process where bth block is loaded 7 | -------------------------------------------------------------------------------- /inputs-template/in1.001.bco: -------------------------------------------------------------------------------- 1 | 1.d0 r1 = density of species 1 2 | 0.d0 u = 1st velocity component 3 | 0.d0 v = 2nd velocity component 4 | 0.d0 w = 3rd velocity component 5 | 1.d0 p = pressure 6 | 1.d0 r=sum(rs) = density 7 | 1.4d0 g = specific heats ratio 8 | -------------------------------------------------------------------------------- /util/runPOG: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function print_usage { 4 | echo "Usage" 5 | echo " 1) runPOG -last 'npjobs'" 6 | echo " Postprocess the last iteration saved;" 7 | echo " 'npjobs' is the number of concurrent parallel jobs" 8 | echo " 2) runPOG 'nstart' 'nstop' 'nstep'" 9 | echo " Postprocess the iterations from 'nstart' to 'nstop'" 10 | echo " with the frequency 'nstep'; use only 1 job" 11 | echo " 3) runPOG 'nstart' 'nstop' 'nstep' 'njobs'" 12 | echo " Postprocess the iterations from 'nstart' to 'nstop'" 13 | echo " with the frequency 'nstep'; use 'njobs' parallel jobs" 14 | exit 1 15 | } 16 | 17 | if [ $# -eq 0 ] ; then 18 | print_usage 19 | elif [ $# -eq 2 ] ; then 20 | if [ "$1" = "-last" ] ; then 21 | n1=`ls -lt output/*N_*.sol.* | head -n 1 | awk -F . '{print $2}' | awk -F _ '{print $2}' | sed 's/^0*//'` 22 | n2=$n1 23 | ns=1 24 | job=$2 25 | else 26 | print_usage 27 | fi 28 | elif [ $# -eq 3 ] ; then 29 | n1=$1 30 | n2=$2 31 | ns=$3 32 | job=1 33 | elif [ $# -eq 4 ] ; then 34 | n1=$1 35 | n2=$2 36 | ns=$3 37 | job=$4 38 | else 39 | print_usage 40 | fi 41 | 42 | ./POG-ui -j $job -np 8 -m OJT -em .geo -s output/OJT -es .sol -o postprocessing/out -eo .plt -n1 $n1 -n2 $n2 -ns $ns -f yes yes no no -tec -grl 1" 43 | -------------------------------------------------------------------------------- /inputs-template/ibm_option-blocks.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | OS TYPE 3 | 'uix' OS_type = Operating System, UIX or WIN 4 | INPUT FILES 5 | './' Path_InPut = input path 6 | 'initial_species.dat' File_Spec = name of initial species file 7 | 'blocks' In_type = type of input, blocks or icemcfd 8 | 'blocks.dat' File_Blocks = name of blocks file 9 | GRID OPTIONS 10 | 1 Nl = number of grid level 11 | OUTPUT FILES 12 | './output/' Path_OutPut = output path 13 | '1DRP' File_Mesh = basename of mesh file 14 | '1DRP' File_BC = basename of boundary conditions file 15 | '1DRP' File_Init = basename of initial conditions file 16 | ----------------------------------------------------------------------------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/ibm/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | OS TYPE 3 | 'uix' OS_type = Operating System, UIX or WIN 4 | INPUT FILES 5 | './input/' Path_InPut = input path 6 | 'initial_species.dat' File_Spec = name of initial species file 7 | 'blocks' In_type = type of input, blocks or icemcfd 8 | 'blocks_description.dat' File_Blocks = name of blocks file 9 | GRID OPTIONS 10 | 1 Nl = number of grid level 11 | OUTPUT FILES 12 | './output/' Path_OutPut = output path 13 | 'sod' File_Mesh = basename of mesh file 14 | 'sod' File_BC = basename of boundary conditions file 15 | 'sod' File_Init = basename of initial conditions file 16 | ----------------------------------------------------------------------------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/ibm_options.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | OS TYPE 3 | 'uix' OS_type = Operating System, UIX or WIN 4 | INPUT FILES 5 | './input/' Path_InPut = input path 6 | 'initial_species.dat' File_Spec = name of initial species file 7 | 'blocks' In_type = type of input, blocks or icemcfd 8 | 'blocks_description.dat' File_Blocks = name of blocks file 9 | GRID OPTIONS 10 | 1 Nl = number of grid level 11 | OUTPUT FILES 12 | './output/' Path_OutPut = output path 13 | '2DRP' File_Mesh = basename of mesh file 14 | '2DRP' File_BC = basename of boundary conditions file 15 | '2DRP' File_Init = basename of initial conditions file 16 | ----------------------------------------------------------------------------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/ibm/run_IBM.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | #=============================================================================== 3 | # 4 | # FILE: run_IBM.sh 5 | # 6 | # USAGE: ./run_IBM.sh [options] 7 | # 8 | # DESCRIPTION: bash srcipt for running IBM code 9 | #=============================================================================== 10 | function print_usage { 11 | echo "Bash srcipt for running IBM code" 12 | echo "Usage" 13 | echo " 1) ./run_IBM.sh => print this help message;" 14 | echo " 2) ./run_IBM.sh -out => produce output for simulation;" 15 | echo " 3) ./run_IBM.sh -clean => clean current directory." 16 | exit 1 17 | } 18 | if [ $# -eq 0 ] ; then 19 | print_usage 20 | fi 21 | if [ "$1" == "-clean" ] ; then 22 | rm -rf output # cleaning working directory 23 | elif [ "$1" == "-out" ] ; then 24 | if [ ! -f IBM ]; then 25 | echo "IBM code has not been generated!" 26 | echo "Go into the root directory and compile IBM" 27 | exit 1 28 | fi 29 | rm -rf output # cleaning working directory 30 | mkdir -p output # creating outout directory 31 | ./IBM ibm_options.dat # running IBM with options defined in "ibm_options.dat" 32 | cp ./input/solver.dat ./output/ # copying solver options 33 | cp ./input/procmap-no_mpi.dat ./output/ # copyng procmap without MPI 34 | cp ./input/procmap-mpi.dat ./output/ # copyng procmap with MPI 35 | else 36 | echo "Unknown switch $1" 37 | print_usage 38 | fi 39 | exit 0 40 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/run_IBM.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | #=============================================================================== 3 | # 4 | # FILE: run_IBM.sh 5 | # 6 | # USAGE: ./run_IBM.sh [options] 7 | # 8 | # DESCRIPTION: bash srcipt for running IBM code 9 | #=============================================================================== 10 | function print_usage { 11 | echo "Bash srcipt for running IBM code" 12 | echo "Usage" 13 | echo " 1) ./run_IBM.sh => print this help message;" 14 | echo " 2) ./run_IBM.sh -out => produce output for simulation;" 15 | echo " 3) ./run_IBM.sh -clean => clean current directory." 16 | exit 1 17 | } 18 | if [ $# -eq 0 ] ; then 19 | print_usage 20 | fi 21 | if [ "$1" == "-clean" ] ; then 22 | rm -rf output # cleaning working directory 23 | elif [ "$1" == "-out" ] ; then 24 | if [ ! -f IBM ]; then 25 | echo "IBM code has not been generated!" 26 | echo "Go into the root directory and compile IBM" 27 | exit 1 28 | fi 29 | rm -rf output # cleaning working directory 30 | mkdir -p output # creating outout directory 31 | ulimit -s unlimited # increasing the stack size 32 | ./IBM ibm_options.dat # running IBM with options defined in "ibm_options.dat" 33 | cp ./input/solver.dat ./output/ # copying solver options 34 | cp ./input/procmap-no_mpi.dat ./output/ # copyng procmap without MPI 35 | cp ./input/procmap-mpi.dat ./output/ # copyng procmap with MPI 36 | else 37 | echo "Unknown switch $1" 38 | print_usage 39 | fi 40 | exit 0 41 | -------------------------------------------------------------------------------- /inputs-template/ibm_option-icemcfd.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | OS TYPE 3 | 'uix' OS_type = Operating System, UIX or WIN 4 | INPUT FILES 5 | './' Path_InPut = input path 6 | 'initial_species.dat' File_Spec = name of initial species file 7 | 'icemcfd' In_type = type of input, blocks or icemcfd 8 | 1 Nf_Icem = number of icemcfd files 9 | 'info_SOD-x' File_Blocks = name of blocks file 10 | GRID OPTIONS 11 | 1 Nl = number of grid level 12 | OUTPUT FILES 13 | './output/' Path_OutPut = output path 14 | '1DRP' File_Mesh = basename of mesh file 15 | '1DRP' File_BC = basename of boundary conditions file 16 | '1DRP' File_Init = basename of initial conditions file 17 | ----------------------------------------------------------------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /inputs-template/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 0 Nmax = max number of iterations 5 | 0.15d0 Tmax = max time, ignored if Nmax>0 6 | 7 sp_ord = order of space convergence (order of state reconstruction) 7 | 5 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.7d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/ibm/input/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 0 Nmax = max number of iterations 5 | 0.20d0 Tmax = max time, ignored if Nmax>0 6 | 7 sp_ord = order of space convergence (order of state reconstruction) 7 | 5 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.7d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/input/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 20 Nmax = max number of iterations 5 | 0.3d0 Tmax = max time, ignored if Nmax>0 6 | 7 sp_ord = order of space convergence (order of state reconstruction) 7 | 3 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.475d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/input/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 20 Nmax = max number of iterations 5 | 0.25d0 Tmax = max time, ignored if Nmax>0 6 | 5 sp_ord = order of space convergence (order of state reconstruction) 7 | 3 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.475d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/input/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 20 Nmax = max number of iterations 5 | 0.3d0 Tmax = max time, ignored if Nmax>0 6 | 7 sp_ord = order of space convergence (order of state reconstruction) 7 | 3 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.475d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/input/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 20 Nmax = max number of iterations 5 | 0.25d0 Tmax = max time, ignored if Nmax>0 6 | 5 sp_ord = order of space convergence (order of state reconstruction) 7 | 3 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.475d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/input/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 20 Nmax = max number of iterations 5 | 0.3d0 Tmax = max time, ignored if Nmax>0 6 | 5 sp_ord = order of space convergence (order of state reconstruction) 7 | 3 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.475d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/input/solver.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | SOLVER OPTIONS 3 | 'unsteady' Timing = 'unsteady' simulation or steady one otherwise 4 | 20 Nmax = max number of iterations 5 | 0.25d0 Tmax = max time, ignored if Nmax>0 6 | 5 sp_ord = order of space convergence (order of state reconstruction) 7 | 3 rk_ord = order of time convergence (Runge-Kutta stages) 8 | 0.475d0 CFL = stability costant 9 | 0.01d0 Res_Tol = residuals tollerance 10 | NON DIMENSIONAL NUMBERS 11 | 1.d0 Re = Reynolds number 12 | 1.d0 Fr = Froude number 13 | 1.d0 Pr = Prandtl number 14 | REFERENCE VALUES 15 | 1.d0 L0 = reference length 16 | 1.d0 r0 = reference density 17 | 1.d0 v0 = reference velocity 18 | 1.d0 c0 = reference specific heat 19 | ------------------------------------------------------------------------------------------------------------------------------------ 20 | -------------------------------------------------------------------------------- /inputs-template/off_option.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | OS TYPE 3 | 'uix' OS_type = Operating System, UIX or WIN 4 | INPUT OPTIONS 5 | './' Path_InPut = input path 6 | 'solver.dat' File_Solver = name of solver options file 7 | 1 Nl = number of grid levels used 8 | 'tube' File_Mesh = basename of mesh file 9 | 'tube' File_BC = basename of boundary conditions file 10 | 'sod' File_Init = basename of initial conditions file 11 | OUTPUT OPTIONS 12 | 'output/' Path_OutPut = output path 13 | 'sod' Title_out = title of output file 14 | '.sol' Extension_out = extension of output file 15 | 10 screen_out = console refresh frequency 16 | 10 sol_out = actual solution output frequency 17 | 20 restart_out = restart output frequency 18 | 1 probe_out = probes output frequency 19 | 'prof' File_Prof = prefix of profiling file names 20 | ------------------------------------------------------------------------------------------------------------------------------------ 21 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/off/off_options.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | OS TYPE 3 | 'uix' OS_type = Operating System, UIX or WIN 4 | INPUT OPTIONS 5 | './input/' Path_InPut = input path 6 | 'solver.dat' File_Solver = name of solver options file 7 | 1 Nl = number of grid levels used 8 | 'sod' File_Mesh = basename of mesh file 9 | 'sod' File_BC = basename of boundary conditions file 10 | 'sod' File_Init = basename of initial conditions file 11 | OUTPUT OPTIONS 12 | 'output/' Path_OutPut = output path 13 | 'sod' Title_out = title of output file 14 | '.sol' Extension_out = extension of output file 15 | 1000 screen_out = console refresh frequency 16 | 10 sol_out = actual solution output frequency 17 | 10 restart_out = restart output frequency 18 | 1 probe_out = probes output frequency 19 | 'prof' File_Prof = prefix of profiling file names 20 | ------------------------------------------------------------------------------------------------------------------------------------ 21 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/off_options.dat: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------------------------------------------------------------ 2 | OS TYPE 3 | 'uix' OS_type = Operating System, UIX or WIN 4 | INPUT OPTIONS 5 | './input/' Path_InPut = input path 6 | 'solver.dat' File_Solver = name of solver options file 7 | 1 Nl = number of grid levels used 8 | '2DRP' File_Mesh = basename of mesh file 9 | '2DRP' File_BC = basename of boundary conditions file 10 | '2DRP' File_Init = basename of initial conditions file 11 | OUTPUT OPTIONS 12 | 'output/' Path_OutPut = output path 13 | '2DRP' Title_out = title of output file 14 | '.sol' Extension_out = extension of output file 15 | 50 screen_out = console refresh frequency 16 | 1000 sol_out = actual solution output frequency 17 | 5000 restart_out = restart output frequency 18 | 200 probe_out = probes output frequency 19 | 'prof' File_Prof = prefix of profiling file names 20 | ------------------------------------------------------------------------------------------------------------------------------------ 21 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/off/run_OFF.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | #=============================================================================== 3 | # 4 | # FILE: run_OFF.sh 5 | # 6 | # USAGE: ./run_OFF.sh [options] 7 | # 8 | # DESCRIPTION: bash srcipt for running OFF code 9 | #=============================================================================== 10 | function print_usage { 11 | echo "Bash srcipt for running OFF code" 12 | echo "Usage" 13 | echo " 1) ./run_OFF.sh => print this help message;" 14 | echo " 2) ./run_OFF.sh -no_mpi => run simulation without MPI (link to procmap-no_mpi.dat);" 15 | echo " 3) ./run_OFF.sh -mpi => run simulation with MPI (link to procmap-mpi.dat);" 16 | echo " 4) ./run_OFF.sh -clean => clean current directory." 17 | exit 1 18 | } 19 | if [ $# -eq 0 ] ; then 20 | print_usage 21 | fi 22 | if [ "$1" == "-clean" ] ; then 23 | rm -rf output lockfile input # cleaning working directory 24 | else 25 | if [ ! -d ../ibm/output ]; then 26 | echo "IBM output dir not found!" 27 | echo "Before run OFF you must run IBM:" 28 | echo "cd ../ibm/ ; run_IBM.sh -out ; cd -" 29 | exit 1 30 | fi 31 | if [ ! -f OFF ]; then 32 | echo "OFF code has not been generated!" 33 | echo "Go into the root directory and compile OFF" 34 | exit 1 35 | fi 36 | rm -rf output lockfile input # cleaning working directory 37 | ln -fs ../ibm/output input # link to IBM output 38 | mkdir -p output # creating outout directory 39 | if [ "$1" = "-no_mpi" ] ; then 40 | cd input ; ln -fs procmap-no_mpi.dat procmap.dat ; cd ../ # linking procmap.dat to map without MPI 41 | ./OFF off_options.dat # running OFF without MPI 42 | elif [ "$1" = "-mpi" ] ; then 43 | cd input ; ln -fs procmap-mpi.dat procmap.dat ; cd ../ # linking procmap.dat to map with MPI 44 | mpirun -n 2 ./OFF off_options.dat # running OFF with MPI 45 | else 46 | echo "Unknown switch $1" 47 | print_usage 48 | fi 49 | fi 50 | exit 0 51 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/run_OFF.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | #=============================================================================== 3 | # 4 | # FILE: run_OFF.sh 5 | # 6 | # USAGE: ./run_OFF.sh [options] 7 | # 8 | # DESCRIPTION: bash srcipt for running OFF code 9 | #=============================================================================== 10 | function print_usage { 11 | echo "Bash srcipt for running OFF code" 12 | echo "Usage" 13 | echo " 1) ./run_OFF.sh => print this help message;" 14 | echo " 2) ./run_OFF.sh -no_mpi => run simulation without MPI (link to procmap-no_mpi.dat);" 15 | echo " 3) ./run_OFF.sh -mpi => run simulation with MPI (link to procmap-mpi.dat);" 16 | echo " 4) ./run_OFF.sh -clean => clean current directory." 17 | exit 1 18 | } 19 | if [ $# -eq 0 ] ; then 20 | print_usage 21 | fi 22 | if [ "$1" == "-clean" ] ; then 23 | rm -rf output lockfile input # cleaning working directory 24 | else 25 | if [ ! -d ../ibm/output ]; then 26 | echo "IBM output dir not found!" 27 | echo "Before run OFF you must run IBM:" 28 | echo "cd ../ibm/ ; run_IBM.sh -out ; cd -" 29 | exit 1 30 | fi 31 | if [ ! -f OFF ]; then 32 | echo "OFF code has not been generated!" 33 | echo "Go into the root directory and compile OFF" 34 | exit 1 35 | fi 36 | rm -rf output lockfile input # cleaning working directory 37 | ln -fs ../ibm/output input # link to IBM output 38 | mkdir -p output # creating outout directory 39 | ulimit -s unlimited # increasing the stack size 40 | if [ "$1" = "-no_mpi" ] ; then 41 | cd input ; ln -fs procmap-no_mpi.dat procmap.dat ; cd ../ # linking procmap.dat to map without MPI 42 | ./OFF off_options.dat # running OFF without MPI 43 | elif [ "$1" = "-mpi" ] ; then 44 | cd input ; ln -fs procmap-mpi.dat procmap.dat ; cd ../ # linking procmap.dat to map with MPI 45 | mpirun -n 2 ./OFF off_options.dat # running OFF with MPI 46 | else 47 | echo "Unknown switch $1" 48 | print_usage 49 | fi 50 | fi 51 | exit 0 52 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | This project is open source, therefore, anyone is interest to use, to develop or to contribute to it is welcome. 4 | 5 | The project must remain KISS (Keep It Simple and Stupid) thus a few guidelines for contributing are provided. 6 | 7 | ## Issues Handling 8 | 9 | If you find issues (bugs or new features requests) you are kindly requested to highlight them on the GitHub repository. 10 | 11 | + Make sure you have a [GitHub account](https://github.com/signup/free); 12 | + submit a ticket for your issue, assuming one does not already exist; 13 | + clearly describe the issue including steps to reproduce when it is a bug; 14 | + make sure you fill in the earliest version that you know has the issue. 15 | 16 | Alternatively, you can signal issues directly to the main developer at stefano.zaghi@gmail.com. 17 | 18 | ## Collaborative Development 19 | 20 | If you like to directly contribute to the project you are welcome. To improve the collaborative development of the project you are kindly requested to respect the following guidelines. 21 | 22 | + Fork the repository on GitHub; 23 | + make sure you have a modern Fortran compiler having extensive support for 2003+ standards for safely testing the project; 24 | + create a topic branch from where you want to base your work; 25 | + this is usually the master branch: 26 | + only target release branches if you are certain your fix must be on that branch; 27 | + to quickly create a topic branch based on master; `git branch fix/master/my_contribution master` then checkout the new branch with `git checkout fix/master/my_contribution`; please avoid working directly on the `master` branch; 28 | + check for unnecessary whitespace with `git diff --check` before committing; 29 | + make sure your commit messages are clear; 30 | + make sure you have properly tested for your changes. 31 | 32 | As long as possible, contributors are kindly requested to follow the current coding style of the project (two white spaces instead of tabs, no trailing white spaces, blank lines should not have any space, prefer `>,<,==...` instead of `.gt.,.lt.,.eq....`, etc...). In particular, avoid _implicit_ typing and prefer verbose comments. In general, it is strongly recommended to avoid Microsoft-Windows-like carriage-return symbols in order to not pollute the source files with unnecessary symbols. 33 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/pog/run_POG.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | #=============================================================================== 3 | # 4 | # FILE: run_POG.sh 5 | # 6 | # USAGE: ./run_POG.sh [options] 7 | # 8 | # DESCRIPTION: bash srcipt for running POG code 9 | #=============================================================================== 10 | function print_usage { 11 | echo "Bash srcipt for running POG code" 12 | echo "Usage" 13 | echo " 1) ./run_POG.sh => print this help message;" 14 | echo " 2) ./run_POG.sh -tec => produce Tecplot output;" 15 | echo " 3) ./run_POG.sh -vtk => produce VTK output;" 16 | echo " 4) ./run_POG.sh -gnu => produce gnuplot output;" 17 | echo " 5) ./run_POG.sh -clean => clean current directory." 18 | exit 1 19 | } 20 | if [ $# -eq 0 ] ; then 21 | print_usage 22 | fi 23 | if [ "$1" == "-clean" ] ; then 24 | rm -rf output input # cleaning working directory 25 | ln -fs ../off/output input # link to OFF output 26 | else 27 | if [ ! -d ../off/output ]; then 28 | echo "OFF output dir not found!" 29 | echo "Before run POG you must run OFF:" 30 | echo "cd ../off/ ; run_OFF.sh -mpi[or -no_mpi] ; cd -" 31 | exit 1 32 | fi 33 | if [ ! -f POG ]; then 34 | echo "POG code has not been generated!" 35 | echo "Go into the root directory and compile POG" 36 | exit 1 37 | fi 38 | rm -rf output input # cleaning working directory 39 | ln -fs ../off/output input # link to OFF output 40 | mkdir -p output # creating outout directory 41 | for file in $( ls ./input/*b001*N_*.sol ); do 42 | nlast=`basename $file | awk -F . '{print $3}' | awk -F _ '{print $2}' | sed 's/^0*//'` 43 | done 44 | n=`printf "%10.10d" $nlast` 45 | if [ "$1" = "-tec" ]; then 46 | tout="-tec yes -vtk no -gnu no" 47 | elif [ "$1" = "-vtk" ]; then 48 | tout="-tec no -vtk yes -gnu no" 49 | elif [ "$1" = "-gnu" ]; then 50 | tout="-tec no -vtk no -gnu yes" 51 | else 52 | echo "Unknown switch $1" 53 | print_usage 54 | fi 55 | ./POG -m ./input/sod.g01.b001.geo -s ./input/sod.g01.b001-N_$n.sol -o output/sod.g01.b001 $tout # post-processing block 1 56 | ./POG -m ./input/sod.g01.b002.geo -s ./input/sod.g01.b002-N_$n.sol -o output/sod.g01.b002 $tout # post-processing block 2 57 | if [ "$1" = "-gnu" ]; then 58 | gnuplot r.gnu 59 | fi 60 | fi 61 | exit 0 62 | -------------------------------------------------------------------------------- /inputs-template/initial_species.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | INITIAL SPECIES 3 | 1 Nspecies = number of initial species 4 | 5 | 0.d0 gamma = cp/cv specific heats ratio 6 | 0.d0 R = cp-cv specific heats difference 7 | 1040.004d0 cp = specific heats at costant p 8 | 742.860d0 cv = specific heats at costant v 9 | 10 | 1.1385d0 gamma = cp/cv specific heats ratio 11 | 285.0168d0 R = cp-cv specific heats difference 12 | 0.d0 cp = specific heats at costant p 13 | 0.d0 cv = specific heats at costant v 14 | 15 | 1.4d0 gamma = cp/cv specific heats ratio 16 | 0.d0 R = cp-cv specific heats difference 17 | 1008.d0 cp = specific heats at costant p 18 | 0.d0 cv = specific heats at costant v 19 | 20 | 1.4d0 gamma = cp/cv specific heats ratio 21 | 0.d0 R = cp-cv specific heats difference 22 | 0.d0 cp = specific heats at costant p 23 | 720.d0 cv = specific heats at costant v 24 | 25 | 0.d0 gamma = cp/cv specific heats ratio 26 | 295.d0 R = cp-cv specific heats difference 27 | 1008.d0 cp = specific heats at costant p 28 | 0.d0 cv = specific heats at costant v 29 | ----------------------------------------------------------------------------------------------------------------------------------- 30 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/ibm/input/initial_species.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | INITIAL SPECIES 3 | 1 Nspecies = number of initial species 4 | 5 | 0.d0 gamma = cp/cv specific heats ratio 6 | 0.d0 R = cp-cv specific heats difference 7 | 1040.004d0 cp = specific heats at costant p 8 | 742.860d0 cv = specific heats at costant v 9 | 10 | 1.1385d0 gamma = cp/cv specific heats ratio 11 | 285.0168d0 R = cp-cv specific heats difference 12 | 0.d0 cp = specific heats at costant p 13 | 0.d0 cv = specific heats at costant v 14 | 15 | 1.4d0 gamma = cp/cv specific heats ratio 16 | 0.d0 R = cp-cv specific heats difference 17 | 1008.d0 cp = specific heats at costant p 18 | 0.d0 cv = specific heats at costant v 19 | 20 | 1.4d0 gamma = cp/cv specific heats ratio 21 | 0.d0 R = cp-cv specific heats difference 22 | 0.d0 cp = specific heats at costant p 23 | 720.d0 cv = specific heats at costant v 24 | 25 | 0.d0 gamma = cp/cv specific heats ratio 26 | 295.d0 R = cp-cv specific heats difference 27 | 1008.d0 cp = specific heats at costant p 28 | 0.d0 cv = specific heats at costant v 29 | ----------------------------------------------------------------------------------------------------------------------------------- 30 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/initial_species.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | INITIAL SPECIES 3 | 1 Nspecies = number of initial species 4 | 5 | 0.d0 gamma = cp/cv specific heats ratio 6 | 0.d0 R = cp-cv specific heats difference 7 | 1040.004d0 cp = specific heats at costant p 8 | 742.860d0 cv = specific heats at costant v 9 | 10 | 1.1385d0 gamma = cp/cv specific heats ratio 11 | 285.0168d0 R = cp-cv specific heats difference 12 | 0.d0 cp = specific heats at costant p 13 | 0.d0 cv = specific heats at costant v 14 | 15 | 1.4d0 gamma = cp/cv specific heats ratio 16 | 0.d0 R = cp-cv specific heats difference 17 | 1008.d0 cp = specific heats at costant p 18 | 0.d0 cv = specific heats at costant v 19 | 20 | 1.4d0 gamma = cp/cv specific heats ratio 21 | 0.d0 R = cp-cv specific heats difference 22 | 0.d0 cp = specific heats at costant p 23 | 720.d0 cv = specific heats at costant v 24 | 25 | 0.d0 gamma = cp/cv specific heats ratio 26 | 295.d0 R = cp-cv specific heats difference 27 | 1008.d0 cp = specific heats at costant p 28 | 0.d0 cv = specific heats at costant v 29 | ----------------------------------------------------------------------------------------------------------------------------------- 30 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/common/run_POG.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | #=============================================================================== 3 | # 4 | # FILE: run_POG.sh 5 | # 6 | # USAGE: ./run_POG.sh [options] 7 | # 8 | # DESCRIPTION: bash srcipt for running POG code 9 | #=============================================================================== 10 | function print_usage { 11 | echo "Bash srcipt for running POG code" 12 | echo "Usage" 13 | echo " 1) ./run_POG.sh => print this help message;" 14 | echo " 2) ./run_POG.sh -tec => produce Tecplot output;" 15 | echo " 3) ./run_POG.sh -vtk => produce VTK output;" 16 | echo " 4) ./run_POG.sh -gnu => produce gnuplot output;" 17 | echo " 5) ./run_POG.sh -clean => clean current directory." 18 | exit 1 19 | } 20 | if [ $# -eq 0 ] ; then 21 | print_usage 22 | fi 23 | if [ "$1" == "-clean" ] ; then 24 | rm -rf output input # cleaning working directory 25 | ln -fs ../off/output input # link to OFF output 26 | else 27 | if [ ! -d ../off/output ]; then 28 | echo "OFF output dir not found!" 29 | echo "Before run POG you must run OFF:" 30 | echo "cd ../off/ ; run_OFF.sh -mpi[or -no_mpi] ; cd -" 31 | exit 1 32 | fi 33 | if [ ! -f POG ]; then 34 | echo "POG code has not been generated!" 35 | echo "Go into the root directory and compile POG" 36 | exit 1 37 | fi 38 | rm -rf output input # cleaning working directory 39 | ln -fs ../off/output input # link to OFF output 40 | mkdir -p output # creating outout directory 41 | ulimit -s unlimited # increasing the stack size 42 | for file in $( ls ./input/*b001*N_*.sol ); do 43 | nlast=`basename $file | awk -F . '{print $3}' | awk -F _ '{print $2}' | sed 's/^0*//'` 44 | done 45 | n=`printf "%10.10d" $nlast` 46 | if [ "$1" = "-tec" ]; then 47 | tout="-tec yes -vtk no -gnu no" 48 | elif [ "$1" = "-vtk" ]; then 49 | tout="-tec no -vtk yes -gnu no" 50 | elif [ "$1" = "-gnu" ]; then 51 | tout="-tec no -vtk no -gnu yes" 52 | else 53 | echo "Unknown switch $1" 54 | print_usage 55 | fi 56 | ./POG -m ./input/2DRP.g01.b001.geo -s ./input/2DRP.g01.b001-N_$n.sol -o output/2DRP.g01.b001 $tout # post-processing block 1 57 | ./POG -m ./input/2DRP.g01.b002.geo -s ./input/2DRP.g01.b002-N_$n.sol -o output/2DRP.g01.b002 $tout # post-processing block 2 58 | ./POG -m ./input/2DRP.g01.b003.geo -s ./input/2DRP.g01.b003-N_$n.sol -o output/2DRP.g01.b003 $tout # post-processing block 2 59 | ./POG -m ./input/2DRP.g01.b004.geo -s ./input/2DRP.g01.b004-N_$n.sol -o output/2DRP.g01.b004 $tout # post-processing block 4 60 | fi 61 | exit 0 62 | -------------------------------------------------------------------------------- /util/POG-ui: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #=============================================================================== 3 | # 4 | # FILE: POG-ui 5 | # 6 | # USAGE: ./POG-ui -m base_name_of_mesh_file_name [options [args]] 7 | # 8 | # DESCRIPTION: "user interface" for multi-files POG 9 | # 10 | # AUTHOR: Stefano Zaghi, 11 | # VERSION: 1.0 12 | # CREATED: 03/29/2011 11:30:55 AM CEST 13 | #=============================================================================== 14 | # defaults 15 | EFM='.geo' 16 | EFS='.sol' 17 | EFO='.plt' 18 | BFS='' 19 | bc='' 20 | cell='' 21 | ascii='' 22 | tec='' 23 | vtk='' 24 | grl=`printf "%2.2d" 1` 25 | n1=0 26 | n2=0 27 | ns=1 28 | nb=1 29 | os='' 30 | outdir="unset" 31 | job=1 32 | 33 | function print_usage { 34 | echo "Usage: `basename $0` -m base_name_of_mesh_file_name [options [args]]" 35 | echo "Valid options are all the options of POG code (see POG for the complete list) plus the following:" 36 | echo " -s base_name_of_solution_file_name" 37 | echo " -o base_name_of_output_file_name" 38 | echo " -em extension_of_mesh_file_name (default .geo)" 39 | echo " -es extension_of_solution_file_name (default .sol)" 40 | echo " -eo extension_of_output_file_name (default .plt)" 41 | echo " -grl grid level (default 1)" 42 | echo " -n1 first iterate (default 0)" 43 | echo " -n2 last iterate (default 0)" 44 | echo " -ns iterates step (default 1)" 45 | echo " -nb number of blocks (default 1)" 46 | echo " -j number of concurrent post-processing jobs (default 1)" 47 | echo 48 | echo " Examples: " 49 | echo " Tecplot) POG-ui -m example -em .geo -s example -es .sol -o example -eo .plt -tec yes -grl 1 -n1 1 -n2 100 -ns 2 -nb 8 -j 4" 50 | echo " VTK) POG-ui -m example -em .geo -s example -es .sol -o example -vtk yes -grl 1 -n1 1 -n2 100 -ns 2 -nb 8 -j 4" 51 | } 52 | if [ $# -eq 0 ] ; then 53 | print_usage 54 | exit 1 55 | fi 56 | while [ $# -gt 0 ]; do 57 | case "$1" in 58 | "-m") 59 | shift; BFM=$1 60 | ;; 61 | "-o") 62 | shift; BFO=$1 63 | ;; 64 | "-s") 65 | shift; BFS=$1 66 | ;; 67 | "-em") 68 | shift; EFM=$1 69 | ;; 70 | "-es") 71 | shift; EFS=$1 72 | ;; 73 | "-eo") 74 | shift; EFO=$1 75 | ;; 76 | "-bc") 77 | bc=$1 78 | ;; 79 | "-cell") 80 | cell=$1 81 | ;; 82 | "-tec") 83 | shift; tec="-tec "$1 84 | ;; 85 | "-vtk") 86 | shift; vtk="-vtk "$1 87 | ;; 88 | "-grl") 89 | shift; grl=`printf "%2.2d" $1` 90 | ;; 91 | "-n1") 92 | shift; n1=$1 93 | ;; 94 | "-n2") 95 | shift; n2=$1 96 | ;; 97 | "-ns") 98 | shift; ns=$1 99 | ;; 100 | "-nb") 101 | shift; nb=$1 102 | ;; 103 | "-od") 104 | shift; outdir=$1 105 | ;; 106 | "-os") 107 | shift; os="-os "$1 108 | ;; 109 | "-j") 110 | shift; job=$1 111 | ;; 112 | \?) 113 | print_usage 114 | exit 1 115 | ;; 116 | esac 117 | shift 118 | done 119 | if [ "$outdir" == "unset" ] ; then 120 | outdir="./" 121 | else 122 | if [ "${outdir: -1}" != "/" ] ; then 123 | $outdir = $outdir"/" 124 | fi 125 | fi 126 | 127 | for n in $( seq $n1 $ns $n2 ); do 128 | nfile=`printf "%10.10d" $n` 129 | for b in $( seq 1 1 $nb ); do 130 | blk=`printf "%3.3d" $b` 131 | if [ "$BFS" != "" ] ; then 132 | FS="-s "$BFS.g$grl.b$blk-N_$nfile$EFS 133 | FO="-o "$outdir$BFO.g$grl.b$blk-N_$nfile$EFO 134 | else 135 | FS='' 136 | FO="-o "$outdir$BFO.g$grl.b$blk$EFO 137 | fi 138 | echo "./POG -m $BFM.g$grl.b$blk$EFM $FS $FO $bc $ascii $tec $vtk $os" 139 | nohup ./POG -m $BFM.g$grl.b$blk$EFM $FS $FO $bc $ascii $tec $vtk $os> /dev/null 2>&1 & 140 | let count+=1 141 | [[ $((count%$job)) -eq 0 ]] && wait 142 | done 143 | done 144 | exit 0 145 | -------------------------------------------------------------------------------- /inputs-template/blocks.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 2 Nb = number of blocks 5 | 6 | 4 4 1 1 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 50 1 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'EXT' 0 face(1) = left i boundary condition 11 | 'ADJ' 2 face(2) = right i boundary condition 12 | 'EXT' 0 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.d0 r1 = density of species 1 17 | 0.d0 u = 1st velocity component 18 | 0.d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.d0 p = pressure 21 | 1.d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 1 1 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 50 1 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'ADJ' 1 face(1) = left i boundary condition 29 | 'EXT' 0 face(2) = right i boundary condition 30 | 'EXT' 0 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 0.125d0 r1 = density of species 1 35 | 0.d0 u = 1st velocity component 36 | 0.d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 0.1d0 p = pressure 39 | 0.125d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | ----------------------------------------------------------------------------------------------------------------------------------- 42 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/ibm/input/blocks_description.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 2 Nb = number of blocks 5 | 6 | 4 4 1 1 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 50 1 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'EXT' 0 face(1) = left i boundary condition 11 | 'ADJ' 2 face(2) = right i boundary condition 12 | 'EXT' 0 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.d0 r1 = density of species 1 17 | 0.d0 u = 1st velocity component 18 | 0.d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.d0 p = pressure 21 | 1.d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 1 1 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 50 1 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'ADJ' 1 face(1) = left i boundary condition 29 | 'EXT' 0 face(2) = right i boundary condition 30 | 'EXT' 0 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 0.125d0 r1 = density of species 1 35 | 0.d0 u = 1st velocity component 36 | 0.d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 0.1d0 p = pressure 39 | 0.125d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | ----------------------------------------------------------------------------------------------------------------------------------- 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OFF 2 | 3 | OFF, Open source Finite volumes Fluid dynamics code [see documentation](http://szaghi.github.com/OFF/index.html). 4 | 5 | It is written in in standard (compliant) Fortran 2003 with highly modularity as design target. 6 | 7 | The aim of _OFF_ is to solve, numerically, the Navier-Stokes equations of fluid dynamics by means of Finite Volume technique. 8 | 9 | ###### Citing 10 | 11 | Please kindly cite OFF in your publications if it helps your research: 12 | 13 | ~~~ 14 | @article{zaghi-2014, 15 | author = {S. Zaghi}, 16 | title = {{OFF, Open source Finite volume Fluid dynamics code: A free, high-order solver based on parallel, modular, object-oriented Fortran API}}, 17 | journal = {Computer Physics Communications }, 18 | volume = {}, 19 | number = {0}, 20 | pages = { - }, 21 | year = {2014}, 22 | issn = {0010-4655}, 23 | doi = {http://dx.doi.org/10.1016/j.cpc.2014.04.005}, 24 | url = {http://www.sciencedirect.com/science/article/pii/S0010465514001283}, 25 | } 26 | ~~~ 27 | 28 | The main features of _OFF_ code are the following: 29 | * Finite Volume, Godunov-like scheme based on Euler conservation Laws written in fully conservative formulation: 30 | - the extension to viscous Navier-Stokes equations is under developing; 31 | * Underling Riemann Problem solver for convective fluxes: 32 | - Approximate Riemann solver based on (local) Lax-Friedrichs (known also as Rusanov) algorithm; 33 | - Approximate Riemann solver based on Primitive Variables Linearization algorithm; 34 | - Approximate Riemann solver based on Two Rarefactions algorithm; 35 | - Approximate Riemann solver based on Two Shocks algorithm; 36 | - Approximate Riemann solver based on Adaptive (non iterative) PVL-TR-TS algorithm; 37 | - Approximate Riemann solver based on Adaptive (non iterative) LF-TR algorithm; 38 | - Approximate Riemann solver based on HLLC algorithm; 39 | - Approximate Riemann solver based on Roe linearization. 40 | - Exact Riemann solver based on iterative solution of u-function; 41 | * Multi-Species fluids models: 42 | - Partial Densities species conservation (Standard Thermodynamic Model); 43 | - New multi-dimensional conservation models of Favini, B. et al (under developing); 44 | * Multi-Phases fluids models: 45 | - Fully-coupled Lagrangian particles transport model (under developing); 46 | * Space numerical integration models: 47 | - 1-st order piece-wise constant reconstruction; 48 | - 2-nd order TVD linear-wise reconstruction; 49 | - 3-rd,5-th,7-th orders WENO non-linear reconstruction; 50 | * Time approximation models: 51 | - 1-st order forward Euler integration; 52 | - 2-nd,3-rd,4-th orders Strong-Stability-Preserving explicit Runge-Kutta integration; 53 | * Local pseudo-time convergence acceleration for steady simulations; 54 | * Multi-grid time convergence acceleration: 55 | - Multi-grid model has been already developed, but it is affected by some not still recognized bugs. Testing and bugs fixing 56 | are in progress. 57 | * Underling numerical grid models: 58 | - 3D, general curvilinear, body-fitted, structured multi-blocks mesh; 59 | - Adaptive Mesh Refinement, AMR model (under developing); 60 | - Blocks overlapping, overset (Chimera) model (to be developed in future); 61 | * Computational parallelism ability: 62 | - Domain decomposition by means of Message Passing Interface (MPI) paradigm providing the ability to use distributed-memory 63 | cluster facilities; 64 | - Fine, local parallelism by means of OpenMP paradigm providing the ability to use shared-memory cluster facilities; 65 | - Fine, local parallelism by means of GPU programming (e.g. CUDA framework) providing the ability to use GPUs cluster 66 | facilities (to be developed in future). 67 | 68 | ## Copyrights 69 | 70 | OFF is an open source project, it is distributed under the [GPL v3](http://www.gnu.org/licenses/gpl-3.0.html). Anyone is interest to use, to develop or to contribute to OFF is welcome. Take a look at the [contributing guidelines](CONTRIBUTING.md) for starting to contribute to the project. 71 | 72 | ## Documentation 73 | 74 | Detailed documentation can be found on the [GitHub pages](http://szaghi.github.com/OFF/index.html) of the project. 75 | -------------------------------------------------------------------------------- /src/Data_Type_Face.f90: -------------------------------------------------------------------------------- 1 | !> @ingroup DerivedType 2 | !> @{ 3 | !> @defgroup Data_Type_FaceDerivedType Data_Type_Face 4 | !> @} 5 | 6 | !> @ingroup PublicProcedure 7 | !> @{ 8 | !> @defgroup Data_Type_FacePublicProcedure Data_Type_Face 9 | !> @} 10 | 11 | !> @ingroup PrivateProcedure 12 | !> @{ 13 | !> @defgroup Data_Type_FacePrivateProcedure Data_Type_Face 14 | !> @} 15 | 16 | !> This module contains the definition of Type_Face and its procedures. 17 | !> @todo \b DocWriteRead: Complete the documentation of write and read functions 18 | module Data_Type_Face 19 | !----------------------------------------------------------------------------------------------------------------------------------- 20 | USE IR_Precision ! Integers and reals precision definition. 21 | USE Data_Type_BC ! Definition of Type_BC. 22 | USE Data_Type_Vector ! Definition of Type_Vector. 23 | !----------------------------------------------------------------------------------------------------------------------------------- 24 | 25 | !----------------------------------------------------------------------------------------------------------------------------------- 26 | implicit none 27 | private 28 | !----------------------------------------------------------------------------------------------------------------------------------- 29 | 30 | !----------------------------------------------------------------------------------------------------------------------------------- 31 | !> @brief Derived type containing (inter)face-level data. 32 | !> (Inter)face-level type contains data (mesh and boundary conditions) of interfaces numerical grid. 33 | !> @ingroup Data_Type_FaceDerivedType 34 | type, public:: Type_Face 35 | type(Type_Vector):: N !< Face normal versor. 36 | real(R8P):: S = 0._R8P !< Face area. 37 | type(Type_BC):: BC !< Boundary conditions. 38 | contains 39 | procedure:: init => init_face ! Procedure for initilizing allocatable variables. 40 | procedure:: free => free_face ! Procedure for freeing the memory of allocatable variables. 41 | endtype Type_Face 42 | !> @brief Pointer of Type_Face for creating array of pointers of Type_SFace. 43 | !> @ingroup Data_Type_FaceDerivedType 44 | type, public:: Type_Face_Ptr 45 | type(Type_Face), pointer:: p => null() 46 | endtype Type_Face_Ptr 47 | !----------------------------------------------------------------------------------------------------------------------------------- 48 | contains 49 | !> @ingroup Data_Type_FacePrivateProcedure 50 | !> @{ 51 | !> Subroutine for freeing dynamic data of Type_Face variables. 52 | elemental subroutine free_face(face) 53 | !--------------------------------------------------------------------------------------------------------------------------------- 54 | implicit none 55 | class(Type_Face), intent(INOUT):: face !< face data. 56 | !--------------------------------------------------------------------------------------------------------------------------------- 57 | 58 | !--------------------------------------------------------------------------------------------------------------------------------- 59 | call face%BC%free 60 | return 61 | !--------------------------------------------------------------------------------------------------------------------------------- 62 | endsubroutine free_face 63 | 64 | !> Subroutine for initializing dynamic data of Type_Face variables. 65 | elemental subroutine init_face(face,bc0) 66 | !--------------------------------------------------------------------------------------------------------------------------------- 67 | implicit none 68 | class(Type_Face), intent(INOUT):: face !< Cell data. 69 | type(Type_BC), intent(IN), optional:: bc0 !< Boundary conditions inizialization data. 70 | !--------------------------------------------------------------------------------------------------------------------------------- 71 | 72 | !--------------------------------------------------------------------------------------------------------------------------------- 73 | if (present(bc0)) then 74 | call face%BC%init(bc0=bc0) 75 | else 76 | call face%BC%init 77 | endif 78 | return 79 | !--------------------------------------------------------------------------------------------------------------------------------- 80 | endsubroutine init_face 81 | !> @} 82 | endmodule Data_Type_Face 83 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/readme.txt: -------------------------------------------------------------------------------- 1 | /** 2 | @page TWOD-RP 2D Example: Two dimensional Riemann problems 3 | 4 | How to simulate 2D Riemann Problems 5 | 6 | @section TWOD-RiemannP Two dimensional Riemann problems 7 | 8 | The examples reported here concern with 2D Riemann problems. The initial conditions are the same as the ones reported by Kurganov and Tadmor [\ref kurganov "1"]. 9 | A 2D quadrant [0,1]x[0,1] is subdivided into 4 sub-quadrants: 10 | 11 | @code 12 | ^ Y 13 | | 14 | 1 ----------------------------------- 15 | | | | 16 | | | | 17 | | | | 18 | | | | 19 | | (2) | (1) | 20 | | | | 21 | | | | 22 | | | | 23 | 0.5 ----------------------------------- 24 | | | | 25 | | | | 26 | | | | 27 | | | | 28 | | (3) | (4) | 29 | | | | 30 | | | | 31 | | | | X 32 | -------------------------------------> 33 | 0 0.5 1 34 | @endcode 35 | 36 | The initial conditions are imposed as following: 37 | 38 | @code 39 | |(p,r,u,v)(1) if x > 0.5 and y > 0.5 40 | |(p,r,u,v)(2) if x < 0.5 and y > 0.5 41 | (p,r,u,v)(0)=|(p,r,u,v)(3) if x < 0.5 and y < 0.5 42 | |(p,r,u,v)(4) if x > 0.5 and y < 0.5 43 | @endcode 44 | 45 | @section CONDITIONS Initial condition of the problems considered 46 | 47 | The Kurganov and Tadmor configurations considered are: 48 | 49 | @subsection kt-c03 Configuration 3: 50 | @code 51 | (p,r,u,v)(1) = (1.500,1.5000,0.000,0.000) 52 | (p,r,u,v)(2) = (0.300,0.5323,1.206,0.000) 53 | (p,r,u,v)(3) = (0.029,0.1380,1.206,1.206) 54 | (p,r,u,v)(4) = (0.300,0.5323,0.000,1.206) 55 | @endcode 56 | An example of solution is reported in figure \ref fig-kt-c03 "1". 57 | \anchor fig-kt-c03 \image html kt-c03-scaled-r.png "Figure 1: density profiles for t=0.3" 58 | 59 | @subsection kt-c04 Configuration 4: 60 | @code 61 | (p,r,u,v)(1) = (1.100,1.1000,0.0000,0.0000) 62 | (p,r,u,v)(2) = (0.350,0.5065,0.8939,0.0000) 63 | (p,r,u,v)(3) = (1.100,1.1000,0.8939,0.8939) 64 | (p,r,u,v)(4) = (0.350,0.5065,0.0000,0.8939) 65 | @endcode 66 | An example of solution is reported in figure \ref fig-kt-c04 "2". 67 | \anchor fig-kt-c04 \image html kt-c04-scaled-r.png "Figure 2: density profiles for t=0.3" 68 | 69 | @subsection kt-c05 Configuration 5: 70 | @code 71 | (p,r,u,v)(1) = (1.0,1.0,-0.75,-0.5) 72 | (p,r,u,v)(2) = (1.0,2.0,-0.75, 0.5) 73 | (p,r,u,v)(3) = (1.0,1.0, 0.75, 0.5) 74 | (p,r,u,v)(4) = (1.0,3.0, 0.75,-0.5) 75 | @endcode 76 | An example of solution is reported in figure \ref fig-kt-c05 "3". 77 | \anchor fig-kt-c05 \image html kt-c05-scaled-r.png "Figure 3: density profiles for t=0.3" 78 | 79 | @subsection kt-c06 Configuration 6: 80 | @code 81 | (p,r,u,v)(1) = (1.0,1.0, 0.75,-0.5) 82 | (p,r,u,v)(2) = (1.0,2.0, 0.75, 0.5) 83 | (p,r,u,v)(3) = (1.0,1.0,-0.75, 0.5) 84 | (p,r,u,v)(4) = (1.0,3.0,-0.75,-0.5) 85 | @endcode 86 | An example of solution is reported in figure \ref fig-kt-c06 "4". 87 | \anchor fig-kt-c06 \image html kt-c06-scaled-r.png "Figure 4: density profiles for t=0.3" 88 | 89 | @subsection kt-c12 Configuration 12: 90 | @code 91 | (p,r,u,v)(1) = (0.4,0.5313,0.0000,0.0000) 92 | (p,r,u,v)(2) = (1.0,1.0000,0.7276,0.0000) 93 | (p,r,u,v)(3) = (1.0,0.8000,0.0000,0.0000) 94 | (p,r,u,v)(4) = (1.0,1.0000,0.0000,0.7276) 95 | @endcode 96 | An example of solution is reported in figure \ref fig-kt-c12 "5". 97 | \anchor fig-kt-c12 \image html kt-c12-scaled-r.png "Figure 5: density profiles for t=0.3" 98 | 99 | @subsection kt-c17 Configuration 17: 100 | @code 101 | (p,r,u,v)(1) = (1.0,1.0000,0.0,-0.4000) 102 | (p,r,u,v)(2) = (1.0,2.0000,0.0,-0.3000) 103 | (p,r,u,v)(3) = (0.4,1.0625,0.0, 0.2145) 104 | (p,r,u,v)(4) = (0.4,0.5197,0.0,-1.1259) 105 | @endcode 106 | An example of solution is reported in figure \ref fig-kt-c17 "6". 107 | \anchor fig-kt-c17 \image html kt-c17-scaled-r.png "Figure 6: density profiles for t=0.3" 108 | 109 | @section rEFERENCES References 110 | 111 | \anchor kurganov [1] Kurganov, A. and Tadmor, E., Solution of Two Dimensional Riemann Problems for Gas Dynamics without Riemann Problem Solvers, Numerical Methods for Partial Differential Equations, vol. 18, n.5, 584--608, 2002. 112 | 113 | */ 114 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/pog/exact_sod-100-t02-block-split.dat: -------------------------------------------------------------------------------- 1 | VARIABLES="x" "r" "p" "u" 2 | ZONE T="Exact", I=51, J=1, K=1, DATAPACKING=BLOCK, VARLOCATION=([1]=NODAL,[2-4]=CELLCENTERED) 3 | 0 4 | 0.010 5 | 0.020 6 | 0.030 7 | 0.040 8 | 0.050 9 | 0.060 10 | 0.070 11 | 0.080 12 | 0.090 13 | 0.100 14 | 0.110 15 | 0.120 16 | 0.130 17 | 0.140 18 | 0.150 19 | 0.160 20 | 0.170 21 | 0.180 22 | 0.190 23 | 0.200 24 | 0.210 25 | 0.220 26 | 0.230 27 | 0.240 28 | 0.250 29 | 0.260 30 | 0.270 31 | 0.280 32 | 0.290 33 | 0.300 34 | 0.310 35 | 0.320 36 | 0.330 37 | 0.340 38 | 0.350 39 | 0.360 40 | 0.370 41 | 0.380 42 | 0.390 43 | 0.400 44 | 0.410 45 | 0.420 46 | 0.430 47 | 0.440 48 | 0.450 49 | 0.460 50 | 0.470 51 | 0.480 52 | 0.490 53 | 0.500 54 | 1 55 | 1 56 | 1 57 | 1 58 | 1 59 | 1 60 | 1 61 | 1 62 | 1 63 | 1 64 | 1 65 | 1 66 | 1 67 | 1 68 | 1 69 | 1 70 | 1 71 | 1 72 | 1 73 | 1 74 | 1 75 | 1 76 | 1 77 | 1 78 | 1 79 | 1 80 | 0.99235 81 | 0.959704 82 | 0.92611 83 | 0.893464 84 | 0.861744 85 | 0.830932 86 | 0.801008 87 | 0.771952 88 | 0.743745 89 | 0.716369 90 | 0.689805 91 | 0.664035 92 | 0.639041 93 | 0.614806 94 | 0.591311 95 | 0.56854 96 | 0.546477 97 | 0.525103 98 | 0.504404 99 | 0.484362 100 | 0.464963 101 | 0.44619 102 | 0.429486 103 | 0.426319 104 | 1 105 | 1 106 | 1 107 | 1 108 | 1 109 | 1 110 | 1 111 | 1 112 | 1 113 | 1 114 | 1 115 | 1 116 | 1 117 | 1 118 | 1 119 | 1 120 | 1 121 | 1 122 | 1 123 | 1 124 | 1 125 | 1 126 | 1 127 | 1 128 | 1 129 | 1 130 | 0.989322 131 | 0.944071 132 | 0.898132 133 | 0.854123 134 | 0.811975 135 | 0.771622 136 | 0.733001 137 | 0.696049 138 | 0.660705 139 | 0.62691 140 | 0.594608 141 | 0.563744 142 | 0.534263 143 | 0.506113 144 | 0.479245 145 | 0.453608 146 | 0.429156 147 | 0.405843 148 | 0.383624 149 | 0.362455 150 | 0.342296 151 | 0.323106 152 | 0.306293 153 | 0.30313 154 | 0 155 | 0 156 | 0 157 | 0 158 | 0 159 | 0 160 | 0 161 | 0 162 | 0 163 | 0 164 | 0 165 | 0 166 | 0 167 | 0 168 | 0 169 | 0 170 | 0 171 | 0 172 | 0 173 | 0 174 | 0 175 | 0 176 | 0 177 | 0 178 | 0 179 | 0 180 | 0.00910798 181 | 0.0485133 182 | 0.09018 183 | 0.131847 184 | 0.173513 185 | 0.21518 186 | 0.256847 187 | 0.298513 188 | 0.34018 189 | 0.381847 190 | 0.423513 191 | 0.46518 192 | 0.506847 193 | 0.548513 194 | 0.59018 195 | 0.631847 196 | 0.673513 197 | 0.71518 198 | 0.756847 199 | 0.798513 200 | 0.84018 201 | 0.881847 202 | 0.920089 203 | 0.927453 204 | ZONE T="Exact", I=51, J=1, K=1, DATAPACKING=BLOCK, VARLOCATION=([1]=NODAL,[2-4]=CELLCENTERED) 205 | 0.500 206 | 0.510 207 | 0.520 208 | 0.530 209 | 0.540 210 | 0.550 211 | 0.560 212 | 0.570 213 | 0.580 214 | 0.590 215 | 0.600 216 | 0.610 217 | 0.620 218 | 0.630 219 | 0.640 220 | 0.650 221 | 0.660 222 | 0.670 223 | 0.680 224 | 0.690 225 | 0.700 226 | 0.710 227 | 0.720 228 | 0.730 229 | 0.740 230 | 0.750 231 | 0.760 232 | 0.770 233 | 0.780 234 | 0.790 235 | 0.800 236 | 0.810 237 | 0.820 238 | 0.830 239 | 0.840 240 | 0.850 241 | 0.860 242 | 0.870 243 | 0.880 244 | 0.890 245 | 0.900 246 | 0.910 247 | 0.920 248 | 0.930 249 | 0.940 250 | 0.950 251 | 0.960 252 | 0.970 253 | 0.980 254 | 0.990 255 | 1 256 | 0.426319 257 | 0.426319 258 | 0.426319 259 | 0.426319 260 | 0.426319 261 | 0.426319 262 | 0.426319 263 | 0.426319 264 | 0.426319 265 | 0.426319 266 | 0.426319 267 | 0.426319 268 | 0.426319 269 | 0.426319 270 | 0.426319 271 | 0.426319 272 | 0.426319 273 | 0.426319 274 | 0.362021 275 | 0.265574 276 | 0.265574 277 | 0.265574 278 | 0.265574 279 | 0.265574 280 | 0.265574 281 | 0.265574 282 | 0.265574 283 | 0.265574 284 | 0.265574 285 | 0.265574 286 | 0.265574 287 | 0.265574 288 | 0.265574 289 | 0.265574 290 | 0.265574 291 | 0.125 292 | 0.125 293 | 0.125 294 | 0.125 295 | 0.125 296 | 0.125 297 | 0.125 298 | 0.125 299 | 0.125 300 | 0.125 301 | 0.125 302 | 0.125 303 | 0.125 304 | 0.125 305 | 0.125 306 | 0.30313 307 | 0.30313 308 | 0.30313 309 | 0.30313 310 | 0.30313 311 | 0.30313 312 | 0.30313 313 | 0.30313 314 | 0.30313 315 | 0.30313 316 | 0.30313 317 | 0.30313 318 | 0.30313 319 | 0.30313 320 | 0.30313 321 | 0.30313 322 | 0.30313 323 | 0.30313 324 | 0.30313 325 | 0.30313 326 | 0.30313 327 | 0.30313 328 | 0.30313 329 | 0.30313 330 | 0.30313 331 | 0.30313 332 | 0.30313 333 | 0.30313 334 | 0.30313 335 | 0.30313 336 | 0.30313 337 | 0.30313 338 | 0.30313 339 | 0.30313 340 | 0.30313 341 | 0.1 342 | 0.1 343 | 0.1 344 | 0.1 345 | 0.1 346 | 0.1 347 | 0.1 348 | 0.1 349 | 0.1 350 | 0.1 351 | 0.1 352 | 0.1 353 | 0.1 354 | 0.1 355 | 0.1 356 | 0.927453 357 | 0.927453 358 | 0.927453 359 | 0.927453 360 | 0.927453 361 | 0.927453 362 | 0.927453 363 | 0.927453 364 | 0.927453 365 | 0.927453 366 | 0.927453 367 | 0.927453 368 | 0.927453 369 | 0.927453 370 | 0.927453 371 | 0.927453 372 | 0.927453 373 | 0.927453 374 | 0.927453 375 | 0.927453 376 | 0.927453 377 | 0.927453 378 | 0.927453 379 | 0.927453 380 | 0.927453 381 | 0.927453 382 | 0.927453 383 | 0.927453 384 | 0.927453 385 | 0.927453 386 | 0.927453 387 | 0.927453 388 | 0.927453 389 | 0.927453 390 | 0.927453 391 | 0 392 | 0 393 | 0 394 | 0 395 | 0 396 | 0 397 | 0 398 | 0 399 | 0 400 | 0 401 | 0 402 | 0 403 | 0 404 | 0 405 | 0 406 | -------------------------------------------------------------------------------- /src/Data_Type_Cell.f90: -------------------------------------------------------------------------------- 1 | !> @ingroup DerivedType 2 | !> @{ 3 | !> @defgroup Data_Type_CellDerivedType Data_Type_Cell 4 | !> @} 5 | 6 | !> @ingroup PublicProcedure 7 | !> @{ 8 | !> @defgroup Data_Type_CellPublicProcedure Data_Type_Cell 9 | !> @} 10 | 11 | !> @ingroup PrivateProcedure 12 | !> @{ 13 | !> @defgroup Data_Type_CellPrivateProcedure Data_Type_Cell 14 | !> @} 15 | 16 | !> This module contains the definition of Type_Cell and its procedures. 17 | !> @todo \b DocWriteRead: Complete the documentation of write and read functions 18 | module Data_Type_Cell 19 | !----------------------------------------------------------------------------------------------------------------------------------- 20 | USE IR_Precision ! Integers and reals precision definition. 21 | USE Data_Type_Conservative ! Definition of Type_Conservative. 22 | USE Data_Type_Primitive ! Definition of Type_Primitive. 23 | USE Data_Type_Vector ! Definition of Type_Vector. 24 | !----------------------------------------------------------------------------------------------------------------------------------- 25 | 26 | !----------------------------------------------------------------------------------------------------------------------------------- 27 | implicit none 28 | private 29 | !----------------------------------------------------------------------------------------------------------------------------------- 30 | 31 | !----------------------------------------------------------------------------------------------------------------------------------- 32 | !> @brief Derived type containing cell-level data. 33 | !> Cell-level type contains data (mesh, boundary conditions and fluid dynamic data) of each cell of the numerical grid. 34 | !> @ingroup Data_Type_CellDerivedType 35 | type, public:: Type_Cell 36 | real(R8P):: V = 0._R8P !< Cell volume. 37 | type(Type_Vector):: cent !< Cell center coordinates. 38 | real(R8P):: Dt = 0._R8P !< Local time step. 39 | type(Type_Primitive):: P !< Primitive variables. 40 | type(Type_Conservative):: U !< Conservative variables. 41 | type(Type_Conservative), allocatable:: KS(:) !< Runge-Kutta stages of conservative variables [1:rk_ord]. 42 | contains 43 | procedure:: init => init_cell ! Procedure for initilizing allocatable variables. 44 | procedure:: free => free_cell ! Procedure for freeing the memory of allocatable variables. 45 | endtype Type_Cell 46 | !> @brief Pointer of Type_SCell for creating array of pointers of Type_SCell. 47 | !> @ingroup Data_Type_CellDerivedType 48 | type, public:: Type_Cell_Ptr 49 | type(Type_Cell), pointer:: p => null() 50 | endtype Type_Cell_Ptr 51 | !----------------------------------------------------------------------------------------------------------------------------------- 52 | contains 53 | !> @ingroup Data_Type_CellPrivateProcedure 54 | !> @{ 55 | !> Subroutine for freeing dynamic data of Type_Cell variables. 56 | elemental subroutine free_cell(cell) 57 | !--------------------------------------------------------------------------------------------------------------------------------- 58 | implicit none 59 | class(Type_Cell), intent(INOUT):: cell !< Cell data. 60 | !--------------------------------------------------------------------------------------------------------------------------------- 61 | 62 | !--------------------------------------------------------------------------------------------------------------------------------- 63 | call cell%P%free 64 | call cell%U%free 65 | if (allocated(cell%KS)) deallocate(cell%KS) 66 | return 67 | !--------------------------------------------------------------------------------------------------------------------------------- 68 | endsubroutine free_cell 69 | 70 | !> Subroutine for initializing dynamic data of Type_Cell variables. 71 | elemental subroutine init_cell(cell,Ns,prim0,cons0,rk_ord) 72 | !--------------------------------------------------------------------------------------------------------------------------------- 73 | implicit none 74 | class(Type_Cell), intent(INOUT):: cell !< Cell data. 75 | integer(I_P), intent(IN), optional:: Ns !< Number of species. 76 | type(Type_Primitive), intent(IN), optional:: prim0 !< Primitive inizialization data. 77 | type(Type_Conservative), intent(IN), optional:: cons0 !< Conservative inizialization data. 78 | integer(I1P), intent(IN):: rk_ord !< Number of Runge-Kutta stages. 79 | !--------------------------------------------------------------------------------------------------------------------------------- 80 | 81 | !--------------------------------------------------------------------------------------------------------------------------------- 82 | if (allocated(cell%KS)) deallocate(cell%KS) ; allocate(cell%KS(1:rk_ord)) 83 | if (present(cons0)) then 84 | call cell%U%init(cons0=cons0) 85 | call cell%KS%init(cons0=cons0) 86 | elseif (present(Ns)) then 87 | call cell%U%init(Ns=Ns) 88 | call cell%KS%init(Ns=Ns) 89 | endif 90 | if (present(prim0)) then 91 | call cell%P%init(prim0=prim0) 92 | elseif (present(Ns)) then 93 | call cell%P%init(Ns=Ns) 94 | endif 95 | return 96 | !--------------------------------------------------------------------------------------------------------------------------------- 97 | endsubroutine init_cell 98 | !> @} 99 | endmodule Data_Type_Cell 100 | -------------------------------------------------------------------------------- /src/Lib_Profiling.f90: -------------------------------------------------------------------------------- 1 | !> @ingroup Library 2 | !> @{ 3 | !> @defgroup Lib_ProfilingLibrary Lib_Profiling 4 | !> @} 5 | 6 | !> @ingroup PrivateVarPar 7 | !> @{ 8 | !> @defgroup Lib_ProfilingPrivateVarPar Lib_Profiling 9 | !> @} 10 | 11 | !> @ingroup PublicProcedure 12 | !> @{ 13 | !> @defgroup Lib_ProfilingPublicProcedure Lib_Profiling 14 | !> @} 15 | 16 | !> This module contains procedures and data for profiling parts of the code. 17 | !> This is a library module. 18 | !> @ingroup Lib_ProfilingLibrary 19 | module Lib_Profiling 20 | !----------------------------------------------------------------------------------------------------------------------------------- 21 | USE IR_Precision ! Integers and reals precision definition. 22 | USE Data_Type_Time ! Definition of Type_Time. 23 | USE Lib_IO_Misc ! Procedures for IO and strings operations. 24 | USE Lib_Parallel, only: Nthreads,Nproc ! Number of threads and procs. 25 | !----------------------------------------------------------------------------------------------------------------------------------- 26 | 27 | !----------------------------------------------------------------------------------------------------------------------------------- 28 | implicit none 29 | save 30 | private 31 | public:: profile 32 | !----------------------------------------------------------------------------------------------------------------------------------- 33 | 34 | !----------------------------------------------------------------------------------------------------------------------------------- 35 | !> @ingroup Lib_ProfilingPrivateVarPar 36 | !> @{ 37 | !real(R8P):: instant0 = 0._R8P !< The Crono starting instant used for profing the code. 38 | integer(I8P):: instant0 = 0_I8P !< The Crono starting instant used for profing the code. 39 | integer(I_P):: Npp = 0_I_P !< Number of parts of the code profiled. 40 | !real(R8P), allocatable:: partial(:,:) !< Partial times used for profing the code [1:2,1:Npp]. 41 | integer(I8P), allocatable:: partial(:,:) !< Partial times used for profing the code [1:2,1:Npp]. 42 | integer(I_P), allocatable:: unitprofile(:) !< Logic units for profiling files [1:Npp]. 43 | integer(I_P), allocatable:: tictoc(:) !< Counter of files access [1:Npp]. 44 | integer(I_P):: pp = 0_I_P !< Index of current profiled part of the code. 45 | !> @} 46 | !----------------------------------------------------------------------------------------------------------------------------------- 47 | contains 48 | !> @brief Subroutine for profiling the code. 49 | !> @ingroup Lib_ProfilingPublicProcedure 50 | subroutine profile(Np,fnamep,header,p,pstart,pstop,finalize,myrank) 51 | !--------------------------------------------------------------------------------------------------------------------------------- 52 | implicit none 53 | integer(I_P), intent(IN), optional:: Np !< Number of parts of the code profiled. Initializing the profiling if passed. 54 | character(*), intent(IN), optional:: fnamep !< Prefix name of profiling files: can be passed only with Np. 55 | character(*), intent(IN), optional:: header(:) !< Headers of profiling files: can be passed only with Np. 56 | integer(I_P), intent(IN), optional:: p !< Number of part of the code currently profiled. 57 | logical, intent(IN), optional:: pstart !< Flag for start the profiling of the current profiled part of the code. 58 | logical, intent(IN), optional:: pstop !< Flag for stop the profiling of the current profiled part of the code. 59 | logical, intent(IN), optional:: finalize !< Flag for finilizing the profiling of the code. 60 | integer(I_P), intent(IN):: myrank !< Current rank process. 61 | integer(I_P):: u !< Unit files counter. 62 | !--------------------------------------------------------------------------------------------------------------------------------- 63 | 64 | !--------------------------------------------------------------------------------------------------------------------------------- 65 | if (present(Np)) then ! the profiling is starting 66 | Npp = Np 67 | !if (allocated(partial )) deallocate(partial ) ; allocate(partial(1:2,1:Np)) ; partial = 0._R8P 68 | if (allocated(partial )) deallocate(partial ) ; allocate(partial(1:2,1:Np)) ; partial = 0_I8P 69 | if (allocated(unitprofile)) deallocate(unitprofile) ; allocate(unitprofile(1:Np)) ; unitprofile = 0_I_P 70 | if (allocated(tictoc )) deallocate(tictoc ) ; allocate(tictoc( 1:Np)) ; tictoc = 0_I_P 71 | !instant0 = Crono(start=.true.) 72 | call system_clock(instant0) 73 | do u=1,Np 74 | if (present(fnamep)) then 75 | open(unit=Get_Unit(unitprofile(u)),file=trim(fnamep)//'-'//trim(strz(3,u))//'.p'//trim(strz(3,myrank))//'.dat') 76 | else 77 | open(unit=Get_Unit(unitprofile(u)),file='profiling-'//trim(strz(3,u))//'.p'//trim(strz(3,myrank))//'.dat') 78 | endif 79 | write(unitprofile(u),'(A)')'VARIABLES="Nthreads" "Nprocs" "TicToc" "Time Consumed"' 80 | if (present(header)) write(unitprofile(u),'(A)')trim(header(u)) 81 | enddo 82 | else 83 | if (present(pstart)) then 84 | if (present(p)) pp = p 85 | !partial(1,pp) = Crono() 86 | call system_clock(partial(1,pp)) 87 | tictoc(pp) = tictoc(pp) + 1_I_P 88 | elseif (present(pstop)) then 89 | if (present(p)) pp = p 90 | !partial(2,pp) = Crono(instant1=partial(1,pp)) 91 | call system_clock(partial(2,pp)) ; partial(2,pp) = partial(2,pp) - partial(1,pp) 92 | write(unitprofile(pp),'(A)')trim(str(n=Nthreads))//' '//trim(str(n=Nproc))//' '//& 93 | trim(str(n=tictoc(pp)))//' '//trim(str(n=partial(2,pp))) 94 | pp = pp + 1 ; if (pp > Npp) pp = 1_I_P 95 | elseif (present(finalize)) then 96 | do u=1,Npp 97 | close(unitprofile(u)) 98 | enddo 99 | if (allocated(partial)) deallocate(partial) 100 | if (allocated(unitprofile)) deallocate(unitprofile) 101 | endif 102 | endif 103 | return 104 | !--------------------------------------------------------------------------------------------------------------------------------- 105 | endsubroutine profile 106 | endmodule Lib_Profiling 107 | -------------------------------------------------------------------------------- /src/Data_Type_OS.f90: -------------------------------------------------------------------------------- 1 | !> @ingroup DerivedType 2 | !> @{ 3 | !> @defgroup Data_Type_OSDerivedType Data_Type_OS 4 | !> @} 5 | 6 | !> @ingroup GlobalVarPar 7 | !> @{ 8 | !> @defgroup Data_Type_OSGlobalVarPar Data_Type_OS 9 | !> @} 10 | 11 | !> @ingroup PrivateProcedure 12 | !> @{ 13 | !> @defgroup Data_Type_OSPrivateProcedure Data_Type_OS 14 | !> @} 15 | 16 | !> This module contains the definition of Type_OS and its procedures. 17 | !> This derived type has useful parameters for performing system calls. 18 | !> @bug MS Windows directory separator's documentation: \n The documentation of variable "win_sep" containing MS Windows 19 | !> directory separator must be skipped because doxygen produces error 20 | !> with "\" character. 21 | module Data_Type_OS 22 | !----------------------------------------------------------------------------------------------------------------------------------- 23 | USE IR_Precision ! Integers and reals precision definition. 24 | USE, intrinsic:: ISO_FORTRAN_ENV, only: stderr => ERROR_UNIT ! Standard output/error logical units. 25 | #ifdef MPI2 26 | USE MPI ! MPI runtime library. 27 | #endif 28 | !----------------------------------------------------------------------------------------------------------------------------------- 29 | 30 | !----------------------------------------------------------------------------------------------------------------------------------- 31 | implicit none 32 | private 33 | public:: uix_id, c_uix_id, uix_sep, uix_remove, uix_copy, uix_mkdir 34 | public:: win_id, c_win_id, win_sep, win_remove, win_copy, win_mkdir 35 | !----------------------------------------------------------------------------------------------------------------------------------- 36 | 37 | !----------------------------------------------------------------------------------------------------------------------------------- 38 | !> @ingroup Data_Type_OSGlobalVarPar 39 | !> @{ 40 | character(3), parameter:: c_uix_id = "UIX" !< Unix/Linux string identifier. 41 | integer(I1P), parameter:: uix_id = 1_I1P !< Unix/Linux identifier. 42 | character(1), parameter:: uix_sep = "/" !< Unix/Linux directories separator. 43 | character(2), parameter:: uix_remove = "rm" !< Unix/Linux remove command. 44 | character(2), parameter:: uix_copy = "cp" !< Unix/Linux copy command. 45 | character(5), parameter:: uix_mkdir = "mkdir" !< Unix/Linux make dir command. 46 | character(3), parameter:: c_win_id = "WIN" !< MS Windows string identifier. 47 | integer(I1P), parameter:: win_id = 2_I1P !< MS Windows identifier. 48 | #ifndef DOXYGEN_SKIP 49 | character(1), parameter:: win_sep = char(92) !< MS Windows directories separator. 50 | #endif 51 | character(3), parameter:: win_remove = "del" !< MS Windows remove command. 52 | character(4), parameter:: win_copy = "copy" !< MS Windows copy command. 53 | character(5), parameter:: win_mkdir = "mkdir" !< MS Windows make dir command. 54 | !> @} 55 | !> @brief Derived type contains useful parameters for performing portable system calls. 56 | !> @note By default the Unix/Linux initalization is used. 57 | !> @ingroup Data_Type_OSDerivedType 58 | type, public:: Type_OS 59 | integer(I1P):: id = uix_id !< OS id. 60 | character(1):: sep = uix_sep !< OS directories separator. 61 | character(3):: remove = uix_remove !< OS remove command. 62 | character(4):: copy = uix_copy !< OS copy command. 63 | character(5):: mkdir = uix_mkdir !< OS make dir command. 64 | contains 65 | procedure:: init ! Procedure for initializing Type_OS. 66 | endtype Type_OS 67 | !----------------------------------------------------------------------------------------------------------------------------------- 68 | contains 69 | !> @brief Subroutine for initializing Type_OS. 70 | !> @ingroup Data_Type_OSPrivateProcedure 71 | subroutine init(OS,myrank,id,c_id) 72 | !--------------------------------------------------------------------------------------------------------------------------------- 73 | implicit none 74 | class(Type_OS), intent(INOUT):: OS !< Output OS. 75 | integer(I_P), intent(IN), optional:: myrank !< Actual rank process. 76 | integer(I1P), intent(IN), optional:: id !< OS id parameter (integer). 77 | character(*), intent(IN), optional:: c_id !< OS id parameter (string). 78 | character(DI_P):: rks !< String containing myrank. 79 | #ifdef MPI2 80 | integer(I_P):: err !< Error trapping flag: 0 no errors, >0 error occurs. 81 | #endif 82 | !--------------------------------------------------------------------------------------------------------------------------------- 83 | 84 | !--------------------------------------------------------------------------------------------------------------------------------- 85 | rks = 'rank'//trim(str(.true.,0_I_P)) ; if (present(myrank)) rks = 'rank'//trim(str(.true.,myrank)) 86 | if (present(id)) then 87 | OS%id = id 88 | select case(id) 89 | case(uix_id) 90 | OS%sep = uix_sep 91 | OS%remove = uix_remove 92 | OS%copy = uix_copy 93 | OS%mkdir = uix_mkdir 94 | case(win_id) 95 | OS%sep = win_sep 96 | OS%remove = win_remove 97 | OS%copy = win_copy 98 | OS%mkdir = win_mkdir 99 | case default 100 | write(stderr,'(A)')trim(rks)//' OS id not recognized!' 101 | write(stderr,'(A)')trim(rks)//' Valid integer id are:' 102 | write(stderr,'(A)')trim(rks)//' "'//trim(str(.true.,uix_id))//'" for *nix OS' 103 | write(stderr,'(A)')trim(rks)//' "'//trim(str(.true.,win_id))//'" for Windows OS' 104 | #ifdef MPI2 105 | call MPI_FINALIZE(err) 106 | #endif 107 | stop 108 | endselect 109 | elseif (present(c_id)) then 110 | select case(c_id) 111 | case(c_uix_id) 112 | OS%id = uix_id 113 | OS%sep = uix_sep 114 | OS%remove = uix_remove 115 | OS%copy = uix_copy 116 | OS%mkdir = uix_mkdir 117 | case(c_win_id) 118 | OS%id = win_id 119 | OS%sep = win_sep 120 | OS%remove = win_remove 121 | OS%copy = win_copy 122 | OS%mkdir = win_mkdir 123 | case default 124 | write(stderr,'(A)')trim(rks)//' OS id not recognized!' 125 | write(stderr,'(A)')trim(rks)//' Valid charcter id are:' 126 | write(stderr,'(A)')trim(rks)//' "'//c_uix_id//'" for *nix OS' 127 | write(stderr,'(A)')trim(rks)//' "'//c_win_id//'" for Windows OS' 128 | #ifdef MPI2 129 | call MPI_FINALIZE(err) 130 | #endif 131 | stop 132 | endselect 133 | endif 134 | return 135 | !--------------------------------------------------------------------------------------------------------------------------------- 136 | endsubroutine init 137 | endmodule Data_Type_OS 138 | -------------------------------------------------------------------------------- /doc/off-layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /examples/1D/shock_tube/SOD/readme.txt: -------------------------------------------------------------------------------- 1 | /** 2 | @page SOD 1D Example: SOD shock tube 3 | 4 | How to simulate 1D SOD shock tube problem 5 | 6 | @section RiemannP Riemann Problem definition 7 | 8 | A shock tube test consists in a one dimensional Riemann Problem with non reflective boundary conditions. A Riemann Problem could be defined as following. Assuming that the conservation laws \f$ \frac{\partial }{{\partial t}}\int\limits_{{V_{ijk}}} {\overrightarrow U d{V_{ijk}}} = R\left( {\overrightarrow U } \right) \f$ in the space domain [0,1], are coupled with the following initial conditions: 9 | 10 | \f$ U\left( {x,t = 0} \right) = {U_0}\left( x \right) = \left\{ \begin{array}{l} {U_L}\,x < x_0\\ {U_R}\,x > x_0 \end{array} \right. \f$ \n 11 | where \f$U_L\f$ and \f$U_R\f$ are two constant values of the conservative variables and \f$x_0\f$ is the abscissa of the interface, the Riemann Problem can be defined as a partial derivative problem coupled with a piecewise constant initial conditions having a single discontinuity. Solving a Riemann Problem consists to find the time evolution, according to the conservative laws, of the discontinuity on the initial conditions. The structure of the solution of the Riemann Problem for the Euler conservation is composed by three waves. The middle wave (traveling along \f$v\f$) is always a contact discontinuity while the left and right waves (traveling along \f$v \pm a\f$, being \f$a=\sqrt{\frac{\gamma p}{\rho}}\f$ the speed of sound) are the non-linear acoustic waves and they can be either a shocks or rarefactions. Therefore there are four possible wave patterns. 12 | 13 | @section SodST Sod's shock tube 14 | 15 | The Sod's shock tube is defined (in terms of primitive variables, \ref data_type_primitive::type_primitive "see definition of primitive derived type") as: 16 | 17 | - Left state: \f$P_L = \left[ {\begin{array}{*{20}{c}} \rho \\ {v}\\ {p} \end{array}} \right]=\left[ {\begin{array}{*{20}{c}} 1 \\ 0\\ 1 \end{array}} \right]\f$ 18 | - Right state: \f$P_R = \left[ {\begin{array}{*{20}{c}} \rho \\ {v}\\ {p} \end{array}} \right]=\left[ {\begin{array}{*{20}{c}} 0.125 \\ 0\\ 0.1 \end{array}} \right]\f$ 19 | 20 | After the rupture of the initial discontinuity the solution consists in a shock moving to the right, a rarefaction fan moving to left and a contact discontinuity, moving to the right, separating the left and right states. 21 | 22 | @section Compiling the codes 23 | 24 | Before running this example the IBM, @off and POG codes must be properly compiled. 25 | 26 | For more details see \ref Compiling "Compiling Instructions". In the following subsections few guidelines are provided. 27 | @subsection CompIBM Compiling IBM 28 | 29 | IBM, necessary for building up the initial and boundary conditions and the mesh, could be compiled without any particular options: 30 | @code 31 | make IBM DEBUG=no OPTIMIZE=yes 32 | make clean 33 | @endcode 34 | 35 | @subsection CompOFF Compiling OFF 36 | @off must be compiled with NULj=yes NULk=yes in order to perform a correct 1D simulation. It is possible to compile serial or parallel code: 37 | 38 | For serial code: 39 | @code 40 | make OFF DEBUG=no OPTIMIZE=yes NULj=yes NULk=yes 41 | make clean 42 | @endcode 43 | For multi-processes/multi-threads code: 44 | @code 45 | make OFF DEBUG=no OPTIMIZE=yes NULj=yes NULk=yes OPENMP=yes MPI=yes 46 | make clean 47 | @endcode 48 | 49 | @subsection CompPOG Compiling POG 50 | POG must be compiled with NULj=yes NULk=yes in order to perform a correct 1D post-process. It is possible to compile serial or parallel (only multi-threads) code: 51 | 52 | For serial code: 53 | @code 54 | make POG DEBUG=no OPTIMIZE=yes NULj=yes NULk=yes 55 | make clean 56 | @endcode 57 | For multi-threads code: 58 | @code 59 | make OFF DEBUG=no OPTIMIZE=yes NULj=yes NULk=yes OPENMP=yes 60 | make clean 61 | @endcode 62 | @note If binary Tecplot output is wanted also the option TECIO=yes must be passed. 63 | 64 | @section RunSod Running the Sod's shock tube example 65 | 66 | To run the Sod's shock tube test enter the following directory: 67 | @code 68 | cd examples/1D/shock_tube/SOD/ 69 | @endcode 70 | There are 3 sub-directories: 71 | - ibm 72 | - off 73 | - pog 74 | 75 | Into each of the above directories there is a bash script, run_[IBM,OFF,POG].sh that help you to complete the simulation. Moreover there are the necessary option files to run each code. 76 | 77 | To complete the simulation you must follow 3 steps in the prescribed order: 78 | - Building initial and boundary conditions and mesh. Into \em ibm directory there are 6 ascii input files with extension .dat, one symbolic link to IBM code previously compiled, and the script run_IBM.sh. The latter script has one command line argument. If it is invoked without arguments it prints a help message. The command line argument is necessary to distinguish serial simulation from multi-processes one: 79 | @code 80 | cd ibm 81 | @endcode 82 | - For serial simulation: 83 | @code 84 | run_IBM.sh -no_mpi 85 | @endcode 86 | - For multi-processes (MPI) simulation: 87 | @code 88 | run_IBM.sh -mpi 89 | @endcode 90 | The above commands will produce the correct input for @off. The produced files are placed into \em output directory inside ibm one. Exit from ibm directory: @code cd ../@endcode 91 | - Running @off. off directory contains 2 symbolic link, one to ../ibm/output and one to OFF code previously compiled. There are also an ascii file \em off_options.dat containing the main options for @off and a bash script run_OFF.sh. The latter script is similar to previous run_IBM.sh. If it is invoked without arguments it prints a help message. The command line argument is necessary to distinguish serial simulation from multi-processes one: 92 | @code 93 | cd off 94 | @endcode 95 | - For serial simulation: 96 | @code 97 | run_OFF.sh -no_mpi 98 | @endcode 99 | - For multi-processes (MPI) simulation: 100 | @code 101 | run_OFF.sh -mpi 102 | @endcode 103 | The above commands will perform the simulation. The produced files are placed into \em output directory inside off one. Exit from off directory: @code cd ../@endcode 104 | - Post-processing the simulation, running POG. The pog directory contains 2 symbolic link, one to ../off/output and one to POG code previously compiled. There is also a bash script run_POG.sh. If it is invoked without arguments it prints a help message. The command line argument is necessary to distinguish VTK post-processing to Tecplot one: 105 | @code 106 | cd pog 107 | @endcode 108 | - For Tecplot post-processing: 109 | @code 110 | run_POG.sh -tec 111 | @endcode 112 | - For VTK post-processing: 113 | @code 114 | run_POG.sh -vtk 115 | @endcode 116 | The above commands will post-process the simulation results. The produced files are placed into \em output directory inside pog one. Exit from pog directory: @code cd ../@endcode 117 | 118 | 119 | */ 120 | -------------------------------------------------------------------------------- /src/Lib_Thermodynamic_Laws_Ideal.f90: -------------------------------------------------------------------------------- 1 | !> @ingroup Library 2 | !> @{ 3 | !> @defgroup Lib_Thermodynamic_Laws_IdealLibrary Lib_Thermodynamic_Laws_Ideal 4 | !> @} 5 | 6 | !> @ingroup PublicProcedure 7 | !> @{ 8 | !> @defgroup Lib_Thermodynamic_Laws_IdealPublicProcedure Lib_Thermodynamic_Laws_Ideal 9 | !> @} 10 | 11 | !> This module contains the definition of Thermodynamic Laws for ideal calorically perfect gas. 12 | !> @ingroup Lib_Thermodynamic_Laws_IdealLibrary 13 | module Lib_Thermodynamic_Laws_Ideal 14 | !----------------------------------------------------------------------------------------------------------------------------------- 15 | USE IR_Precision ! Definition of integers and reals precision. 16 | !----------------------------------------------------------------------------------------------------------------------------------- 17 | 18 | !----------------------------------------------------------------------------------------------------------------------------------- 19 | implicit none 20 | private 21 | public:: p 22 | public:: r 23 | public:: a 24 | public:: E 25 | public:: H 26 | !----------------------------------------------------------------------------------------------------------------------------------- 27 | contains 28 | !> @ingroup Lib_Thermodynamic_Laws_IdealPublicProcedure 29 | !> @{ 30 | !> Function for computing the pressure for an ideal calorically perfect gas. 31 | elemental function p(r,a,g) result(pressure) 32 | !--------------------------------------------------------------------------------------------------------------------------------- 33 | implicit none 34 | real(R_P), intent(IN):: r !< Density (\f$\rho\f$). 35 | real(R_P), intent(IN):: a !< Speed of sound. 36 | real(R_P), intent(IN):: g !< Specific heats ratio \f$\gamma=\frac{{c_p}}{{c_v}}\f$. 37 | real(R_P) pressure !< Pressure. 38 | !--------------------------------------------------------------------------------------------------------------------------------- 39 | 40 | !--------------------------------------------------------------------------------------------------------------------------------- 41 | pressure = r*a*a/g 42 | return 43 | !--------------------------------------------------------------------------------------------------------------------------------- 44 | endfunction p 45 | 46 | !> Function for computing the density for an ideal calorically perfect gas. 47 | elemental function r(p,a,g) result(density) 48 | !--------------------------------------------------------------------------------------------------------------------------------- 49 | implicit none 50 | real(R_P), intent(IN):: p !< Pressure. 51 | real(R_P), intent(IN):: a !< Speed of sound. 52 | real(R_P), intent(IN):: g !< Specific heats ratio \f$\gamma=\frac{{c_p}}{{c_v}}\f$. 53 | real(R_P) density !< Density (\f$\rho\f$). 54 | !--------------------------------------------------------------------------------------------------------------------------------- 55 | 56 | !--------------------------------------------------------------------------------------------------------------------------------- 57 | density = g*p/(a*a) 58 | return 59 | !--------------------------------------------------------------------------------------------------------------------------------- 60 | endfunction r 61 | 62 | !> Function for computing the speed of sound for an ideal calorically perfect gas. 63 | elemental function a(p,r,g) result(ss) 64 | !--------------------------------------------------------------------------------------------------------------------------------- 65 | implicit none 66 | real(R_P), intent(IN):: p !< Pressure. 67 | real(R_P), intent(IN):: r !< Density (\f$\rho\f$). 68 | real(R_P), intent(IN):: g !< Specific heats ratio \f$\gamma=\frac{{c_p}}{{c_v}}\f$. 69 | real(R_P) ss !< Speed of sound. 70 | !--------------------------------------------------------------------------------------------------------------------------------- 71 | 72 | !--------------------------------------------------------------------------------------------------------------------------------- 73 | ss = sqrt(g*p/r) 74 | return 75 | !--------------------------------------------------------------------------------------------------------------------------------- 76 | endfunction a 77 | 78 | !> Function for computing the total specific energy (per unit of mass) for an ideal calorically perfect gas. 79 | !> @note This law is defined as: \n 80 | !> \f$ E = \frac{p}{{\left( {\gamma - 1} \right)\rho }} + \frac{{u^2 }}{2} \f$ 81 | elemental function E(p,r,u,g) result(energy) 82 | !--------------------------------------------------------------------------------------------------------------------------------- 83 | implicit none 84 | real(R_P), intent(IN):: p !< Pressure. 85 | real(R_P), intent(IN):: r !< Density (\f$\rho\f$). 86 | real(R_P), intent(IN):: u !< Module of velocity vector. 87 | real(R_P), intent(IN):: g !< Specific heats ratio \f$\gamma=\frac{{c_p}}{{c_v}}\f$. 88 | real(R_P) energy !< Total specific energy (per unit of mass). 89 | !--------------------------------------------------------------------------------------------------------------------------------- 90 | 91 | !--------------------------------------------------------------------------------------------------------------------------------- 92 | energy = p/((g-1._R_P)*r)+0.5_R_P*u*u 93 | return 94 | !--------------------------------------------------------------------------------------------------------------------------------- 95 | endfunction E 96 | 97 | !> Function for computing the total specific entalpy (per unit of mass) for an ideal calorically perfect gas. 98 | !> @note This law is defined as: \n 99 | !> \f$ H = \frac{{\gamma p}}{{\left( {\gamma - 1} \right)\rho }} + \frac{{u^2 }}{2} \f$ 100 | elemental function H(p,r,u,g) result(entalpy) 101 | !--------------------------------------------------------------------------------------------------------------------------------- 102 | implicit none 103 | real(R_P), intent(IN):: p !< Pressure. 104 | real(R_P), intent(IN):: r !< Density (\f$\rho\f$). 105 | real(R_P), intent(IN):: u !< Module of velocity vector. 106 | real(R_P), intent(IN):: g !< Specific heats ratio \f$\gamma=\frac{{c_p}}{{c_v}}\f$. 107 | real(R_P) entalpy !< Total specific entalpy (per unit of mass). 108 | !--------------------------------------------------------------------------------------------------------------------------------- 109 | 110 | !--------------------------------------------------------------------------------------------------------------------------------- 111 | entalpy = g*p/((g-1._R_P)*r)+0.5_R_P*u*u 112 | return 113 | !--------------------------------------------------------------------------------------------------------------------------------- 114 | endfunction H 115 | !> @} 116 | endmodule Lib_Thermodynamic_Laws_Ideal 117 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c03/ibm/input/blocks_description.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 4 Nb = number of blocks 5 | 6 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.5d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'ADJ' 2 face(1) = left i boundary condition 11 | 'EXT' 0 face(2) = right i boundary condition 12 | 'ADJ' 4 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.5d0 r1 = density of species 1 17 | 0.d0 u = 1st velocity component 18 | 0.d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.5d0 p = pressure 21 | 1.5d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'EXT' 0 face(1) = left i boundary condition 29 | 'ADJ' 1 face(2) = right i boundary condition 30 | 'ADJ' 3 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 0.5323d0 r1 = density of species 1 35 | 1.206d0 u = 1st velocity component 36 | 0.d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 0.3d0 p = pressure 39 | 0.5323d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | 42 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 43 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 44 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 45 | 0.5d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 46 | 'EXT' 0 face(1) = left i boundary condition 47 | 'ADJ' 4 face(2) = right i boundary condition 48 | 'EXT' 0 face(3) = left j boundary condition 49 | 'ADJ' 2 face(4) = right j boundary condition 50 | 'EXT' 0 face(5) = left k boundary condition 51 | 'EXT' 0 face(6) = right k boundary condition 52 | 0.138d0 r1 = density of species 1 53 | 1.206d0 u = 1st velocity component 54 | 1.206d0 v = 2nd velocity component 55 | 0.d0 w = 3rd velocity component 56 | 0.029d0 p = pressure 57 | 0.138d0 r=sum(rs) = density 58 | 1.4d0 g = specific heats ratio 59 | 60 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 61 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 62 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 63 | 1.d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 64 | 'ADJ' 3 face(1) = left i boundary condition 65 | 'EXT' 0 face(2) = right i boundary condition 66 | 'EXT' 0 face(3) = left j boundary condition 67 | 'ADJ' 1 face(4) = right j boundary condition 68 | 'EXT' 0 face(5) = left k boundary condition 69 | 'EXT' 0 face(6) = right k boundary condition 70 | 0.5323d0 r1 = density of species 1 71 | 0.d0 u = 1st velocity component 72 | 1.206d0 v = 2nd velocity component 73 | 0.d0 w = 3rd velocity component 74 | 0.3d0 p = pressure 75 | 0.5323d0 r=sum(rs) = density 76 | 1.4d0 g = specific heats ratio 77 | ----------------------------------------------------------------------------------------------------------------------------------- 78 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c04/ibm/input/blocks_description.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 4 Nb = number of blocks 5 | 6 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.5d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'ADJ' 2 face(1) = left i boundary condition 11 | 'EXT' 0 face(2) = right i boundary condition 12 | 'ADJ' 4 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.1d0 r1 = density of species 1 17 | 0.d0 u = 1st velocity component 18 | 0.d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.1d0 p = pressure 21 | 1.1d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'EXT' 0 face(1) = left i boundary condition 29 | 'ADJ' 1 face(2) = right i boundary condition 30 | 'ADJ' 3 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 0.5065d0 r1 = density of species 1 35 | 0.8939d0 u = 1st velocity component 36 | 0.d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 0.35d0 p = pressure 39 | 0.5065d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | 42 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 43 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 44 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 45 | 0.5d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 46 | 'EXT' 0 face(1) = left i boundary condition 47 | 'ADJ' 4 face(2) = right i boundary condition 48 | 'EXT' 0 face(3) = left j boundary condition 49 | 'ADJ' 2 face(4) = right j boundary condition 50 | 'EXT' 0 face(5) = left k boundary condition 51 | 'EXT' 0 face(6) = right k boundary condition 52 | 1.1d0 r1 = density of species 1 53 | 0.8939d0 u = 1st velocity component 54 | 0.8939d0 v = 2nd velocity component 55 | 0.d0 w = 3rd velocity component 56 | 1.1d0 p = pressure 57 | 1.1d0 r=sum(rs) = density 58 | 1.4d0 g = specific heats ratio 59 | 60 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 61 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 62 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 63 | 1.d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 64 | 'ADJ' 3 face(1) = left i boundary condition 65 | 'EXT' 0 face(2) = right i boundary condition 66 | 'EXT' 0 face(3) = left j boundary condition 67 | 'ADJ' 1 face(4) = right j boundary condition 68 | 'EXT' 0 face(5) = left k boundary condition 69 | 'EXT' 0 face(6) = right k boundary condition 70 | 0.5065d0 r1 = density of species 1 71 | 0.d0 u = 1st velocity component 72 | 0.8939d0 v = 2nd velocity component 73 | 0.d0 w = 3rd velocity component 74 | 0.35d0 p = pressure 75 | 0.5065d0 r=sum(rs) = density 76 | 1.4d0 g = specific heats ratio 77 | ----------------------------------------------------------------------------------------------------------------------------------- 78 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c05/ibm/input/blocks_description.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 4 Nb = number of blocks 5 | 6 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.5d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'ADJ' 2 face(1) = left i boundary condition 11 | 'EXT' 0 face(2) = right i boundary condition 12 | 'ADJ' 4 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.d0 r1 = density of species 1 17 | -0.75d0 u = 1st velocity component 18 | -0.5d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.d0 p = pressure 21 | 1.d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'EXT' 0 face(1) = left i boundary condition 29 | 'ADJ' 1 face(2) = right i boundary condition 30 | 'ADJ' 3 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 2.d0 r1 = density of species 1 35 | -0.75d0 u = 1st velocity component 36 | 0.5d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 1.d0 p = pressure 39 | 2.d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | 42 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 43 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 44 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 45 | 0.5d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 46 | 'EXT' 0 face(1) = left i boundary condition 47 | 'ADJ' 4 face(2) = right i boundary condition 48 | 'EXT' 0 face(3) = left j boundary condition 49 | 'ADJ' 2 face(4) = right j boundary condition 50 | 'EXT' 0 face(5) = left k boundary condition 51 | 'EXT' 0 face(6) = right k boundary condition 52 | 1.d0 r1 = density of species 1 53 | 0.75d0 u = 1st velocity component 54 | 0.5d0 v = 2nd velocity component 55 | 0.d0 w = 3rd velocity component 56 | 1.d0 p = pressure 57 | 1.d0 r=sum(rs) = density 58 | 1.4d0 g = specific heats ratio 59 | 60 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 61 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 62 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 63 | 1.d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 64 | 'ADJ' 3 face(1) = left i boundary condition 65 | 'EXT' 0 face(2) = right i boundary condition 66 | 'EXT' 0 face(3) = left j boundary condition 67 | 'ADJ' 1 face(4) = right j boundary condition 68 | 'EXT' 0 face(5) = left k boundary condition 69 | 'EXT' 0 face(6) = right k boundary condition 70 | 3.d0 r1 = density of species 1 71 | 0.75d0 u = 1st velocity component 72 | -0.5d0 v = 2nd velocity component 73 | 0.d0 w = 3rd velocity component 74 | 1.d0 p = pressure 75 | 3.d0 r=sum(rs) = density 76 | 1.4d0 g = specific heats ratio 77 | ----------------------------------------------------------------------------------------------------------------------------------- 78 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c06/ibm/input/blocks_description.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 4 Nb = number of blocks 5 | 6 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.5d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'ADJ' 2 face(1) = left i boundary condition 11 | 'EXT' 0 face(2) = right i boundary condition 12 | 'ADJ' 4 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.d0 r1 = density of species 1 17 | 0.75d0 u = 1st velocity component 18 | -0.5d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.d0 p = pressure 21 | 1.d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'EXT' 0 face(1) = left i boundary condition 29 | 'ADJ' 1 face(2) = right i boundary condition 30 | 'ADJ' 3 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 2.d0 r1 = density of species 1 35 | 0.75d0 u = 1st velocity component 36 | 0.5d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 1.d0 p = pressure 39 | 2.d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | 42 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 43 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 44 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 45 | 0.5d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 46 | 'EXT' 0 face(1) = left i boundary condition 47 | 'ADJ' 4 face(2) = right i boundary condition 48 | 'EXT' 0 face(3) = left j boundary condition 49 | 'ADJ' 2 face(4) = right j boundary condition 50 | 'EXT' 0 face(5) = left k boundary condition 51 | 'EXT' 0 face(6) = right k boundary condition 52 | 1.d0 r1 = density of species 1 53 | -0.75d0 u = 1st velocity component 54 | 0.5d0 v = 2nd velocity component 55 | 0.d0 w = 3rd velocity component 56 | 1.d0 p = pressure 57 | 1.d0 r=sum(rs) = density 58 | 1.4d0 g = specific heats ratio 59 | 60 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 61 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 62 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 63 | 1.d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 64 | 'ADJ' 3 face(1) = left i boundary condition 65 | 'EXT' 0 face(2) = right i boundary condition 66 | 'EXT' 0 face(3) = left j boundary condition 67 | 'ADJ' 1 face(4) = right j boundary condition 68 | 'EXT' 0 face(5) = left k boundary condition 69 | 'EXT' 0 face(6) = right k boundary condition 70 | 3.d0 r1 = density of species 1 71 | -0.75d0 u = 1st velocity component 72 | -0.5d0 v = 2nd velocity component 73 | 0.d0 w = 3rd velocity component 74 | 1.d0 p = pressure 75 | 3.d0 r=sum(rs) = density 76 | 1.4d0 g = specific heats ratio 77 | ----------------------------------------------------------------------------------------------------------------------------------- 78 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c12/ibm/input/blocks_description.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 4 Nb = number of blocks 5 | 6 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.5d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'ADJ' 2 face(1) = left i boundary condition 11 | 'EXT' 0 face(2) = right i boundary condition 12 | 'ADJ' 4 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.d0 r1 = density of species 1 17 | 0.d0 u = 1st velocity component 18 | -0.4d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.d0 p = pressure 21 | 1.d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'EXT' 0 face(1) = left i boundary condition 29 | 'ADJ' 1 face(2) = right i boundary condition 30 | 'ADJ' 3 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 2.d0 r1 = density of species 1 35 | 0.d0 u = 1st velocity component 36 | -0.3d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 1.d0 p = pressure 39 | 2.d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | 42 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 43 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 44 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 45 | 0.5d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 46 | 'EXT' 0 face(1) = left i boundary condition 47 | 'ADJ' 4 face(2) = right i boundary condition 48 | 'EXT' 0 face(3) = left j boundary condition 49 | 'ADJ' 2 face(4) = right j boundary condition 50 | 'EXT' 0 face(5) = left k boundary condition 51 | 'EXT' 0 face(6) = right k boundary condition 52 | 1.0625d0 r1 = density of species 1 53 | 0.d0 u = 1st velocity component 54 | 0.2145d0 v = 2nd velocity component 55 | 0.d0 w = 3rd velocity component 56 | 0.4d0 p = pressure 57 | 1.0625d0 r=sum(rs) = density 58 | 1.4d0 g = specific heats ratio 59 | 60 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 61 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 62 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 63 | 1.d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 64 | 'ADJ' 3 face(1) = left i boundary condition 65 | 'EXT' 0 face(2) = right i boundary condition 66 | 'EXT' 0 face(3) = left j boundary condition 67 | 'ADJ' 1 face(4) = right j boundary condition 68 | 'EXT' 0 face(5) = left k boundary condition 69 | 'EXT' 0 face(6) = right k boundary condition 70 | 0.5197d0 r1 = density of species 1 71 | 0.d0 u = 1st velocity component 72 | -1.1259d0 v = 3rd velocity component 73 | 0.d0 w = 2nd velocity component 74 | 0.4d0 p = pressure 75 | 0.5197d0 r=sum(rs) = density 76 | 1.4d0 g = specific heats ratio 77 | ----------------------------------------------------------------------------------------------------------------------------------- 78 | -------------------------------------------------------------------------------- /examples/2D/two_dimensional_riemann_problems/kt-c17/ibm/input/blocks_description.dat: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------------------------------------------------------------- 2 | BLOCKS BOUNDS 3 | 1 Ns = Number of species 4 | 4 Nb = number of blocks 5 | 6 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 7 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 8 | 0.5d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 9 | 1.d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 10 | 'ADJ' 2 face(1) = left i boundary condition 11 | 'EXT' 0 face(2) = right i boundary condition 12 | 'ADJ' 4 face(3) = left j boundary condition 13 | 'EXT' 0 face(4) = right j boundary condition 14 | 'EXT' 0 face(5) = left k boundary condition 15 | 'EXT' 0 face(6) = right k boundary condition 16 | 1.1d0 r1 = density of species 1 17 | 0.d0 u = 1st velocity component 18 | 0.d0 v = 2nd velocity component 19 | 0.d0 w = 3rd velocity component 20 | 1.1d0 p = pressure 21 | 1.1d0 r=sum(rs) = density 22 | 1.4d0 g = specific heats ratio 23 | 24 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 25 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 26 | 0.d0 0.5d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 27 | 0.5d0 1.d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 28 | 'EXT' 0 face(1) = left i boundary condition 29 | 'ADJ' 1 face(2) = right i boundary condition 30 | 'ADJ' 3 face(3) = left j boundary condition 31 | 'EXT' 0 face(4) = right j boundary condition 32 | 'EXT' 0 face(5) = left k boundary condition 33 | 'EXT' 0 face(6) = right k boundary condition 34 | 0.5065d0 r1 = density of species 1 35 | 0.8939d0 u = 1st velocity component 36 | 0.d0 v = 2nd velocity component 37 | 0.d0 w = 3rd velocity component 38 | 0.35d0 p = pressure 39 | 0.5065d0 r=sum(rs) = density 40 | 1.4d0 g = specific heats ratio 41 | 42 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 43 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 44 | 0.d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 45 | 0.5d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 46 | 'EXT' 0 face(1) = left i boundary condition 47 | 'ADJ' 4 face(2) = right i boundary condition 48 | 'EXT' 0 face(3) = left j boundary condition 49 | 'ADJ' 2 face(4) = right j boundary condition 50 | 'EXT' 0 face(5) = left k boundary condition 51 | 'EXT' 0 face(6) = right k boundary condition 52 | 1.1d0 r1 = density of species 1 53 | 0.8939d0 u = 1st velocity component 54 | 0.8939d0 v = 2nd velocity component 55 | 0.d0 w = 3rd velocity component 56 | 1.1d0 p = pressure 57 | 1.1d0 r=sum(rs) = density 58 | 1.4d0 g = specific heats ratio 59 | 60 | 4 4 4 4 1 1 gc(1:6) = ghost cells of face boundary i,j,k 61 | 200 200 1 Ni,Nj,Nk = number of cells in i,j,k directions 62 | 0.5d0 0.d0 0.d0 xmin,ymin,zmin = minimum abscissa coordinates of block nodes 63 | 1.d0 0.5d0 1.d0 xmax,ymax,zmax = maximum abscissa coordinates of block nodes 64 | 'ADJ' 3 face(1) = left i boundary condition 65 | 'EXT' 0 face(2) = right i boundary condition 66 | 'EXT' 0 face(3) = left j boundary condition 67 | 'ADJ' 1 face(4) = right j boundary condition 68 | 'EXT' 0 face(5) = left k boundary condition 69 | 'EXT' 0 face(6) = right k boundary condition 70 | 0.5065d0 r1 = density of species 1 71 | 0.d0 u = 1st velocity component 72 | 0.8939d0 v = 2nd velocity component 73 | 0.d0 w = 3rd velocity component 74 | 0.35d0 p = pressure 75 | 0.5065d0 r=sum(rs) = density 76 | 1.4d0 g = specific heats ratio 77 | ----------------------------------------------------------------------------------------------------------------------------------- 78 | -------------------------------------------------------------------------------- /src/Data_Type_Probe.f90: -------------------------------------------------------------------------------- 1 | !> @ingroup DerivedType 2 | !> @{ 3 | !> @defgroup Data_Type_ProbeDerivedType Data_Type_Probe 4 | !> @} 5 | 6 | !> @ingroup PublicProcedure 7 | !> @{ 8 | !> @defgroup Data_Type_ProbePublicProcedure Data_Type_Probe 9 | !> @} 10 | 11 | !> @ingroup PrivateProcedure 12 | !> @{ 13 | !> @defgroup Data_Type_ProbePrivateProcedure Data_Type_Probe 14 | !> @} 15 | 16 | !> This module contains the definition of Type_Probe and its procedures. 17 | module Data_Type_Probe 18 | !----------------------------------------------------------------------------------------------------------------------------------- 19 | USE IR_Precision ! Integers and reals precision definition. 20 | !----------------------------------------------------------------------------------------------------------------------------------- 21 | 22 | !----------------------------------------------------------------------------------------------------------------------------------- 23 | implicit none 24 | private 25 | public:: write_probe,read_probe 26 | !----------------------------------------------------------------------------------------------------------------------------------- 27 | 28 | !----------------------------------------------------------------------------------------------------------------------------------- 29 | !> Derived type containing probe informations. 30 | !> @ingroup Data_Type_ProbeDerivedType 31 | type, public:: Type_Probe 32 | integer(I4P):: b = 1_I4P !< Block (global map) index. 33 | integer(I4P):: i = 0_I4P !< I direction index. 34 | integer(I4P):: j = 0_I4P !< J direction index. 35 | integer(I4P):: k = 0_I4P !< K direction index. 36 | contains 37 | procedure:: set ! Procedure for setting members of Type_Probe. 38 | endtype Type_Probe 39 | !----------------------------------------------------------------------------------------------------------------------------------- 40 | contains 41 | !> @ingroup Data_Type_ProbePublicProcedure 42 | !> @{ 43 | !> @brief Function for writing Type_Probe data. 44 | !> The probe data could be scalar, one, two and three dimensional array. The format could be ascii or binary. 45 | !> @return \b err integer(I_P) variable for error trapping. 46 | function write_probe(scalar,array1D,array2D,array3D,format,unit) result(err) 47 | !--------------------------------------------------------------------------------------------------------------------------------- 48 | implicit none 49 | type(Type_Probe), intent(IN), optional:: scalar !< Scalar probe data. 50 | type(Type_Probe), intent(IN), optional:: array1D(:) !< One dimensional array probe data. 51 | type(Type_Probe), intent(IN), optional:: array2D(:,:) !< Two dimensional array probe data. 52 | type(Type_Probe), intent(IN), optional:: array3D(:,:,:) !< Three dimensional array probe data. 53 | character(*), intent(IN), optional:: format !< Format specifier. 54 | integer(I4P), intent(IN):: unit !< Logic unit. 55 | integer(I_P):: err !< Error trapping flag: 0 no errors, >0 error occurs. 56 | !--------------------------------------------------------------------------------------------------------------------------------- 57 | 58 | !--------------------------------------------------------------------------------------------------------------------------------- 59 | if (present(format)) then 60 | select case(adjustl(trim(format))) 61 | case('*') 62 | if (present(scalar)) then 63 | write(unit,*,iostat=err)scalar 64 | elseif (present(array1D)) then 65 | write(unit,*,iostat=err)array1D 66 | elseif (present(array2D)) then 67 | write(unit,*,iostat=err)array2D 68 | elseif (present(array3D)) then 69 | write(unit,*,iostat=err)array3D 70 | endif 71 | case default 72 | if (present(scalar)) then 73 | write(unit,adjustl(trim(format)),iostat=err)scalar 74 | elseif (present(array1D)) then 75 | write(unit,adjustl(trim(format)),iostat=err)array1D 76 | elseif (present(array2D)) then 77 | write(unit,adjustl(trim(format)),iostat=err)array2D 78 | elseif (present(array3D)) then 79 | write(unit,adjustl(trim(format)),iostat=err)array3D 80 | endif 81 | endselect 82 | else 83 | if (present(scalar)) then 84 | write(unit,iostat=err)scalar 85 | elseif (present(array1D)) then 86 | write(unit,iostat=err)array1D 87 | elseif (present(array2D)) then 88 | write(unit,iostat=err)array2D 89 | elseif (present(array3D)) then 90 | write(unit,iostat=err)array3D 91 | endif 92 | endif 93 | return 94 | !--------------------------------------------------------------------------------------------------------------------------------- 95 | endfunction write_probe 96 | 97 | !> @brief Function for reading Type_Probe data. 98 | !> The probe data could be scalar, one, two and three dimensional array. The format could be ascii or binary. 99 | !> @return \b err integer(I_P) variable for error trapping. 100 | function read_probe(scalar,array1D,array2D,array3D,format,unit) result(err) 101 | !--------------------------------------------------------------------------------------------------------------------------------- 102 | implicit none 103 | type(Type_Probe), intent(INOUT), optional:: scalar !< Scalar probe data. 104 | type(Type_Probe), intent(INOUT), optional:: array1D(:) !< One dimensional array probe data. 105 | type(Type_Probe), intent(INOUT), optional:: array2D(:,:) !< Two dimensional array probe data. 106 | type(Type_Probe), intent(INOUT), optional:: array3D(:,:,:) !< Three dimensional array probe data. 107 | character(*), intent(IN), optional:: format !< Format specifier. 108 | integer(I4P), intent(IN):: unit !< Logic unit. 109 | integer(I_P):: err !< Error trapping flag: 0 no errors, >0 error occurs. 110 | !--------------------------------------------------------------------------------------------------------------------------------- 111 | 112 | !--------------------------------------------------------------------------------------------------------------------------------- 113 | if (present(format)) then 114 | select case(adjustl(trim(format))) 115 | case('*') 116 | if (present(scalar)) then 117 | read(unit,*,iostat=err)scalar 118 | elseif (present(array1D)) then 119 | read(unit,*,iostat=err)array1D 120 | elseif (present(array2D)) then 121 | read(unit,*,iostat=err)array2D 122 | elseif (present(array3D)) then 123 | read(unit,*,iostat=err)array3D 124 | endif 125 | case default 126 | if (present(scalar)) then 127 | read(unit,adjustl(trim(format)),iostat=err)scalar 128 | elseif (present(array1D)) then 129 | read(unit,adjustl(trim(format)),iostat=err)array1D 130 | elseif (present(array2D)) then 131 | read(unit,adjustl(trim(format)),iostat=err)array2D 132 | elseif (present(array3D)) then 133 | read(unit,adjustl(trim(format)),iostat=err)array3D 134 | endif 135 | endselect 136 | else 137 | if (present(scalar)) then 138 | read(unit,iostat=err)scalar 139 | elseif (present(array1D)) then 140 | read(unit,iostat=err)array1D 141 | elseif (present(array2D)) then 142 | read(unit,iostat=err)array2D 143 | elseif (present(array3D)) then 144 | read(unit,iostat=err)array3D 145 | endif 146 | endif 147 | return 148 | !--------------------------------------------------------------------------------------------------------------------------------- 149 | endfunction read_probe 150 | !> @} 151 | 152 | !> @ingroup Data_Type_ProbePrivateProcedure 153 | !> @{ 154 | !> Subroutine for setting members of Type_Probe. 155 | elemental subroutine set(probe,b,i,j,k) 156 | !--------------------------------------------------------------------------------------------------------------------------------- 157 | implicit none 158 | class(Type_Probe), intent(INOUT):: probe !< Probe data. 159 | integer(I4P), intent(IN), optional:: b !< Block (global map) index. 160 | integer(I4P), intent(IN), optional:: i !< I direction index. 161 | integer(I4P), intent(IN), optional:: j !< J direction index. 162 | integer(I4P), intent(IN), optional:: k !< K direction index. 163 | !--------------------------------------------------------------------------------------------------------------------------------- 164 | 165 | !--------------------------------------------------------------------------------------------------------------------------------- 166 | if (present(b)) probe%b = b 167 | if (present(i)) probe%i = i 168 | if (present(j)) probe%j = j 169 | if (present(k)) probe%k = k 170 | return 171 | !--------------------------------------------------------------------------------------------------------------------------------- 172 | endsubroutine set 173 | !> @} 174 | endmodule Data_Type_Probe 175 | -------------------------------------------------------------------------------- /EXAMPLE.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | The directory _examples_ into the root of the project contains some simple examples to try OFF. These examples are designed to learn OFF quickly and easily. The examples are categorized into 2 classes, namely one-dimensional and two-dimensional. The followings instructions drive you to the examples execution. 4 | 5 | ## 1D Examples 6 | 7 | ### SOD Riemann Problem 8 | 9 | The first 1D example concerns the solution of the Riemann Problem of Sod, that is a classical 1D shock tube test. In order to complete the SOD example, IBM, OFF and POG must be properly compiled. 10 | 11 | #### Compiling codes 12 | 13 | IBM and POG can be compiled only with serial support, whereas OFF has support for serial, OpenMP, MPI and OpenMP/MPI execution. POG can be compiled with or without the Tecplot Inc. proprietary IO library for saving Tecplot binary outputs. 14 | 15 | Let us start cleaning the project root directory: 16 | 17 | make cleanall 18 | 19 | Then compile codes: 20 | 21 | ##### IBM 22 | make IBM COMPILER=intel DEBUG=no OPENMP=no MPI=no NULj=yes NULk=yes 23 | ##### POG with Tecplot Inc. proprietary Library 24 | make POG COMPILER=intel DEBUG=no OPENMP=no MPI=no NULj=yes NULk=yes TECIO=yes 25 | ##### POG without Tecplot Inc. proprietary Library 26 | make clean 27 | make codes COMPILER=intel DEBUG=no OPENMP=no MPI=no NULj=yes NULk=yes 28 | ##### OFF serial 29 | make clean 30 | make OFF COMPILER=intel DEBUG=no OPENMP=no MPI=no NULj=yes NULk=yes 31 | ##### OFF OpenMP 32 | make clean 33 | make OFF COMPILER=intel DEBUG=no OPENMP=yes MPI=no NULj=yes NULk=yes 34 | ##### OFF MPI 35 | make clean 36 | make OFF COMPILER=intel DEBUG=no OPENMP=no MPI=yes NULj=yes NULk=yes 37 | ##### OFF hybrid OpenMP/MPI 38 | make clean 39 | make OFF COMPILER=intel DEBUG=no OPENMP=yes MPI=yes NULj=yes NULk=yes 40 | 41 | #### Running example 42 | 43 | To run the Sod's shock tube test navigate to its working directory: 44 | 45 | cd examples/1D/shock_tube/SOD/ 46 | 47 | There are 3 sub-directories: 48 | + ibm 49 | + off 50 | + pog 51 | 52 | Into each of the above directories there is a bash script, __run_[IBM,OFF,POG].sh__ that help you to complete the example. Moreover, there are the necessary option files to run each code. The bash scripts are designed to be executed on a workstation where you can directly execute programs without dealing with a resource manager system that schedules the jobs, such as [Torque](http://www.adaptivecomputing.com/products/open-source/torque/). For the execution of this example on a system using a jobs scheduler see the subsection [How-to facing with a jobs scheduler like Torque](#jobscheduler). 53 | 54 | The 3 subdirectories _ibm_, _off_ and _pog_ indicate the 3 steps that must be completed in sequence. 55 | 56 | Firstly, navigate to _ibm_ directory and building the initial and boundary conditions and the mesh file (generating the input file for OFF): 57 | 58 | cd ibm 59 | 60 | Then you have 2 options: 61 | + clean _ibm_ directory: `run_IBM.sh -clean` 62 | + run IBM for generating OFF input files: `run_IBM.sh -out` 63 | 64 | The above commands will produce the correct input for OFF. The produced files are placed into _output_ directory inside _ibm_ one. 65 | 66 | Now, navigate to _off_ directory 67 | 68 | cd ../off 69 | 70 | Again, you have 3 options: 71 | + clean _off_ directory: `run_OFF.sh -clean` 72 | + run OFF in serial or OpenMP mode: `run_OFF.sh -no_mpi` 73 | + run OFF in MPI mode: `run_OFF.sh -mpi` 74 | 75 | The above commands will perform the simulation. The produced files are placed into _output_ directory inside the _off_ one. 76 | 77 | Finally, postprocess the result obtained. Navigate to _pog_ directory: 78 | 79 | cd ../pog 80 | 81 | You have 4 options: 82 | + clean _pog_ directory: `run_POG.sh -clean` 83 | + produce Gnuplot postprocessed files: `run_POG.sh -gnu` 84 | + produce Tecplot postprocessed files: `run_POG.sh -tec` 85 | + produce VTK postprocessed files: `run_POG.sh -vtk` 86 | 87 | The above commands will post-process the simulation results. The produced files are placed into _output_ directory inside _pog_ one. It is worth noting that the obtained results can be compared with the OFF reference ones contained into _output-ref_ directory. Moreover, into the file __exact_sod-100-t02-block-split.dat__ the exact solution of Sod's problem are reported for validation purpose. 88 | 89 | ## 2D Examples 90 | 91 | ### Two Dimensional Riemann Problems 92 | 93 | The first 2D examples concern with 2D Riemann problems. The initial conditions are the same as the ones reported by [Kurganov and Tadmor](http://dx.doi.org/10.1002/num.10025). In order to complete the SOD example, IBM, OFF and POG must be properly compiled. 94 | 95 | #### Compiling codes 96 | 97 | IBM and POG can be compiled only with serial support, whereas OFF has support for serial, OpenMP, MPI and OpenMP/MPI execution. POG can be compiled with or without the Tecplot Inc. proprietary IO library for saving Tecplot binary outputs. 98 | 99 | Let us start cleaning the project root directory: 100 | 101 | make cleanall 102 | 103 | Then compile codes: 104 | 105 | ##### IBM 106 | make IBM COMPILER=intel DEBUG=no OPENMP=no MPI=no NULk=yes 107 | ##### POG with Tecplot Inc. proprietary Library 108 | make POG COMPILER=intel DEBUG=no OPENMP=no MPI=no NULk=yes TECIO=yes 109 | ##### POG without Tecplot Inc. proprietary Library 110 | make clean 111 | make codes COMPILER=intel DEBUG=no OPENMP=no MPI=no NULk=yes 112 | ##### OFF serial 113 | make clean 114 | make OFF COMPILER=intel DEBUG=no OPENMP=no MPI=no NULk=yes 115 | ##### OFF OpenMP 116 | make clean 117 | make OFF COMPILER=intel DEBUG=no OPENMP=yes MPI=no NULk=yes 118 | ##### OFF MPI 119 | make clean 120 | make OFF COMPILER=intel DEBUG=no OPENMP=no MPI=yes NULk=yes 121 | ##### OFF hybrid OpenMP/MPI 122 | make clean 123 | make OFF COMPILER=intel DEBUG=no OPENMP=yes MPI=yes NULk=yes 124 | 125 | #### Running example 126 | 127 | To run a 2D Riemann Problem example navigate to its working directory: 128 | 129 | cd examples/2D/two_dimensional_riemann_problems/kt-c??/ 130 | 131 | Note: substitute ?? with one of 03,04,05,06,12,17 132 | 133 | For each kt-?? there are 3 sub-directories: 134 | + ibm 135 | + off 136 | + pog 137 | 138 | Into each of the above directories there is a bash script, __run_[IBM,OFF,POG].sh__ that help you to complete the example. Moreover, there are the necessary option files to run each code. The bash scripts are designed to be executed on a workstation where you can directly execute programs without dealing with a resource manager system that schedules the jobs, such as [Torque](http://www.adaptivecomputing.com/products/open-source/torque/). For the execution of this example on a system using a jobs scheduler see the subsection [How-to facing with a jobs scheduler like Torque](#jobscheduler). 139 | 140 | The 3 subdirectories _ibm_, _off_ and _pog_ indicate the 3 steps that must be completed in sequence. 141 | 142 | Firstly, navigate to _ibm_ directory and building the initial and boundary conditions and the mesh file (generating the input file for OFF): 143 | 144 | cd ibm 145 | 146 | Then you have 2 options: 147 | + clean _ibm_ directory: `run_IBM.sh -clean` 148 | + run IBM for generating OFF input files: `run_IBM.sh -out` 149 | 150 | The above commands will produce the correct input for OFF. The produced files are placed into _output_ directory inside _ibm_ one. 151 | 152 | Now, navigate to _off_ directory 153 | 154 | cd ../off 155 | 156 | Again, you have 3 options: 157 | + clean _off_ directory: `run_OFF.sh -clean` 158 | + run OFF in serial or OpenMP mode: `run_OFF.sh -no_mpi` 159 | + run OFF in MPI mode: `run_OFF.sh -mpi` 160 | 161 | The above commands will perform the simulation. The produced files are placed into _output_ directory inside the _off_ one. 162 | 163 | Finally, postprocess the result obtained. Navigate to _pog_ directory: 164 | 165 | cd ../pog 166 | 167 | You have 4 options: 168 | + clean _pog_ directory: `run_POG.sh -clean` 169 | + produce Gnuplot postprocessed files: `run_POG.sh -gnu` 170 | + produce Tecplot postprocessed files: `run_POG.sh -tec` 171 | + produce VTK postprocessed files: `run_POG.sh -vtk` 172 | 173 | The above commands will post-process the simulation results. The produced files are placed into _output_ directory inside _pog_ one. It is worth noting that the obtained results can be compared with the OFF reference ones contained into _output-ref_ directory. 174 | 175 | It is worth noting that all the 2D Riemann problems are set to finish at 20 time steps in order to quickly complete the examples. However, the solutions obtained have no physical meaning because the final time of integration is too small. If you want to complete one of the 2D Riemann problems reaching the same physical time of the solution of [Kurganov and Tadmor](http://dx.doi.org/10.1002/num.10025) you must edit one input file into _ibm_ directory of the kt-?? example chosen: 176 | 177 | cd ibm 178 | cd input 179 | 180 | Into this directory there is the option file `solver.dat`: the fourth line should contain the maximum number of iterations performed, _Nmax_, just set it to 0 in order to finish the simulation at the physical time set below, _Tmax_, instead of using _Nmax_. 181 | 182 | ### How-to facing with a jobs scheduler like Torque (PBS, OpenPBS, etc...) 183 | 184 | In the High Performance Computing (HPC) context it is usual to have a resources manager program that schedules the jobs in order to optimize the computing resources. Portable Batch System (PBS) is one of the most used scheduler considering all of its _forks_, e.g. [Torque](http://www.adaptivecomputing.com/products/open-source/torque/) being based on the OpenPBS fork of the original PBS project. In this framework the bash script for running OFF on parallel MPI-enabled architecture cannot be used. Indeed, a job-submission script, suitable for the actual scheduler used, must be created. For the non expert users of Torque-like scheduler an example of job-submission script is here reported. Assuming the input files for OFF have already created, navigate to _off_ directory and save the following job-submission example file to `runjob.pbs`: 185 | 186 | ```bash 187 | #!/bin/bash 188 | #PBS -N OFF 189 | #PBS -q debug_eth 190 | #PBS -l nodes=1:ppn=2 191 | #PBS -l walltime=00:30:00 192 | #PBS -j oe 193 | #PBS -V 194 | 195 | # in many PBS-like frameworks it is suggested to explicity declare/navigate the current working directory 196 | cd $PBS_O_WORKDIR 197 | 198 | # load here the modules eventually needed 199 | module add ... 200 | 201 | # set the necessary enviroments variables 202 | export ... 203 | 204 | # OFF stuffs 205 | rm -rf output lockfile input # cleaning working directory 206 | ln -fs ../ibm/output input # link to IBM output 207 | mkdir -p output # creating outout directory 208 | cd input ; ln -fs procmap-mpi.dat procmap.dat ; cd ../ # linking procmap.dat to map with MPI 209 | 210 | # running OFF; note that the number of MPI process is left generic (mpi_procs) and you must specify other mpirun-options eventually nedeed (other_options) 211 | mpirun -np mpi_procs [other_options] ./OFF off_options.dat 212 | ``` 213 | 214 | Once the `runjob.pbs` file has been properly edited accordingly to your scheduler just submit it (maybe something like `qsub runjob.pbs`). 215 | 216 | The final POG post-processing phase can be completed as detailed in the above sections. 217 | -------------------------------------------------------------------------------- /src/Data_Type_HashID.f90: -------------------------------------------------------------------------------- 1 | !> @ingroup DerivedType 2 | !> @{ 3 | !> @defgroup Data_Type_HashIDDerivedType Data_Type_HashID 4 | !> @} 5 | 6 | !> @ingroup Interface 7 | !> @{ 8 | !> @defgroup Data_Type_HashIDInterface Data_Type_HashID 9 | !> @} 10 | 11 | !> @ingroup GlobalVarPar 12 | !> @{ 13 | !> @defgroup Data_Type_HashIDGlobalVarPar Data_Type_HashID 14 | !> @} 15 | 16 | !> @ingroup PrivateVarPar 17 | !> @{ 18 | !> @defgroup Data_Type_HashIDPrivateVarPar Data_Type_HashID 19 | !> @} 20 | 21 | !> @ingroup PublicProcedure 22 | !> @{ 23 | !> @defgroup Data_Type_HashIDPublicProcedure Data_Type_HashID 24 | !> @} 25 | 26 | !> @ingroup PrivateProcedure 27 | !> @{ 28 | !> @defgroup Data_Type_HashIDPrivateProcedure Data_Type_HashID 29 | !> @} 30 | 31 | !> @brief Module Data_Type_HashID contains the definition of Type_HashID type and useful procedures for its handling. 32 | !> Type_HashID contains the definition of the unique key, ID, used within the hash tables. 33 | module Data_Type_HashID 34 | !----------------------------------------------------------------------------------------------------------------------------------- 35 | USE IR_Precision ! Integers and reals precision definition. 36 | USE Lib_Morton ! Procedure for Morton's encoding. 37 | !----------------------------------------------------------------------------------------------------------------------------------- 38 | 39 | !----------------------------------------------------------------------------------------------------------------------------------- 40 | implicit none 41 | private 42 | public:: ht_def_leng 43 | public:: lvl_max 44 | public:: treedim 45 | public:: operator (/=) 46 | public:: operator (==) 47 | !----------------------------------------------------------------------------------------------------------------------------------- 48 | 49 | !----------------------------------------------------------------------------------------------------------------------------------- 50 | !> @ingroup Data_Type_HashIDGlobalVarPar 51 | !> @{ 52 | integer(I4P), parameter:: ht_def_leng = 9973_I4P !< Default lenght of hash table. 53 | integer(I1P):: lvl_max_u = 0_I1P !< Maximum refinement level used (maximum possible is lvl_max). 54 | !> @} 55 | !> @ingroup Data_Type_HashIDPrivateVarPar 56 | integer(I1P), parameter:: lvl_max = 16_I1P !< Maximum refinement level, arbitrarily chosen. 57 | !> @brief Derived type containing the definition of the unique key, ID, used within the hash tables. 58 | !> @note The identifier is a function of the form ID=(blk,bcl,lvl,pth) where: 59 | !> @code 60 | !> 'blk' are the bits identifying block; 61 | !> 'bcl' are the bits identifying the (parent) base cell; 62 | !> 'lvl' are the bits identifying the level; 63 | !> 'pth' are the bits describing the path (of children). 64 | !> @endcode 65 | !> The range of ID keys can be computed as following. Each base cell can 66 | !> contain a maximum of \f$ Nchild=\sum_{l=1}^{lvl_{max_u}}{2^{3 \cdot l}}\f$ children cells. As a consequence the maximum number of 67 | !> cells are \f$ N_b \cdot N_{bc} \cdot Nchild \f$ where Nb is the (maximum) number of blocks, Nbc is the (maximum) number of the 68 | !> base cells. Assuming (arbitrarily) \f$ N_b = 100 \f$, \f$ N_{bc} = 1 \cdot 10^6 \f$ and \f$ lvl_{max_u} = 5 \f$ the maximum 69 | !> number of keys (cells) is of the order of \f$ 3 \cdot 10^{12}\f$, a very large value. 70 | !> @code 71 | !> +----+----+ 72 | !> /| /| /| 73 | !> / | 6 | 7 | 74 | !> / +----*----+ 75 | !> / /|/ /|/ /| 76 | !> / / | 4 | 5 | 77 | !> / / /+----+----+ 78 | !> / / // / // / / 79 | !> +----+----+/ / / 80 | !> /| / /| / /| / / 81 | !> / |/ //|/ //|/ / 82 | !> / +----*----+ / 83 | !> / /|// /|// /| / 84 | !> / / |/ / |/ / |/ 85 | !> / / /+----+----+ 86 | !> / / // / // / / 87 | !> +----+----+/ / / y(j) z(k) 88 | !> | / | / | / / ^ ^ 89 | !> |/ 2/|/ 3/|/ / | / 90 | !> +----*----+ / | / 91 | !> | / | / | / | / 92 | !> |/ 0 |/ 1 |/ |/ 93 | !> +----+----+ +------->x(i) 94 | !> @endcode 95 | !> @ingroup Data_Type_HashIDDerivedType 96 | type, public:: Type_HashID 97 | integer(I2P):: blk = 0_I2P !< Block 16 bits: 65536 maximum blocks. 98 | integer(I8P):: bcl = 0_I4P !< Base cells 48(3x16) bits: 281474976710656 maximum cells (Morton encoded). 99 | integer(I1P):: lvl = 0_I1P !< Level 8 bits: 256 maximum levels, but arbitrarily fixed to 16 (due to path memory limit). 100 | integer(I8P):: pth = 0_I8P !< Path (of children) 64 bits: (4 bits, values in [0,1,2...,7])x(16 max levels), Morton encoded. 101 | contains 102 | procedure:: build ! Procedure for building ID from indexes information. 103 | procedure:: hash ! Procedure for "hashing" ID. 104 | endtype Type_HashID 105 | !----------------------------------------------------------------------------------------------------------------------------------- 106 | 107 | !----------------------------------------------------------------------------------------------------------------------------------- 108 | !> @brief Not-equal-to boolean operator (/=) overloading. 109 | !> @ingroup Data_Type_HashIDInterface 110 | interface operator (/=) 111 | module procedure id_not_eq_id 112 | endinterface 113 | !> @brief Equal-to boolean operator (==) overloading. 114 | !> @ingroup Data_Type_HashIDInterface 115 | interface operator (==) 116 | module procedure id_eq_id 117 | endinterface 118 | !----------------------------------------------------------------------------------------------------------------------------------- 119 | contains 120 | !> @ingroup Data_Type_HashIDPublicProcedure 121 | !> @{ 122 | !> @brief Function for computing the dimension of a tree. 123 | !> @note A tree can contain a maximum of \f$ Nchild=\sum_{l=1}^{lvl_{max_u}}{2^{s \cdot l}}\f$ children cells, where \f$s\f$ is 124 | !> the space dimension (1 in 1D, 2 in 2D, 3 in 3D ecc...). 125 | elemental function treedim(s,lm) result(d) 126 | !--------------------------------------------------------------------------------------------------------------------------------- 127 | implicit none 128 | integer(I1P), intent(IN):: s !< Space dimension (1=>1D, 2=>2D, 3=>3D...). 129 | integer(I1P), intent(IN):: lm !< Maximum level of the tree. 130 | integer(I8P):: d !< Dimension of the (complete) tree of dimension 's' and level 'lm'. 131 | integer(I1P):: l !< Levels counter. 132 | !--------------------------------------------------------------------------------------------------------------------------------- 133 | 134 | !--------------------------------------------------------------------------------------------------------------------------------- 135 | d = 0_I8P 136 | do l=1,lm 137 | d = d + (2**(s*l)) 138 | enddo 139 | return 140 | !--------------------------------------------------------------------------------------------------------------------------------- 141 | endfunction treedim 142 | !> @} 143 | 144 | !> @ingroup Data_Type_HashIDPrivateProcedure 145 | !> @{ 146 | !> @brief Subroutine for building ID from block,bcell-ijk,level informations. 147 | elemental subroutine build(ID,b,i,j,k,l,p) 148 | !--------------------------------------------------------------------------------------------------------------------------------- 149 | implicit none 150 | class(Type_HashID), intent(INOUT):: ID !< Resulting ID. 151 | integer(I2P), intent(IN):: b !< Block number (in the global ordering). 152 | integer(I2P), intent(IN):: i !< Base cell i index (in the local-block ordering). 153 | integer(I2P), intent(IN):: j !< Base cell j index (in the local-block ordering). 154 | integer(I2P), intent(IN):: k !< Base cell k index (in the local-block ordering). 155 | integer(I1P), intent(IN):: l !< Level (>0 if the key is of a child). 156 | integer(I8P), intent(IN):: p !< Path (>0 if the key is of a child). 157 | !--------------------------------------------------------------------------------------------------------------------------------- 158 | 159 | !--------------------------------------------------------------------------------------------------------------------------------- 160 | ID%blk = b 161 | ID%bcl = morton3(i=i,j=j,k=k) 162 | ID%lvl = l 163 | ID%pth = p 164 | return 165 | !--------------------------------------------------------------------------------------------------------------------------------- 166 | endsubroutine build 167 | 168 | !> @brief Function for computing the hash function of a given ID and hash table length. 169 | elemental function hash(id,tleng) result(bucket) 170 | !--------------------------------------------------------------------------------------------------------------------------------- 171 | implicit none 172 | class(Type_HashID), intent(IN):: id !< ID. 173 | integer(I4P), intent(IN):: tleng !< Hash table length. 174 | integer(I4P):: bucket !< Bucket corresponding to the ID. 175 | !--------------------------------------------------------------------------------------------------------------------------------- 176 | 177 | !--------------------------------------------------------------------------------------------------------------------------------- 178 | bucket = mod(int(id%blk,I4P),tleng) 179 | return 180 | !--------------------------------------------------------------------------------------------------------------------------------- 181 | endfunction hash 182 | 183 | !> @brief This function returns .true. if id1 is /= id2, .false. otherwise. 184 | elemental function id_not_eq_id(id1,id2) result(compare) 185 | !--------------------------------------------------------------------------------------------------------------------------------- 186 | implicit none 187 | type(Type_HashID), intent(IN):: id1 ! First ID. 188 | type(Type_HashID), intent(IN):: id2 ! Second ID. 189 | logical:: compare ! The result of the comparison. 190 | !--------------------------------------------------------------------------------------------------------------------------------- 191 | 192 | !--------------------------------------------------------------------------------------------------------------------------------- 193 | compare = ((id1%blk/=id2%blk).OR.(id1%blk/=id2%blk)) 194 | return 195 | !--------------------------------------------------------------------------------------------------------------------------------- 196 | endfunction id_not_eq_id 197 | 198 | !> @brief This function returns .true. if id1 is 0= id2, .false. otherwise. 199 | elemental function id_eq_id(id1,id2) result(compare) 200 | !--------------------------------------------------------------------------------------------------------------------------------- 201 | implicit none 202 | type(Type_HashID), intent(IN):: id1 ! First ID. 203 | type(Type_HashID), intent(IN):: id2 ! Second ID. 204 | logical:: compare ! The result of the comparison. 205 | !--------------------------------------------------------------------------------------------------------------------------------- 206 | 207 | !--------------------------------------------------------------------------------------------------------------------------------- 208 | compare = ((id1%blk==id2%blk).AND.(id1%blk==id2%blk)) 209 | return 210 | !--------------------------------------------------------------------------------------------------------------------------------- 211 | endfunction id_eq_id 212 | !> @} 213 | endmodule Data_Type_HashID 214 | --------------------------------------------------------------------------------