Manual for LAGC V0.6

Purpose

LAGC is a multidimensional continuum mechanics code for time-dependent problems, solving the Lagrangian version of the dynamical equations. The code is written in C++.

Input

All input is ASCII and read from the standard input stream.

verbosity (0:low)
number_of_dimensions (1/2/3)
spatial_metric (Realfunctionnd, e.g. 1dproduct 2 constant 1.0 constant 1.0 for 2D planar)

number_of_materials
For each:
   name
   material_data (mat_type)

number_of_graphics_specifications
For each:
   x_pixels y_pixels
   auto_flag (0: inline / 1: graphics_data_files)
   wx1 wx2 wy1 wy2 (fractional range of window to use)
   sx1 sx2 sy1 sy2 (corresponding range of "real" parameter)
   fred fgreen fblue (foreground colour)
   bred bgreen bblue (background colour)
   default_line_thickness (pixels)
   output_file_stem first_dump_index
   number_of_plot_objects (drawn in the order they are specified)
   For each:
      type parameters (see below)
   pause_after_flag (0/1: yes/no)
   clear_before_flag (0/1: yes/no)

Repeated until command is "end":
command parameters (see below)

Notes:

  1. Realfunctionnd is the maths class library type.
  2. mat_type is the ARIADNE class library type.

Plot specifications

Generic functions are used to map graphical objects to the display, allowing offsets, rotations, reflections etc to be introduced. Two functions must be defined: each takes coordinates in the xy space of the graph and maps it to the x and y ordinates, respectively, of the display. Each function is a Realfunction2d object. For a 1:1 map, the definition would be
   1dproduct monomial 1.0 1.0 constant 1.0 # x-map
   1dproduct constant 1.0 monomial 1.0 1.0 # y-map
For a reflection about the x-axis, the definition could be
   1dproduct monomial 1.0 1.0 constant 1.0 # x-map
   1dproduct constant 1.0 monomial 1.0 -1.0 # y-map

Colours are specified by red, green and blue intensities, each a floating point number in the range 0 to 1.

Mesh lines: type mesh

colour
xmap ymap

Region boundaries: type boundary

colour
xmap ymap

Scalar field, colormap: type scalar_field_colored

Parameters:
parameter_name (pressure / mass_density / temperature / divu / csqv / velocity_x / velocity_y / velocity_z / artificial_viscosity / material / region / grain)
colormap_type (thermal / greyscale / spectral)
cyclic_setting (fixed / cyclic)
vmin vmax (colormap range)
number_of_colors
xmap ymap
If the cyclic setting is "cyclic", the colormap cycles through the same series of colours for field values outside the colormap range. If set to "fixed", field values outside the range are set to the range endpoints.

Vector field, arrows: type vector_field

Parameters:
parameter_name (velocity)
scale_vector
colour
head_length head_angle
xmap ymap

Draw a line: type line

Parameters:
colour
thickness (pixels)
start_point end_point

Draw an arrow: type arrow

Parameters:
colour
thickness (pixels)
start_point end_point
head_length (fraction of arrow length)
head_angle (degrees)

Draw text: type text

Parameters:
colour
thickness (pixels)
italic_shift (fraction, 0 for non-italic)
writing_angle (degrees anticlockwise from horizontal)
xscale yscale
scale_type (pixel / subject / screen)
start_position
text (no whitespace)

Write time stamp: type time

Parameters:
colour
thickness (pixels)
italic_shift (fraction, 0 for non-italic)
writing_angle (degrees anticlockwise from horizontal)
xscale yscale
scale_type (pixel / subject / screen)
format (C I/O string, e.g. %6.2f for float 6 characters wide with 2 decimal places)
start_position

Commands

Generate new mesh: generate

Subsequent input:
dump_file

generation_mode: independent or specified
If "independent":
   origin_vector_wrt_lab origin_vector_wrt_axes
   If >1D: For each dimension:
      vxi (D-vector giving direction for that axis, should be a unit vector)
   For each direction:
      number_of_tiling_regions
      For each:
         type parameters (see below)
   If >1D: mesh_type (rectilinear / triangulated / tetrahedral)
