Mondaic

salvus.mesh.data_structures.salvus_mesh.linear_solids

salvus.mesh.data_structures.salvus_mesh.linear_solids salvus mesh data_structures salvus_mesh linear_solids

Minimal linear solids data structure for attachment to meshes.

Should not include any algorithms.

Classes

LinearSolidsOnMesh

class LinearSolidsOnMesh(builtins.object):
    def __init__(
        self,
        number_linear_solids: int,
        reference_frequency: float,
        min_frequency: float,
        max_frequency: float,
        relaxation_frequencies: npt.NDArray,
        relaxation_coefficients: npt.NDArray,
    ) -> None: ...

Parameters defining linear solids on a mesh for attenuation modelling.

This class encapsulates the parameters required to define linear solids for attenuation modelling on a mesh. It includes methods to create an instance by fitting to a power-law Q model.

If no relaxation frequencies and coefficients are fitted yet, use the from_unfitted class method to create an instance by fitting to a power-law Q model. See its documentation for more configuration options available during fitting.

Parameters
  • number_linear_solids int — The number of linear solids to use.
  • reference_frequency float — The reference frequency in Hz.
  • min_frequency float — The minimum frequency in Hz.
  • max_frequency float — The maximum frequency in Hz.
  • relaxation_frequencies npt.NDArray — Relaxation frequencies (angular, rad/s) for the linear solids.
  • relaxation_coefficients npt.NDArray — Relaxation coefficients for the linear solids.
Methods
from_unfitted()
def from_unfitted(
    number_linear_solids: int,
    reference_frequency: float,
    min_frequency: float,
    max_frequency: float,
    power_law_ref_frequency_in_hertz: float = 1,
    power_law_exponent: float = 0,
    linearized: bool = True,
    samples: int = 100,
    weighted_least_squares: bool = True,
) -> LinearSolidsOnMesh: ...

Create a LinearSolidsOnMesh instance by fitting to a power-law Q model.

Parameters
  • number_linear_solids int — The number of linear solids to use.
  • reference_frequency float — The reference frequency in Hz.
  • min_frequency float — The minimum frequency in Hz.
  • max_frequency float — The maximum frequency in Hz.
  • power_law_ref_frequency_in_hertz float — The reference frequency for the power-law Q model in Hz.
  • power_law_exponent float — The exponent for the power-law Q model.
  • linearized bool — Whether to use the linearized form of the equations.
  • samples int — The number of frequency samples to use in the fitting.
  • weighted_least_squares bool — Whether to use weighted least squares in the fitting.
Returns LinearSolidsOnMesh — A LinearSolidsOnMesh instance with the fitted parameters.
copy()
def copy(self) -> LinearSolidsOnMesh: ...

Return a deep copy of the object.

Returns LinearSolidsOnMesh