Version:

This documentation is not for the latest stable Salvus version.

API for Cartesian2D type meshes

Salvus version: 0.11.36

This document describes all the various parameters and settings for meshes of the Cartesian2D type available when using the simple_mesh interface of SalvusMesh:

Copy
from salvus.mesh import simple_mesh
m = simple_mesh.Cartesian2D(...)
# Accessing the elements_per_wavelength parameter in the basic group
m.basic.elements_per_wavelength = 2.0

Basic Parameters group [basic]

The most important parameters for seismic wave simulations.

Required: True

Detailed description of all parameters:

  • model

    • Pretty name: 1D Model

    • Description: Model Name for predefined 1D models or filename for external 1D model file.

    • Parameter type: string

    • Required: True

  • min_period_in_seconds

    • Pretty name: Minumum Period in Seconds

    • Description: The desired minmimum period resolved by the mesh.

    • Parameter type: number

    • Required: True

  • elements_per_wavelength

    • Pretty name: Elements per Wavelength

    • Description: Number of elements per wavelength at the mimimum period. Used to calculate element sizes in the 1D model as a function of depth.

    • Parameter type: number

    • Required: True

Advanced Parameters group [advanced]

Advanced parameters for more control on seismic wave sisimulation meshes.

Required: True

Detailed description of all parameters:

  • courant_number

    • Pretty name: Courant Number

    • Description: Courant Number used to estimate dt.

    • Parameter type: number

    • Required: True

    • Default: 0.6

  • tensor_order

    • Pretty name: Tensor Order

    • Description: Spatial order used for shape mapping and model representation.

    • Parameter type: integer

    • Required: True

    • Default: 1

  • model_parameters

    • Pretty name: Model Parameters

    • Description: Model parameters to put into the mesh, defaults to the parametrization used by the 1D background model. This can be used for example to create an anisotropic parametrization of an isotropic model.

    • Parameter type: array of strings

    • Required: False

    • Default: []

    • Possible values: "g", "dg", "VP", "VS", "VSV", "VSH", "VPV", "VPH", "RHO", "QMU", "QKAPPA", "C11", "C12", "C13", "C14", "C15", "C16", "C21", "C22", "C23", "C24", "C25", "C26", "C31", "C32", "C33", "C34", "C35", "C36", "C41", "C42", "C43", "C44", "C45", "C46", "C51", "C52", "C53", "C54", "C55", "C56", "C61", "C62", "C63", "C64", "C65", "C66", "A", "C", "L", "N", "F", "XI", "PHI", "LAMBDA", "MU", "KAPPA", "ETA"

  • velocity_model_representation

    • Pretty name: Velocity Model Representation

    • Description: How to represent the velocity model on the mesh. element_nodes: values are stored on each node of each element, allows discontinuities and variations inside each element, but produces large files. elements: one value per element, allows discontinuities but the model will be piecewise constant. nodes: one value per node, enforces a continuous model, using mean at values on discontinuities. The Salvus solver currently only supports 'element_nodes'.

    • Parameter type: string

    • Required: True

    • Default: "element_nodes"

    • Possible values: "element_nodes", "elements", "nodes"

  • model_spline_order

    • Pretty name: Model Spline Order

    • Description: Spline order used for model interpolation in case of layered models. Ignored for polynomial models like PREM.

    • Parameter type: integer

    • Required: True

    • Default: 3

  • compression

    • Pretty name: Compress Mesh

    • Description: If true, the final mesh will be compressed with gzip compression level 2. Compression is most effective for constant values and the compression level does matter much in that case. Slows down the mesh IO.

    • Parameter type: boolean

    • Required: True

    • Default: true

Attenuation Arguments group [attenuation]

Parameters for the memory variable approximation of attenuation. A detailed description can be found in van Driel et al. 2014b.

Required: True

Detailed description of all parameters:

  • number_of_linear_solids

    • Pretty name: Number of Linear Solids

    • Description: The number of standard linear solids used. 5 is conservative, in many applications 3 may be sufficient.

    • Parameter type: integer

    • Required: True

    • Default: 5

  • frequencies

    • Pretty name: Frequencies

    • Description: Minimum and maximum frequencies in the attenuation band. If either is not set, it will be determined automatically. Will be overwritten by 'auto_band'.

    • Parameter type: array of numbers

    • Required: False

    • Default: [0.001, 1.0]

  • power_law_reference_frequency

    • Pretty name: Power Law Reference Frequency

    • Description: Reference frequency for power law Q = Q_0 (f / f_0)^alpha, where Q_0 is taken from background model [Hz]. Also see Fichtner & van Driel 2014.*

    • Parameter type: number

    • Required: True

    • Default: 1.0

  • power_law_alpha

    • Pretty name: Power Law Alpha

    • Description: Exponent alpha for power law Q = Q_0 (f / f_0)^alpha. Also see Fichtner & van Driel 2014.*

    • Parameter type: number

    • Required: True

    • Default: 0.0

  • auto_band

    • Pretty name: Auto frequency bands

    • Description: Automatically determine attenuation band [f_min, f_max] using an empirical relation for the bandwidth and the resolved frequency of the mesh (provided in basic). Will overwrite any given frequencies.

    • Parameter type: boolean

    • Required: True

    • Default: true

