1D Lagrangian Hydrocode

Input

All ASCII, read from stdin. Where an index is required, this uses the C numbering conventions i.e. the first index is 0.
Verbosity
verbose	(1: diagnostic output)
Geometry
Space
scale_function

Standard settings:

Plane geometry
1:
constant 1.0
Cylindrical symmetry (centre at x = 0)
x:
monomial 1.0 1.0
Spherical symmetry (centre at x = 0)
x2:
monomial 2.0 1.0
Duct of varying profile
table1d
n # number of points in table
x1 A1
x2 A2
...
xn An
where (x,A) are (position,area) pairs.
Materials
number
For each:
   definition

Materials are of type mat_type in Ariadne.

Nodes
number
For each:
   position velocity
   number_of_cells_using_node
   For each:
      index
Cells
number
For each:
   density specific_internal_energy fraction_reacted
   index_of_material
   number_of_nodes_defining_cell
   For each:
      index
Boundary conditions
Left then right:
For each:
   type (applied_velocity or applied_pressure) function_of_time
State sources
number
For each:
   cell_location velocity material_name material_state amplitude

The amplitude is a function of time, used to scale the velocity and state. The material name is needed to determine the tye of state to read in; this cannot be determined from the cell index because of the structure of the program so this degree of redundancy is needed. (See note below on defining locations.)

Heat sources
number
For each:
   cell_location_1 cell_location_2 heating_rate

The heating rate is a function of time. It defines the heat energy per time applied to each cell in the range. (See note below on defining locations.)

Detonics control points
number
For each:
   cell_location time

At a control point, the time is for the detonation wave to pass the cell centre. (See note below on defining locations.)

Detonics inert boundary nodes
number
For each:
   node_location location_of_nearest_node_inside_explosive
(See note below on defining locations.)
Timestep safety factors
sound_speed divergence artificial_viscosity evolution_rate detonation

The timestep safety factors are used to ensure that the numerical scheme is stable, accurate and convergent. Each physical process has an associated timescale. The time increments taken during a simulation must be small enough that each process can be represented properly. On the other hand, unnecessarily small time steps require more computer time, and can make the result less accurate because of numerical rounding and diffusion processes.

If all the safety factors are set to 1 then the numerical scheme would take its best guess at a timestep. This assumes linear physics, which is not really the case. For non-linear processes it is common to adopt a safety factor ~0.7 say. For stiffer problems, 0.4 seems more reliable.

The timescales are:

The sound speed and divergence safety factors
Artificial viscosity parameters
quadratic linear
qmode
q_evolve_cut		maximum q/p for evolution to proceed

Notes:

Evolution integration
order

Permissible values:

Detonics controls
flag (0: off, 1: on)
psi_store_u (value of psi field at which to store local particle velocity)
trigger_delay (delay between triggering of WBL/DSD initiation point
   and actual value used for the new control point)
psi_trigger_disable (value of psi at which to disable WBL/DSD triggering)
psi_wake (value of psi at which to start full detonics)
psi_dead (value of psi at which to ignore detonics)
Timestep controls
initial_timestep growth_factor
minimum_timestep action
maximum_timestep action

"action" can be "set" or "abort". The action is taken if the calculated timestep falls outwith the corresponding limit.

Numerical bandwidths
approximate_zero approximate_infinity
Control of imaginary sound speeds
cc_option

Permitted values:

raw	no action (will probably fail if imaginary speeds are calculated)
ignore	don't use imaginary values in calculating time step
abs	take (sq. root of) absolute value of square of sound speed
Time integration
start_time final_time maximum_timesteps
Automatic stop controls
number_of_conditions
For each:
   position_in_initial_mesh (as a cell location)
   parameter (pressure / temperature)
   relation  (above / below)
   test_value
(See note below on defining locations.)
Output control
Complete state dumps and plotting data are written to two series of numbered output files, of the form STEMXXX, where XXX is a three digit number.
number_of_steps_between_outputs  output_file_stem  first_output_index
time_interval_between_node_plot_dumps  node_plot_file_stem  first_output_index
time_interval_between_cell_plot_dumps  cell_plot_file_stem  first_output_index
name_of_shock_location_file artificial_viscosity_cutoff
number_of_Lagrangian_sensors
For each:
   initial_position filename type
number_of_extremum_sensors
For each:
   cell_location_end1 cell_location_end2 sense (maximum / minimum) parameter (pressure/temperature/velocity) filename

"type" is "node" or "cell". Position is specified as a location (see note below on defining locations).

The artificial viscosity cutoff is used to select the level at which a compression wave is taken to be a shock. The cell centre closest to each Lagrangian sensor is found, and the state in this cell written to the specified file at each time step.

Defining locations

Lagrangian locations in the mesh may be defined in several ways, according to preference. In each case, a keyword is given, followed by a numerical value if necessary.
Index of cell or node (as appropriate for the quantity being defined)
   index index_value
Indices are base zero, following the C array convention.
Position in real space
   position ordinate
Logical end of mesh
   sense end
where end may be left or right.

Output

All ASCII. Apart from timestep information, restart and graphics dumps are written.

Restart dumps

# dump at time = ...
(geometry information)

The geometry information consists of node and cell states, followed by the boundary conditions. It can be used to restart the calculation by inserting the rest of the control data round about.

Graphics dumps

Node plot:
# node plot at time = ....
# parameters: pos, vel, stress, T, csq, q, psi, u0, d
For each node:
   position velocity stress (6 components) T c2 q psi u0 D

Cell plot:

# cell plot at time = ....
# parameters: pos, vel, stress, T, csq, q, psi, u0, d, material, state
For each node:
   position velocity stress (6 components) T c2 q psi u0 D material state

For node plots, apart from position and velocity, quantities are averaged from the cells containing the node. For cell plots, position and velocity are averaged from nodes defining the cell.

The graphics dumps are suitable for display using Gnuplot.

Shock location

A single file is produced containing the position of shocks (maxima in q/rho) after each time step. This method can also identify any small variations in q/rho as a shock, so a cutoff value of q is supplied in the input below which would-be shocks are ignored. The cutoff varies with mesh resolution, smaller cells requiring a smaller cutoff to pick up the same shocks, all else being equal.

Lagrangian sensor points

A set of files is produced, each containing the position, particle velocity and state at the cell centre chosen.

Files