Initial conditions are specified in terms of spatial regions, which may have a constant state and velocity within, or a set of constant states within "grains" defined by their centres, or by a spatially-varying state and velocity. For spatially-varying conditions, a function of position is defined, and a tabulation of function values against material state and velocity; in this way the material state and/or velocity can be made a continuously-varying function of position, using linear interpolation over a single degree of freedom. The function may be a general function of position, or radial distance from a chosen position, or linear distance from a point in a given direction.
The code is written in C++, and uses the WSTS maths and Ariadne material properties libraries to allow very general function forms and material types to be defined in the input.
verbosity (0:low) 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) bred bgreen bblue (background colour) 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:
Realfunctionnd
is the maths class library type.
mat_type
is the ARIADNE class library type.
direct
: direct mapping from problem to graphics coordinates.
reflect_x
: reflect x-ordinates in y-axis.
reflect_y
: reflect y-ordinates in x-axis.
translate
followed by translation 2-vector dx dy
.
rotate
followed by angle anticlockwise in degrees
scale
followed by x and y scalings
polar
: r,theta (degrees)
nested number_of_mappings For each: mapping_name parameterswhere the mappings are applied in reverse sequence.
general
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.
All the other maps can be reproduced, but the simple ones are not obvious to
look at.
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-mapFor 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
colour xmap ymap
boundary
colour xmap ymap
scalar_field_colored
parameter_name (pressure / stress_11 / stress_22 / stress_33 / stress_23 / stress_31 / stress_12 / 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 ymapIf 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.
scalar_field_contoured
parameter_name (pressure / stress_11 / stress_22 / stress_33 / stress_23 / stress_31 / stress_12 / mass_density / temperature / divu / csqv / velocity_x / velocity_y / velocity_z / artificial_viscosity) definition_type (specified or uniform) If specified: number_of_contours For each: value colour thickness If uniform: value1 value2 interval colour thickness xmap ymap
vector_field
parameter_name (velocity) scale_vector colour head_length head_angle xmap ymap
line
colour thickness (pixels) start_point end_point
arrow
colour thickness (pixels) start_point end_point head_length (fraction of arrow length) head_angle (degrees)
text
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)
time
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
generate
dump_file number_of_dimensions_D (1/2/3) spatial_metric (type name followed by parameters as required): plane axisymmetric_x reps (x is rotation axis, y radius; reps cuts off small radii) axisymmetric_y reps (y is rotation axis, x radius) spherical reps (x is radius) general fn (Realfunctionnd) gravity (type name followed by parameters as required): none constant d (D-vector)` radial fr (Realfunction1d) radial_extrapolated fr rmax power (fr is Realfunction1d; uses (r/rmax)^(-power) at larger radii) time_scale ft gg (ft is Realfunction1d of time; gg is a gravity object as above) time 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 boundary (WSTS Surface* object) Possible types, with parameters constant material_name state velocity table1d_radial reference_position_vector material_name number_of_table_entries For each table entry: function_value material_state velocity_vector table1d_linear reference_position_vector direction_vector material_name number_of_table_entries For each table entry: function_value material_state velocity_vector table1d_function map_function (WSTS Realfunctionnd * with dimensionality of the problem) material_name number_of_table_entries For each table entry: function_value material_state velocity_vector polygrain number_of_seeds For each seed: material_name state velocity centre weight number_of_images_of_seed_array For each image: displacement_vector number_of_detonics_regions For each: name (from list of region names) boundary_accuracy number_of_velocity_constraints For each: type parameters: applied enclosing_surface (Surface) amplitude (Realfunction1d of time) spatially_varying enclosing_surface (Surface) amplitude (Realfunction1d of time) orientation_vector spatial_scaling_functions (Realfunction1d of each ordinate in turn; values are multiplied) applied_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 spatially_varying enclosing_surface (Surface) pressure (Realfunction1d of time) deviatoric stress components (each Realfunction1d of time) s11 s22 s33 s23 s31 s12 spatial_scaling_functions (Realfunction1d of each ordinate in turn; values are multiplied) number_of_passes_for_fitting_mesh_to_regions mesh_margin_fitting_option (0: don't move nodes on margin, 1: only move margin nodes along margin, 2: move margin nodes freely) number_of_passes_for_fitting_mesh_to_grains 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 region_width cell_width
geometric region_width initial_cell_width expansion_factor
modified_geometric region_width initial_cell_width final_cell_width
weighted region_width cell_width_function (type Realfunction1d)
relative_weighted region_width cell_width_function (type Realfunction1d)
absolute tiling_type parameters
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
dump_file
integrate
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 / ignore / 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) Integration period, either: until end_time Or: for time_duration 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
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
autorezone
dump_file tolerance (0 to < 1, e.g. 0.1)
A code error in which, after many remeshings, cell indexing could lead to pairs of cells with the same nodes, is believed to be fixed when compiled with version 2.3 of the maths library.