Input Parameter File Description

The input parameter file consists of 5 sections. These are

  1. the global (simulation control) parameters,
  2. the tube description,
  3. npiston sets of piston parameters (numbered 0 through npiston - 1),
  4. ndiaphragm sets of diaphragm parameters, and
  5. nslug sets of gas-slug parameters.
See the example files supplied with the source code.

Note that when several elements appear on a line, this document uses commas to delimit the elements. However, the actual parameter file uses white space as the delimiter.

When running l1d.exe, these input parameters are read first, followed by a previously generated solution (from l_prep.exe or l1d.exe). In the process of reading this previous solution, some of the parameters (such as piston status flags) are set to the solution values. This facilitates the restarting of the calculation from any previously generated solution without having to change the parameter file.

Global Parameter Block

The global parameter block consists of:
Line 1: title_string
Title line consisting of (up to) 132 characters. With the changes to the input parameter file, this line must now start with the correct version identifier string. Currently, this string should be #L1d-3.0
Line 2: case_id, gas_index, fr_chem
The integer value for case_id is used within the program to select special-purpose code for specific simulations. This identifier will be less used now that most of the configuration information is entered via the input-parameter file.
Mostly, this value should be left as 0.
gas_index selects the thermo-chemical model (which, in turn, sets the number of species). Look in the file gas.h for a current list of the gas models and their integer indices.
fr_chem=1 turns on the finite-rate chemistry update. A value of 0 leaves it inactive and is appropriate for both ideal-gas models and equilibrium-chemistry models. Use the finite-rate chemistry update with the perfect-gas-mix (22) thermo-chemistry model.
Line 3: nslug, npiston, ndiaphragm
nslug is the number of gas slugs (>= 1). It may be convenient to divide one length of gas in the physical system into a number of slugs for the simulation.
npiston is the number of pistons/projectiles (>= 0)
ndiaphragm is the number of diaphragms (>= 0)
Line 4: max_time, max_step
max_time is the simulation time (in seconds) at which integration will stop
max_step is the maximum number of time steps allowed before stopping time integration
Line 5: dt_init, CFL
dt_init is the initial simulation time step (in seconds). The initial time step should be selected to ensure that the maximum CFL number computed in the first time step should be less than 0.5. This may involve some trial and error process.
CFL is the desired CFL number (should be <= 0.5)
Line 6: Xorder, Torder, k
Xorder = 1: use cell averages without high-order reconstruction. Use this only if the second-order calculation is showing problems.
Xorder = 2: use limited reconstruction (nominally second order). This should be the standard setting.
Torder = 1: Euler time-stepping. This is generally cheap and nasty.
Torder = 2: predictor-corrector time-stepping (nominally second order. This should be the better (standard) setting. It is, however, twice as cpu intensive as Euler time-stepping.
k is the thermal-damping coefficient. If the temperature glitches at contact surfaces are a big worry, try a non-zero value. A value of 0.01 seems to improve the extremes of the glitch for the Sod shock tube case. There is, however, a price to pay as the misplaced energy is moved into near-by cells. Also, large values of k can destabilize the time stepping scheme.
Line 7: n_dt_plot
n_dt_plot is the number of sets of time increments for plotting and history files.
Line 7.1 through 7.n_dt_plot: t_change, dt_plot, dt_his
t_change is the time at which these time intervals take effect. By default, the first set is used.
dt_plot is the simulation time interval between recorded solutions. An entire solution is appended to the output file.
dt_his is the simulation time interval between recorded data at specified locations / cells. Data for particular cells and x-locations are appended to the appropriate history files. These changes in time increments can be used to advantage when trying to get adequate resolution in (x,t)-diagrams without having to accumulate large numbers of samples prior to the interesting period. See the sptime postprocessing program.
Line 8: hnloc
hnloc is the number of x-locations at which the flow history is recorded.
Line 8.1 through 8.hnloc: hxloc[i]
hxloc[i] is the i-th x-location. These locations should be chosen so that they always fall within a gas slug. If, during the output process a location lies outside all gas slugs, dummy values are written to the history file. Also, take care to put them in constant-area regions of the tube definition. If they are placed in area transitions, the interpolated data is likely to be unreliable.

Tube Definition Block

The tube-definition block consists of one comment line followed by three sub-blocks:

  1. tube-diameter versus distance definition;
  2. loss regions;
  3. wall-temperature distribution.

Diameter versus distance

Line 1: n, nseg
n is the number of small segments that will be used to describe the tube's area distribution internal to the simulation. To enable a fast lookup process for the area calculation, the area variation between equally-spaced x-positions is taken to be linear. In hindsight, it may have been better to hide this parameter somewhere else.
The user actually describes the area distribution as a smaller number, nseg, of larger segments with effective diameters specified at the end points (or break points). The diameter variation between these breakpoints can be linear or cubic.
Internal to the simulation, this description is approximated as n segments, each having a linear variation of area with x, starting from the point xb[0]. The tube area is taken to be constant outside the range xb[0]...xb[nseg].
Line 2...nseg+2: xb[i], Diamb[i], linear[i]
The first user-defined segment is from xb[0] to xb[1] and its diameter varies from Diamb[0] to Diamb[1]. If linear[0] == 1, the diameter variation is linear with distance else it will be a cubic such that ddiam/dx = 0 at the end points of the segment. nseg+1 break points are required to define nseg segments.

Loss Regions

Line 1: nKL
Number of area transitions or tube fittings that result in head loss.
Line 2... : xbeginK[i], xendK[i], Kvalue[i]
for i = 0...nKL
Look up your gas-dynamic text, decide a loss factor K for each area transition and spread that effect over a finite distance. For contractions, spread the loss factor over a region on the high-speed side.

Wall Temperature Definition

Line 1: T_nominal, nT
T_nominal is the nominal wall temperature in the absence of a patch of differing temperature.
nT is the number of patches in which a different wall temperature will be imposed.
Line 2... : xbeginT[i], xendT[i], T_Wall[i]
for i = 0...nT, these are the patches of different temperature.

Piston Parameter Block

Each piston parameter block consists of:
Line 1: title_string
line (up to 132 characters)
Line 2: type_of_piston
0 = ideal piston with no friction
1 = T4 (Queensland University) piston with chevron seals and friction
2 = plastic piston (not yet implemented)
3 = LLNL pump piston with chevron seals
4 = LLNL projectile with no friction
5 = T5 (Caltech) piston
6 = Gene-gun piston, Samih Nabulsi and Adam Duval
7 = HEG piston (at DLR Goettingen)
8 = TQ piston
9 = piston in the Oxford gun tunnel
10 = piston in T3 Canberra
11 = piston for Aki Sasoh's expansion tube at SWRC
12 = piston for the new (simpler) X2 driver
13 = piston for the (hypothetical) HYPULSE driver
14 = Randy Chue's specified-velocity piston
Line 3: mass, diam, length
mass is the mass of the piston in kg
diam is the effective diameter of the piston in m. This would normally be the same as the tube diameter.
length is the length of the piston in m. The reference point on the piston is assumed to be the mid-point.
Line 4: p_restrain, is_restrain
p_restrain is the pressure (in Pa) at which the piston will be released
is_restrain is a flag for the piston status: 1 = restrained; 0 = free
Line 5: x_buffer, hit_buffer
x_buffer is the location of the buffer (with respect to the piston midpoint) in m
hit_buffer indicated if the piston has hit the buffer already: 1 = yes; 0 = no
Line 6: with_brakes, brakes_on
with_brakes = 1 if the piston is equipped with brakes; 0 otherwise
brakes_on = 1 if the brakes are applied; 0 otherwise
Line 7: left_slug_id, left_slug_end_id
left_slug_id is the index number (0..nslug-1) of the gas slug connected to the left-side (back-side) of the piston. If no slug is connected, specify -1.
left_slug_end_id indicates which end of the gas slug is connected. 0 or L == left-end, 1 or R == right-end.
Line 8: right_slug_id, right_slug_end_id
right_slug_id is the index number (0..nslug-1) of the gas slug connected to the right-side (front-side) of the piston. If no slug is connected, specify -1.
right_slug_end_id indicates which end of the gas slug is connected. 0 or L == left-end, 1 or R == right-end.
Line 9: x0, V0
x0 is the initial position of the piston midpoint in m
V0 is the initial piston velocity in m/s.

Diaphragm Parameter Block

Each diaphragm parameter block consists of:
Line 1: title line (up to 132 characters)
Line 2: is_burst, P_burst, hold_period, blend_delay, blend_dx
is_burst gives the diaphragm status: 0 = intact; 1 = burst
P_burst is the pressure (in Pa) at which the diaphragm ruptures.
hold_period is the time delay (in seconds) from the application of excess pressure to the rupture of the diaphragm.
blend_delay is the time delay, after diaphragm rupture, before application of the blending function.
blend_dx is the distance over which the blending is applied. This is split equally betweens the slugs so each slug is affected up to a distance 0.5*blend_dx from its end. If the slug is shorter than 0.5*blend_dx then the whole slug is involved with the blend.
Line 3: left_slug_id, left_slug_end_id, dx
left_slug_id is the index number (0..nslug-1) of the gas slug connected to the left-side of the diaphragm.
left_slug_end_id indicates which end of the gas slug is connected. 0 or L == left-end, 1 or R == right-end.
dx is the distance over which gas pressure is sampled.
Line 4: right_slug_id, right_slug_end_id, dx
right_slug_id is the index number (0..nslug-1) of the gas slug connected to the right-side of the diaphragm.
right_slug_end_id indicates which end of the gas slug is connected. 0 or L == left-end, 1 or R == right-end.
dx is the distance over which gas pressure is sampled.

Gas-Slug Parameter Block

Each gas-slug parameter block consists of:
Line 1: title line (up to 132 characters)
Line 2: nnx, to_end_1, to_end_2, strength
nnx is the initial number of internal/active cells in this gas slug
The initial cell distribution is based on Robert's stretching transformation.
If to_end_i == 1 then the cells will be clustered toward end-i with the degree of clustering controlled by the value of strength.
strength == 0.0 : uniform distribution
strength > 1.0 : clustered with stronger nonuniformity as the value approaches 1.0.
Line 3: nxmax, adaptive, dxmin, dxmax
nxmax is the maximum number of cells that may be contained within the gas slug at any time in the simulation.
adaptive==0: the slug will not be refined.
adaptive==1: the slug will be adapted (by splitting or fusing cells) to better capture the flow solution. Roughly speaking, cells will be merged with their neighbours if their size is less than dxmin and cells will be split if they exceed size dxmax.
adaptive==2: the slug will be adapted by cell-fusing only. This may be useful when the slug is being processed by a strong shock and some of the cells are becoming very small because of boundary-layer bleed (i.e. Mirel's effect).
adaptive==3: the slug will be adapted by cell-splitting only. This may be useful when the slug is being processed by a strong expansion and some of the cells have become unreasonably large.
Line 4: viscous_effects, adiabatic
viscous_effects is a flag for including the viscous source terms:
0 = inviscid equations only;
1 = include viscous source terms F_wall_, loss_, q; friction factor for pipe flow
2 = use Con Doolan's laminar mass-loss model if the mass within a cell is greater than MINIMUM_MASS as set in l1d.h
3 = use Con Doolan's turbulent mass-loss model if the mass within a cell is greater than MINIMUM_MASS as set in l1d.h
4 = include viscous source terms F_wall_, loss_, q; friction factor for flat plate
5 = use David Buttsworth's mass-loss model with pipe-flow friction factor.
6 = use David Buttsworth's mass-loss model with flat-plate friction factor.
7 = include viscous source terms F_wall_, loss_, q; friction factor for pipe flow; half heat flux
adiabatic is a flag to indicate which wall temperature is to be used
0 = wall temperatures specified in the area input file are to be used
1 = adiabatic wall temperatures are to be used
Line 5: control_string, one or more arguments
Left-boundary control_string is one of Depending on the type of boundary condition the following arguments are also required.
Free Boundary
Nothing further is required.
Solid-wall with specified velocity
velocity
The velocity is specified in m/s. A fixed wall is simply specified as having zero velocity.
Piston
piston_id
piston_id is the index (in range 0..npiston-1) of the piston connected to the end of the gas-slug
Another gas slug
gas_slug_id, gas_slug_end_id
gas_slug_id is the index (in range 0..nslug-1) of the neighbouring gas slug connected to the boundary
gas_slug_end_id identifies which end of the neighbouring gas slug connects to the current boundary 0 or L == left-end, 1 or R == right-end.
Another gas slug with diaphragm control
gas_slug_id, gas_slug_end_id, diaphragm_id
gas_slug_id is the index (in range 0..nslug-1) of the neighbouring gas slug connected to the boundary
gas_slug_end_id identifies which end of the neighbouring gas slug connects to the current boundary 0 or L == left-end, 1 or R == right-end.
diaphragm_id (in range 0..ndiaphragm-1) identifies which diaphragm controls the interaction at the current boundary.
Line 6: control_string, one or more arguments
Right-boundary definition, as for left-boundary definition above.
Line 7: hncell
hncell is the number of cells for which the flow histories will be recorded
Line 8 through 7 + hncell: hxcell[i]
hxcell[i] is the index of the i-th history cell.
It probably makes sense to use history cells only for slugs using a fixed number of cells. The adaptivity can mess up the identification of all cells, except the first cell, in a gas slug.
Line 9: x1, x2, p, u, T
x1, x2 are the initial locations (in m) of the left- and right-boundaries of the gas slug.
p is the pressure (in N/m2) of the gas in this slug
u is the initial velocity (in m/s) of the gas in this slug
T is the temperature (in degrees K) of the gas
Line 10: f[0] [ f[1] ... f[nsp]-1 ]
f[isp], isp=0..nsp-1 are the species mass-fractions. The number is set by the thermo-chemical model code but at least one is always required. Also, the values should sum to 1.0.
Last Updated:
19-Jan-1999...12-Jan-04, 15-Jul-2005
P. A. Jacobs