Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastic kmedium #450

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 12 additions & 47 deletions kwave/kmedium.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ class kWaveMedium(object):
absorbing: bool = False
# is the medium absorbing stokes?
stokes: bool = False
# compressional sound speed [m/s]
sound_speed_compression: np.array = None
# reference compressional sound speed [m/s]
sound_speed_ref_compression: np.array = None
# pshear wave speed [m/s]
sound_speed_shear: np.array = None
# reference shear wave speed [m/s]
sound_speed_ref_shear: np.array = None
# power law absorption for compressional waves coefficient [dB/(MHz^y cm)]
alpha_coeff_compression: np.array = None
# power law absorption for shearwaves coefficient [dB/(MHz^y cm)]
alpha_coeff_shear: np.array = None

# """
# Note: For heterogeneous medium parameters, medium.sound_speed and
Expand Down Expand Up @@ -181,50 +193,3 @@ def _check_absorbing_with_stokes(self):
assert self.alpha_filter is None, (
"Input option medium.alpha_filter is not supported with the axisymmetric code " "or medium.alpha_mode = 'stokes'. "
)

##########################################
# Elastic-code related properties - raise error when accessed
##########################################
_ELASTIC_CODE_ACCESS_ERROR_TEXT_ = "Elastic simulation and related properties are not supported!"

@property
def sound_speed_shear(self): # pragma: no cover
"""
Shear sound speed (used in elastic simulations | not supported currently!)
"""
raise NotImplementedError(self._ELASTIC_CODE_ACCESS_ERROR_TEXT_)

@property
def sound_speed_ref_shear(self): # pragma: no cover
"""
Shear sound speed reference (used in elastic simulations | not supported currently!)
"""
raise NotImplementedError(self._ELASTIC_CODE_ACCESS_ERROR_TEXT_)

@property
def sound_speed_compression(self): # pragma: no cover
"""
Compression sound speed (used in elastic simulations | not supported currently!)
"""
raise NotImplementedError(self._ELASTIC_CODE_ACCESS_ERROR_TEXT_)

@property
def sound_speed_ref_compression(self): # pragma: no cover
"""
Compression sound speed reference (used in elastic simulations | not supported currently!)
"""
raise NotImplementedError(self._ELASTIC_CODE_ACCESS_ERROR_TEXT_)

@property
def alpha_coeff_compression(self): # pragma: no cover
"""
Compression alpha coefficient (used in elastic simulations | not supported currently!)
"""
raise NotImplementedError(self._ELASTIC_CODE_ACCESS_ERROR_TEXT_)

@property
def alpha_coeff_shear(self): # pragma: no cover
"""
Shear alpha coefficient (used in elastic simulations | not supported currently!)
"""
raise NotImplementedError(self._ELASTIC_CODE_ACCESS_ERROR_TEXT_)
Loading