HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PETSc Examples

The following are some examples that use explicit, implicit or semi-implicit (IMEX) time integration methods implemented in PETSc (https://petsc.org/release/). To run them, HyPar needs to be compiled with PETSc. Familiarity with using PETSc is assumed.

Note:

  • In general, any example or simulation can use PETSc time-integrators (assuming HyPar is compiled with PETSc) by specifying the PETSc inputs through a .petscrc file, similar to the ones in the examples below. The following file is an example of a .petscrc file (with explanatory comments).
    • hypar/Examples/PETScInputs/.petscrc_Example
  • The PETSc example directories have a file .petscrc and a sym link petscrc pointing to .petscrc. The file .petscrc is the actual input file; petscrc is needed to generate this documentation because Doxygen does not seem to include files with names starting with a dot!
  • The inputs in the .petscrc files (any lines not starting with a #) can also be specified in the command line, for example,
    /path/to/hypar/bin/HyPar -use-petscts -ts_type rk -ts_rk_type 4 ...
    

Explicit time integration:

1D Linear Advection - Sine Wave
1D Linear Advection - Discontinuous Waves (with local truncation error-based adaptive time-step)

Implicit time integration:

1D Linear Diffusion - Sine Wave
2D Linear Diffusion - Sine Wave (with local truncation error-based adaptive time-step)
2D Euler Equations - Isentropic Vortex Convection
2D Navier-Stokes Equations - Lid-Driven Square Cavity (with local truncation error-based adaptive time-step)
2D Navier-Stokes Equations - Laminar Flow over Flat Plate

Implicit-Explicit (IMEX) time integration:

2D Euler Equations - Low-Mach Isentropic Vortex Convection
2D Euler Equations (with gravitational force) - Inertia-Gravity Waves
2D Euler Equations (with gravitational force) - Rising Thermal Bubble (with local truncation error-based adaptive time-step)
2D Navier-Stokes Equations - Lid-Driven Square Cavity
3D Navier-Stokes Equations - Rising Thermal Bubble