surface-roughness

A Python package that produces oriented roughness metrics

https://github.com/grasselli-geomechanics-group/surface-roughness

Science Score: 65.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
    Organization grasselli-geomechanics-group has institutional domain (geogroup.utoronto.ca)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.3%) to scientific vocabulary

Keywords

python roughness roughness-map
Last synced: 6 months ago · JSON representation ·

Repository

A Python package that produces oriented roughness metrics

Basic Info
  • Host: GitHub
  • Owner: Grasselli-Geomechanics-Group
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 20.6 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Topics
python roughness roughness-map
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

surface-roughness

Surface roughness is a library that processes 3D surface STL data and produces oriented roughness metrics.

Citation

If you wish to use this work, please cite this paper according to CITATION.cff.

Installation

Installation is completed by pip install surface-roughness

Usage

Roughness mapping

```python from surfaceroughness import Surface, SampleWindow, roughnessmap

Load Surface STL File into Python

surface = Surface(path="example_surface.stl")

Specify SampleWindow parameters

w = SampleWindow(is_circle=True,radius=2) # in units of STL mesh

Generate roughness map object based on method presented in Magsipoc & Grasselli (2023) with parameters

map = roughnessmap( surface, # surface object required to interact with library 'deltat', # Method for analyzing roughness w, # SampleWindow object 0.5, # Distance between windows in mesh units 1 # Number of vertices for mesh facet to be included in window sampling )

Start subsampling process

map.sample()

Evaluate roughness of subsamples

map.evaluate()

Analyze directional roughness statistics

map.analyzedirectionalroughness('deltat') map.analyzedirectionalroughness('delta*t')

Pickle map to save analysis (optional)

with ('examplesurfacer2_s0.5.pickle','wb') as f: pickle.dump(map, f)

Save data to VTK for visualization

map.tovtk('examplesurfacer2s0.5','delta_t')

```

Directional Roughness

```python from surface_roughness import Surface import matplotlib.pyplot as plt # For plotting graphs

surface = Surface('example_surface.stl')

Calculate roughness from Tatone and Grasselli (2009) doi: 10.1063/1.3266964

surface.evaluatethetamaxcp1() az = surface.thetamaxcp1('az') # Get azimuth correlating with analysis thetamaxcp1roughness = surface.thetamaxcp1('thetamaxcp1')

Plot surface roughness

plt.figure() plt.polar(az,thetamaxcp1roughness,label=r'$\theta^*{max}/(C+1)$') plt.legend()

Calculate roughness from Babanouri and Karami Nasab (2017) doi: 10.1007/s00603-016-1139-1

surface.evaluatedeltat() azt = s.deltat('az') deltat = s.deltat('delta_t')

aza = s.deltaa('az') deltaa = s.deltaa('delta_a')

azn = s.deltan('az') deltan = s.deltan('delta_n')

plt.figure() plt.polar(azt,deltat,label='$\DeltaT$') plt.polar(aza,deltaa,label='$\DeltaA$') plt.polar(azn,deltan,label='$\Delta_N$') plt.legend()

```

License

MIT

Owner

  • Name: Grasselli's Geomechanics Group
  • Login: Grasselli-Geomechanics-Group
  • Kind: organization
  • Email: info.geogroup@utoronto.ca
  • Location: Canada

University of Toronto

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Magsipoc"
  given-names: "Earl"
title: "Surface Roughness"
version: 0.0.2
date-released: 2023-08-16
url: "https://github.com/Grasselli-Geomechanics-Group/surface-roughness"
preferred-citation:
  type: article
  authors:
  - family-names: "Magsipoc"
    given-names: "Earl"
  - family-names: "Grasselli"
    given-names: "Giovanni"
  journal: "International Journal for Rock Mechanics and Mining Sciences"
  month: 12
  start: 105593
  volume: 172
  title: "A local surface roughness mapping method for post-failure interpretation of brittle fracture propagation"
  year: 2023
  doi: 10.1016/j.ijrmms.2023.105593

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Dependencies

.github/workflows/wheels.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/upload-artifact v4 composite
  • pypa/cibuildwheel v2.18.1 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
requirements.txt pypi
setup.py pypi
  • matplotlib *
  • meshio *
  • mplstereonet *
  • numexpr *
  • numpy *
  • pandas *
  • scipy *
  • shapely *
  • tqdm *