Cartesian Arguments group [cartesian]

Parameters defining the domain for 2D cartesian meshes.

Required: True

Detailed description of all parameters:

  • x

    • Pretty name: X Range

    • Description: X dimension of the domain in km. The second item defaults to the scale of the 1D model.

    • Parameter type: array of null or number

    • Required: True

    • Default: [0.0, None]

  • y

    • Pretty name: Y Range

    • Description: Y dimension of the domain in km. The second item defaults to the second item of the x dimension if not specified.

    • Parameter type: array of null or number

    • Required: True

    • Default: [0.0, None]

Absorbing Boundary group [absorbing_boundaries]

Parameters for the addition of absorbing boundary elements.

Required: True

Detailed description of all parameters:

  • number_of_wavelengths

    • Pretty name: Number of Wavelengths.

    • Description: Width of the absorbing boundary in number of wavelengths at the reference velocity and frequency. For best performance, we recommend that this parameter is set to 3.5 or more. If set to zero, only first order absorbing boundaries are used.

    • Parameter type: number

    • Required: True

    • Default: 0.0

  • reference_velocity

    • Pretty name: Reference Velocity

    • Description: Reference velocity which is used in the 'number_of_wavelengths' calculation. If the velocity is varying along the boundary, an average value may suffice. If undesirable reflections are still encountered it is best to trend towards the lowest velocity in the mesh, leading to a thicker absorbing layer.

    • Parameter type: number

    • Required: True

    • Default: 0.0

  • reference_frequency

    • Pretty name: Reference Frequency

    • Description: Reference frequency used in the 'number_of_wavelengths' calculation. This may require some tuning for optimal performance, but a good starting point is setting it to the center frequency of your source. Use lower values to be more conervative.

    • Parameter type: ['number', 'string']

    • Required: True

    • Default: inf

  • side_sets

    • Pretty name: Side Sets

    • Description: List of absorbing side sets to extended for sponge layers. At the moment only supports ['all'] and ['all_except_free_surface'] for cartesian and only ['all_except_free_surface'] for spherical meshes, or ['none'].

    • Parameter type: array of strings

    • Required: True

    • Default: ['none']

Refinement Arguments group [refinement]

Parameters for refinement of the meshes based on the 1D model.

Required: True

Detailed description of all parameters:

  • refinement_style

    • Pretty name: Refinement Style

    • Description: The mesh refinement style. 'doubling' produces the highest quality elements and lowest element number, 'tripling' may be best for models with strong velocity constrasts. 'local' and 'local_stable' allow non monotonous size functions, the refinement factor is 3 for both.

    • Parameter type: string

    • Required: True

    • Default: "doubling"

    • Possible values: "doubling", "tripling", "local", "local_stable"

  • hmax_refinement

    • Pretty name: h_max Refinement

    • Description: Criterion (vertical oversamping factor BEFORE the refinement) for moving refinement layers downwards to avoid small timesteps caused by placing a refinement into a thin layer. Smaller values = more aggressive, needs to be > 1. For coarse meshes, larger values may be required. Ignored for 'local' refinement styles, if available.

    • Parameter type: number

    • Required: True

    • Default: 1.5

  • refinement_bottom_up

    • Pretty name: Refinement Bottom Up

    • Description: There are two approaches of locating refinements in the mesh: top down approach means minimizing number of elements at the surface at the cost of more elements at the bottom (default). If the option refinement_bottom_up is set, the bottom up approach is used instead, that is minimizing number of elements at the bottom at the cost of more elements at the surface. Which one is more efficient depends on the velocity model and refinement style. Ignored for 'local' refinement styles, if available.

    • Parameter type: boolean

    • Required: True

    • Default: false

  • horizontal_max_slowness_layer_index

    • Pretty name: Horizontal maximum slowness layer index (EXPERIMENTAL)

    • Description: For low velocity layers at the surface, horizontal refinements can be avoided if the source is below the LVL and hence cannot excite waves above a certain slowness. This is a 1D argument and might not me valid in 3D, hence check carefully. Ignored for 'local' refinement styles, if available.

    • Parameter type: integer

    • Required: True

    • Default: 0

PAGE CONTENTS