Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacubillos10/ruspectroscopy_tools
C extension module (for python) to generate gamma and E matrices in RUS (Resonant Ultrasound Spectroscopy)
https://github.com/jacubillos10/ruspectroscopy_tools
c openmp physics python3 resonant-ultrasound-spectroscopy solid-state-physics
Last synced: 3 months ago
JSON representation
C extension module (for python) to generate gamma and E matrices in RUS (Resonant Ultrasound Spectroscopy)
- Host: GitHub
- URL: https://github.com/jacubillos10/ruspectroscopy_tools
- Owner: jacubillos10
- License: mit
- Created: 2024-02-01T23:13:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-06T02:50:47.000Z (7 months ago)
- Last Synced: 2024-07-06T03:07:38.721Z (7 months ago)
- Topics: c, openmp, physics, python3, resonant-ultrasound-spectroscopy, solid-state-physics
- Language: TeX
- Homepage:
- Size: 5.56 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RUSpectroscopy_tools
A C extension module for generating Gamma and Epsilon matrices, in Resonant Ultrasound Spectroscopy.
## Authors
- Alejandro Cubillos - [email protected]
- Manuela Rivas
- Julián Rincón## Import:
```python
from rusmodules import rus
```## Usage Example
```python
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 6x6 matrix with the elastic constants
* geometry (3,) shape array containing the dimensions of the sample
* shape 0 for parallelepiped, 1 for cylinder and 2 to spheroidSolve forward problem with scipy:
Eigenvalues return $m\omega^2$
```python
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:
```bash
pip3 install ruspectroscopy-tools