HydroCODE_1D 0.1
This is a implementation of fully explict forward Euler scheme for 1-D Euler equations of motion on Lagrangian/Eulerian 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 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
finite_volume/ Finite volume scheme programs
hydrocode_1D/hydrocode.c Main program
hydrocode_1D/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_1D': Run './hydrocode.sh' command on the terminal.
  • Winodws: Visual Studio, MATLAB/Octave
    • Create a C++ Project from Existing Code in 'src/hydrocode_1D/' 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/one-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] LAG 5=100' (second-order Lagrangian GRP scheme).
      • 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.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_1D
      [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'.

Precompiler options

  • NODATPLOT: in hydrocode.c. (Default: undef)
  • HDF5PLOT: in hydrocode.c. (Default: undef)
  • Riemann_solver_exact_single: in riemann_solver.h. (Default: Riemann_solver_exact_Ben)
  • MULTIFLUID_BASICS: 'Switch whether to compute multi-fluids.' (Default: undef)