HydroCODE 0.1
This is a implementation of fully explict forward Euler scheme for 1-D Euler equations of motion on Lagrange coordinate
1D Godunov/GRP scheme for Lagrangian/Eulerian hydrodynamics

This is an implementation of fully explict forward Euler scheme for 1-D Euler equations of motion on Lagrangian/Eulerian coordinate.

版本
0.1

File directory

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
file_io/ Program reads and writes files
finite_volume/ Finite volume scheme programs
Riemann_solver/ Riemann solver programs
tools/ Tool functions
hydrocode/hydrocode.c Main program
hydrocode/make.sh Bash script compiles and runs programs

Program exit status code

exit(0) EXIT_SUCCESS
exit(1) File directory error
exit(2) Data reading 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': Run './make.sh' command on the terminal.
  • Winodws: Visual Studio, MATLAB/Octave
    • Create a C++ Project from Existing Code in 'src/'.
    • Compile in 'x64/Debug' using shortcut key 'Ctrl+B' with Visual Studio.

Usage description

  • Input files are stored in folder '/data_in/one-dim/name_of_test_example'.
  • Input files may be produced by MATLAB/Octave script 'value_start.m'.
  • Description of configuration file 'config.txt' refers to 'doc/config.csv'.
  • Run program:
    • Linux/Unix: Run 'hydrocode.out name_of_test_example name_of_numeric_result dimension order[_scheme] coordinate config[n]=(double)C' command on the terminal.
      e.g. 'hydrocode.out GRP_Book/6_1 GRP_Book/6_1 1 2[_GRP] LAG 5=100' (second-order Lagrangian GRP scheme).
      • dim: Dimension of test example (= 1 or 2).
      • order: Order of numerical scheme (= 1 or 2).
      • scheme: Scheme name (= Riemann_exact/Godunov, GRP or …)
      • coordinate: Lagrangian/Eulerian coordinate framework (= LAG or EUL).
    • Windows: Run 'hydrocode.exe name_of_test_example order coordinate' command on the terminal.
      [Debug] Project -> Properties -> Configuration Properties -> Debugging
      Command Arguments name_of_test_example order coordinate (e.g. 'GRP_Book_6_1 1 EUL')
      Working Directory $(SolutionDir)$(Platform)\$(Configuration)\
      [Run] Project -> Properties -> Configuration Properties -> Linker -> System
      Subsystem 控制台 (/SUBSYSTEM:CONSOLE)
  • Output files can be found in folder '/data_out/one-dim/'.
  • Output files may be visualized by MATLAB/Octave script 'value_plot.m'.