Overview of Running the L1d Programs

L1d is actually the middle element of a larger package that includes pre- and post-processing programs. These programs are:

Other 2-dimensional plotting can be done with GNU-Plot or any other convenient package.

Data is exchanged between the programs via ASCII data files with particular extensions to the file name. These extensions are:

Check List for Running a Simulation

  1. Define tube geometry
  2. Define gas-slug, piston and diaphragm configuration.
  3. Determine initial conditions for gas-slugs, pistons and diaphragms.
  4. Determine suitable discretization and time-step parameters for the gas-slugs.
  5. Encode the data from items 1--4 into the Python script that defines the simulation (further detail) and use l_script to create the classic input parameter file.
    It is still possible to manually edit that input parameter file but the Python script should be more convenient.
  6. If any special coding is needed, it may be added directly to the source code and selectively activated via the case index read from the start of the parameter file. This should (hopefully) be seldom required now that the parameter input more fully describes the facility configuration. If special code is added, you will need to recompile the executables.
  7. Use l_prep to generate a starting solution and discrete tube description.
    % l_prep.exe -f base_file_name -echo
    This is a good time to check that the input data is complete and consistent. With -echo option specified on the command line, all of the input parameters are echoed as the parameter file is read. This makes the console output verbose but it is easier to see what the code thinks the configuration is (as opposed to what you think it is).
  8. Use l1d to time-step the solution to a specified end-point.
    % l1d.exe -f base_file_name
    Check the early time steps to ensure that the CFL limits are reasonable and that the magnitude of the time step is reasonable. If trouble is going to occur, it will usually occur within the first few steps.
  9. Extract specific data from the solution files using l_hist, l_post and sptime as appropriate. To get a hint on what each program does and what command-line parameters are required, enter the name of the executable with no other command-line parameters. A short set of instructions will then be written to the console.

Examples

Sod's classic shock tube problem
This is the simplest example as it includes two gas slugs only. The simulation is defined in the input parameter file sod.Lp and the process of running the simulation (and producing the plots) is coordinated by the shell-script file sod.sh. Look at the shell script file to get an idea of the sequence of preparation, simulation and postprocessing.
Ideal piston being driven by air
This example considers the motion of a piston within a constant-area tube. The piston is acted upon by a single gas slug whose right-end pushes on the left-face of the piston. The simulation definition is in the parameter file piston.py and the entire simulation and plotting process can be coordinated from a single script file piston.sh.
Drummond shock tunnel
Now we get to the simulation of a real facility. The Drummond tunnel is a small, shock tube with a Mach 4 nozzle. This simulation is of the over-tailored operation of the facility with a nitrogen driver gas driving a nitrogen test gas. The simulation definition is set up in dn2.Lp while the shell-script file dn2_run.sh coordinates the simulation and dn2_post.sh coordinates the postprocessing.
T4 free-piston shock tunnel, Shot 1098 (pre-2001 geometry)
This example puts quite a few of the program's elements together with a piston, 4 gas slugs of various compositions and a couple of diaphragms to control the processing of the gases. Because of the large difference in time scales for the piston stroke and the shock-processing of the test gas, this simulation is run in two stages. First, the compression stroke until just prior to the main diaphragm rupture is defined by the input parameter file t4_1.Lp and the script file t4_stage_1_run.sh. Second, the state of the system is extracted at t=214ms and the simulation restarted under the control of t4_2.Lp and t4_stage_2_run.sh. The script file t4_stage_2_post.sh coordinates the production of an (x,t)-diagram for the shock tube and some pressure histories to compare with experimental data.
T4 free-piston shock tunnel, Shot 7864 (new geometry)
The T4 facility was upgraded to include a larger, higher pressure, secondary reservoir. This example runs the whole simulation in one go, making use of the ability of L1d to change plotting frequency. We no longer need to run simulations in two stages as was originally done for Shot 1098.
HEG free-piston shock tunnel, operating condition III
This simulates the Goettingen facility, nominally for Shot 615. Nominal conditions are 50MPa, 13MJ/kg with nitrogen as the test gas.
Last Updated: 21-Aug-1999, 30-Nov-02, 15-Jul-2005