If "specified":
   number_of_nodes
   For each: position
   number_of_cells
   For each:
      number_of_nodes_defining_cell
      For each: index (base 0)

number_of_foreground_regions
For each:
   name type parameters (see below)

number_of_detonics_regions
For each:

boundary_accuracy
number_of_velocity_constraints
For each:
   type parameters:
      applied
         enclosing_surface (Surface)
         amplitude (Realfunction1d of time)
         orientation_vector
      normal
         enclosing_surface (Surface)
         amplitude (Realfunction1d of time)
      translation
         enclosing_surface (Surface)
         translation_vector
number_of_stress_constraints
For each:
   type parameters:
      applied
         enclosing_surface (Surface)
         pressure (Realfunction1d of time)
         deviatoric stress components (each Realfunction1d of time)
            s11 s22 s33 s23 s31 s12
      mirror
         enclosing_surface (Surface)
      translation
         enclosing_surface (Surface)
         translation_vector
number_of_propellors
For each:
   enclosing_surface (Surface)
   orientation_vector
   pressure (Realfunction1d of magnitude of velocity)
number_of_material_sources
For each:
   location velocity material_name material_state amplitude (Realfunction1d of time)
number_of_heat_sources
For each:
   location heating_rate (power / volume)
number_of_detonics_sources
For each:
   location time
number_of_detonics_inert_boundary_nodes
For each:
   node_index inner_node_index

Types of tiling definition:

uniform
uniform region_width cell_width
geometric
geometric region_width initial_cell_width expansion_factor
modified_geometric
geometric region_width initial_cell_width final_cell_width
weighted: cell size is a general function of position
weighted region_width cell_width_function (type Realfunction1d)
relative weighted: cell size is a general function of fractional position across the width
relative_weighted region_width cell_width_function (type Realfunction1d)
absolute position: specify final ordinate instead of width, modifies any other tiling type
absolute tiling_type parameters
randomised, modifies any other tiling type
randomised random_amplitude tiling_type parameters

How to define a location: location_type_name parameters

Either:
   index cell_or_node_index
Or:
   nearest_position position_vector
Or:
   region surface (Surface type)

Read mesh from file: read

Subsequent input:
dump_file

Integrate continuum equations in time: integrate

Subsequent input:
dump_file

Courant_factor divergence_factor artificial_viscosity_factor evolution_factor detonation_factor (timestep safety factors)

qquad qlin (artificial viscosity parameters)

q_evolution_cutoff (max q/p for evolution to be allowed)
evolution_update_mode (1/2 for once/twice per time step)

initial_timestep growth_factor
min_timestep min_timestep_action (set / abort)
max_timestep max_timestep_action (set / abort)

eps_min eps_max (general small and large numerical cutoffs)

imaginary_sound_treatment (raw / abs)

detonics_flag (0/1 for off/on)
psi_store_u trigger_delay psi_trigger_disable
psi_wake psi_dead

autorezone_frequency (timesteps) autorezone_tolerance (0 to < 1, e.g. 0.1)

start_time end_time max_timesteps

number_of_stop_sensors
For each:
   location parameter comparison value

dump_frequency dump_filename_stem first_dump_index
node_plot_interval node_plot_filename_stem first_node_plot_index
cell_plot_interval cell_plot_filename_stem first_cell_plot_index
shock_location_file artificial_viscosity_sensitivity
graphics_time_interval
number_of_history_files
For each:
   position (D-vector) filename type (node / cell)

Rezone mesh: rezone

Subsequent input:
dump_file

Contents of dump file:

background_node_array
background_cell_array

position_offset_vector
velocity_offset_vector
enclosing_surface (Surface)

number_of_foreground_regions
For each:
   node_array
   cell_array
   enclosing_surface
   position_offset_vector
   velocity_offset_vector

Auto-rezone mesh: autorezone

Subsequent input:
dump_file
tolerance (0 to < 1, e.g. 0.1)

Supporting software

Libraries: