Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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)

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 spheroid

Solve 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