Running The Solver

  • Mohamed Houssem Kasbaoui

Running The Solver

There are 3 steps to performing simulations with LEAP.

  1. Setup a case. This is explained in the section: Setting Up a New Case.
  2. Generate initial conditions and startup files.
  3. Integrate the solution forward in time.

To get started, we will use the lid-driven cavity flow example provided with LEAP for the lid-driven cavity flow.

Start by making the examples

cd /path/to/leap
make examples
make install

This will create binaries for the provided examples, which will be placed in /path/to/leap/install/folder/examples/bin/, and text input files placed in /path/to/leap/install/folder/examples/inputs/

Next, we are going to run this example with the corresponding input file provided in this inputs folder. The input file contains various parameters for this case and can be modified to vary things like density, viscosity, lid velocity, grid, etc. Note that the input file calls for 2x2x1 domain partition (this can be changed too). Thus, this run requires 4 cores by default.

To generate the initial conditions for this case, run the case program as follows:

# Create a simulation folder somewhere
mkdir simulation_folder
cd simulation_folder

# Copy the appropriate input file
cp /path/to/leap/install/folder/examples/inputs/input_cdifs_lid_driven_cavity input

# Run the initialization with 4 cores
mpiexec -n 4 /path/to/leap/install/folder/examples/bin/cdifs_lid_driven_cavity -i input

# Run LEAP to integrate solution forward in time
mpiexec -n 4 /path/to/leap/install/folder/bin/leap -i input

Once this completes successfully, we can proceed with the integration by calling LEAP:

mpiexec -n 4 /path/to/leap/install/folder/bin/leap -i input

Note that there are additional examples users can get started with for the CDIFS and GRANS solvers:

CDIFS examples/ 
├── Lid-driven cavity flow
├── Laminar and turbulent channel flow
├── Sphere rebound on a wall
├── Settling sphere in an unbounded domain
├── Flow Past a Cylinder
├── Lamb-Oseen vortex tubes
├── Taylor Green vortex
├── Vortex dipole
└── Vortex-wall Impingement

GRANS examples/ 
├── Homogeneous cooling
├── Dry collisions between spheres and sphere-walls
└── Granular channel flow