Skip to content

C extension module (for python) to generate gamma and E matrices in RUS (Resonant Ultrasound Spectroscopy)

License

Notifications You must be signed in to change notification settings

jacubillos10/RUSpectroscopy_Tools

Repository files navigation

RUSpectroscopy_tools

A C extension module for generating Gamma and Epsilon matrices, in Resonant Ultrasound Spectroscopy.

Authors

Import:

from rusmodules import rus

Usage Example

gamma = rus.gamma_matrix(N, C, geometry, shape)
E = rus.E_matrix(N, shape) 

Where:

  • N represents the maximim grade of the polynomials of the basis functions
  • C <np.array> 6x6 matrix with the elastic constants
  • geometry <np.array> (3,) shape array containing the dimensions of the sample
  • shape 0 for parallelepiped, 1 for cylinder and 2 to spheroid

Solve forward problem with scipy: Eigenvalues return $m\omega^2$

eigenvals, eigenvects = scipy.linalg.eigh(a = gamma, b = E)
omega = (eigenvals[6:]/m)**(1/2) #remember the fisrt 6 eigenvalues must be near zero
frequencies = omega/(2*np.pi)

Installation:

pip3 install ruspectroscopy-tools

About

C extension module (for python) to generate gamma and E matrices in RUS (Resonant Ultrasound Spectroscopy)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published