salvus.project.configuration.model
salvus.project.configuration.model salvus project configuration model Model configurations.
Classes
LinearSolids
LinearSolidsclass LinearSolids(salvus.flow.utils.serialization_helpers.SerializationMixin):
def __init__(
self,
reference_frequency: salvus._core.types.float_,
min_frequency: (
salvus._core.types.float_
| typing.Callable[[UnstructuredMesh], salvus._core.types.float_]
| None
) = None,
max_frequency: (
salvus._core.types.float_
| typing.Callable[[UnstructuredMesh], salvus._core.types.float_]
| None
) = None,
): ...Keeps track of the initial arguments passed to an objects and can later on serialize them to JSON document.
It will only consider whatever is passed in the init.
Parameters controlling the use of linear solids in viscous simulations.
The frequency band for fitting the linear solid approximation can either be provided through this interface, in which case a constant Q factor model will be constructed internally.
This reference frequency is the frequency at which any acoustic or elastic parameters provided in the model are defined. The minimum and maximum frequency are optional. If provided, they define the frequency band over which Q should be considered constant. If these parameters are not supplied here, they will be derived from the mesh frequency.
For more details, please see https://doi.org/10.1093/gji/ggu314.
Alternatively, the viscous parameters can be provided externally by attaching them to the mesh directly or using the linear solid models directly from the built-in 1-D models. Both options are mutually exclusive to avoid ambiguities.
reference_frequencysalvus._core.types.float_ — Frequency at which material parameters are defined.min_frequencysalvus._core.types.float_ | typing.Callable[[UnstructuredMesh], salvus._core.types.float_] | None — Minimum frequency used when fitting the linear solid approximation is valid. IfNone, defer the computation of this value until later (for instance, until a mesh is built for a specific frequency).max_frequencysalvus._core.types.float_ | typing.Callable[[UnstructuredMesh], salvus._core.types.float_] | None — Maximum frequency used when fitting the linear solid approximation is valid. IfNone, defer the computation of this value until later (for instance, until a mesh is built for a specific frequency).
reference_frequency float
reference_frequency floatGet the reference frequency.
from_json()
from_json()def from_json(d: builtins.dict) -> Any: ...Recreate the object from a dictionary serialization of its initialization parameters.
dbuiltins.dict — Dictionary containing its init parameters and a few other things.
max_frequency()
max_frequency()def max_frequency(
self, mesh_frequency: float, mesh: UnstructuredMesh | None = None
) -> float: ...Return or compute the maximum frequency for fitting a constant Q in a linear solid.
If the frequency has not been provided, a default is computed based on the values in Fig. 4 of van Driel & Nissen-Meyer (2014). The target frequency is chosen as the maximum of mesh frequency and the reference frequency of the linear solids.
mesh_frequencyfloat — The maximum frequency resolved by the mesh.meshUnstructuredMesh | None — An optional mesh object for deferred frequency computation.
min_frequency()
min_frequency()def min_frequency(
self, mesh_frequency: float, mesh: UnstructuredMesh | None = None
) -> float: ...Return or compute the minimum frequency for fitting a constant Q in a linear solid.
If the frequency has not been provided, a default is computed based on the values in Fig. 4 of van Driel & Nissen-Meyer (2014). The target frequency is chosen as the minimum of mesh frequency and the reference frequency of the linear solids.
mesh_frequencyfloat — The maximum frequency resolved by the mesh.meshUnstructuredMesh | None — An optional mesh object for deferred frequency computation.
to_json()
to_json()def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...Serialize the object to a dictionary that can be written to JSON.
external_file_hashtypes — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.timertypes — Execution timer.log_to_loggerbool — Log timings to the logger.commtypes — MPI communicator, if any.
ModelConfiguration
ModelConfigurationclass ModelConfiguration(
salvus.flow.utils.serialization_helpers.SerializationMixin
):
def __init__(
self,
background_model: str | _BackgroundBase | None = None,
volume_models: list[str] | str | None = None,
linear_solids: LinearSolids | None = None,
) -> None: ...Model configuration.
This is a collection of up to one background model with any number of volumetric material models. At mesh building time all models added to a configuration part will be combined and interpolated onto the mesh.
background_modelstr | _BackgroundBase | None — The background model definition.volume_modelslist[str] | str | None — A list of volumetric models.linear_solidsLinearSolids | None — A set of parameters which describe the linear solids to be used in viscous simulations.
background_model str | _BackgroundBase | None
background_model str | _BackgroundBase | NoneThe background model.
linear_solids LinearSolids | None
linear_solids LinearSolids | NoneThe parameters governing any linear solids to be attached.
volume_models list[str] | None
volume_models list[str] | NoneThe volume models.
from_json()
from_json()def from_json(d: builtins.dict) -> Any: ...Recreate the object from a dictionary serialization of its initialization parameters.
dbuiltins.dict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self) -> dict: ...Serialize the object to dictionary that can be written to JSON.
Submodules
salvus.project.configuration.model.backgroundsalvus.project.configuration.model.utilssalvus.project.configuration.model.volume
Used in tutorials
- 2-D Global-scale simulations w/ heterogeneous models
- Acoustic simulations in isotropic and anisotropic media
- Attenuation
- Constructing the Starting Model
- Continental Scale FWI - Part 2: Forward simulations
- Continental Scale FWI Tutorial - Part 3: Data selection and misfit definition
- Continental-scale Simulations
- Creating and plotting custom gathers from Salvus' receiver outputs
- Equivalence of Filtering STFs and Filtering Synthetics
- Full-Waveform Inversion
- Full-Waveform Inversion
- How to combine (fuse) measured and simulated data in Salvus
- Inverting for homogeneous material
- Lamb's problem
- Lamb's problem