This is an implementation of fully explict forward Euler scheme for 2-D Euler equations of motion on Eulerian coordinate.
- 版本
- 0.2
File directories
data_in/ | Folder to store input files RHO/U/P/config.txt |
data_out/ | Folder to store output files RHO/U/P/E/X/log.txt |
doc/ | Code documentation generated by doxygen |
src/ | Folder to store C source code |
Program structure
include/ | Header files |
tools/ | Tool functions |
file_io/ | Program reads and writes files |
riemann_solver/ | Riemann solver programs |
inter_process/ | Intermediate processes in finite volume scheme |
flux_calc/ | Program for calculating numerical fluxes in finite volume scheme |
finite_volume/ | Finite volume scheme programs |
hydrocode_2D/hydrocode.c | Main program |
hydrocode_2D/hydrocode.sh | Bash script compiles and runs programs |
Program exit status code
exit(0) | EXIT_SUCCESS |
exit(1) | File directory error |
exit(2) | Data reading/writing error |
exit(3) | Calculation error |
exit(4) | Arguments error |
exit(5) | Memory error |
Compile environment
- Linux/Unix: gcc, glibc, MATLAB/Octave
- Compile in 'src/hydrocode_2D': Run './hydrocode.sh' command on the terminal.
- Winodws: Visual Studio, MATLAB/Octave
- Create a C++ Project from Existing Code in 'src/hydrocode_2D/' with ProjectName 'hydrocode'.
- Compile in 'x64/Debug' using shortcut key 'Ctrl+B' with Visual Studio.
Usage description
- Input files are stored in folder 'data_in/two-dim/name_of_test_example/'.
- Input files may be produced by MATLAB/Octave script 'value_start.m'.
- Description of configuration file 'config.txt/.dat' refers to 'doc/config.csv'.
- Run program:
- Linux/Unix: Run 'shell/hydrocode_run.sh' command on the terminal.
The details are as follows:
Run 'hydrocode.out name_of_test_example name_of_numeric_result order[_scheme] coordinate config[n]=(double)C' command on the terminal.
e.g. 'hydrocode.out GRP_Book/6_1 GRP_Book/6_1 2[_GRP] EUL 5=100' (second-order Eulerian GRP scheme).
- order: Order of numerical scheme (= 1 or 2).
- scheme: Scheme name (= Riemann_exact/Godunov, GRP or …).
- coordinate: Eulerian coordinate framework (= EUL).
- Windows: Run 'hydrocode.bat' command on the terminal.
The details are as follows:
Run 'hydrocode.exe name_of_test_example name_of_numeric_result order[_scheme] coordinate n=C' command on the terminal.
[Debug] Project -> Properties -> Configuration Properties -> Debugging
Command Arguments | name_of_test_example name_of_numeric_result order[_scheme] coordinate n=C |
Working Directory | hydrocode_2D |
[Run] Project -> Properties -> Configuration Properties -> Linker -> System
Subsystem | (/SUBSYSTEM:CONSOLE) |
[Run] Project -> Properties -> Configuration Properties -> C/C++ -> Language
- Output files can be found in folder 'data_out/two-dim/'.
- Output files may be visualized by MATLAB/Octave script 'value_plot.m'.
Precompiler options