Skip to content

Commit

Permalink
Merge pull request #1 from adtzlr/reorganize-package
Browse files Browse the repository at this point in the history
Reorganize as package
  • Loading branch information
adtzlr authored Aug 23, 2023
2 parents 71fd5d6 + 3da4517 commit 504d07d
Show file tree
Hide file tree
Showing 46 changed files with 1,072 additions and 980 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 88
extend-ignore = E203
exclude = tests
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Codecov

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
run:
name: Upload coverage report to codecov.io
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Test with tox
run: |
pip install tox
tox -- --cov fiberreinforcedrubber --cov-report xml --cov-report term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: ${{ matrix.python-version == '3.11' }}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.0] - 2023-08-22

### Added
- Initial release.
- Start using a changelog.
42 changes: 22 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,80 @@
<p align="center">
<a href="https://felupe.readthedocs.io/en/latest/?badge=latest"><img src="https://user-images.githubusercontent.com/5793153/235789118-eb03eb25-2556-401d-8a0f-580f37e72f8d.png" height="40px"/></a>
<p align="center"><img src="results/test_specimen_mesh_fibre.png" height="150px"/></p>
<p align="center"><img src="docs/images/test_specimen_mesh_fibre.png" height="150px"/></p>
<p align="center"><b>Fiber-Reinforced-Rubber</b></p>
<p align="center"><em>Numeric simulation of a test specimen with a fiber-reinforced rubber composite.</em></p>
</p>

This repository provides the reproducible simulation data of the paper *Investigating damage mechanisms in cord-rubber composite air spring bellows of rail vehicles and representative specimen design*, submitted to [Applied Composite Materials](https://www.springer.com/journal/10443), also including a few extras.
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/mit/) [![codecov](https://codecov.io/gh/adtzlr/fiberreinforcedrubber/graph/badge.svg?token=xj9e2kmMA4)](https://codecov.io/gh/adtzlr/fiberreinforcedrubber) [![DOI:10.1017/cbo9781316336144](https://zenodo.org/badge/DOI/10.1007/s10443-023-10157-1.svg)](https://doi.org/10.1007/s10443-023-10157-1) ![Codestyle black](https://img.shields.io/badge/code%20style-black-black)

This repository provides the reproducible simulation data of the paper [Investigating damage mechanisms in cord-rubber composite air spring bellows of rail vehicles and representative specimen design](https://doi.org/10.1007/s10443-023-10157-1), also including a few extras.

# Installation
Install [Python](https://www.python.org/downloads/) 3.8+, open a terminal and install the requirements.
Install [Python](https://www.python.org/downloads/) 3.8+, [download](https://github.com/adtzlr/fiberreinforcedrubber/archive/refs/heads/main.zip) or clone this repository, open a terminal and install the package along with its dependencies.

```
pip install felupe[all] matadi matplotlib pypardiso termtables
pip install .
```

# Usage
After installing the requirements, [download](https://github.com/adtzlr/fiberreinforcedrubber/archive/refs/heads/main.zip) or clone this repository, then edit and run the scripts [`script_test-specimen-simulation.py`](script_test-specimen-simulation.py) and [`script_test-specimen-strain.py`](script_test-specimen-strain.py). Additionally, some more normal fiber force views on the test specimens are provided by [`script_test-specimen-amplitudes.py`](script_test-specimen-amplitudes.py) and [`script_test-specimen-amplitudes-max-diff.py`](script_test-specimen-amplitudes-max-diff.py) .
Edit and run the tests [`test_specimen_simulation.py`](tests/test_specimen_simulation.py) and [`test_specimen_strain.py`](tests/test_specimen_strain.py). Additionally, some more normal fiber force views on the test specimens are provided by [`test_specimen_amplitudes.py`](tests/test_specimen_amplitudes.py) and [`test_specimen_amplitudes_max_diff.py`](tests/test_specimen_amplitudes_max_diff.py) .

# Results
The scripts generate undeformed and deformed views on the test specimen, force-displacement characteristic curves of the test specimen as well as plots of the strain distribution. Results are stored in [results/](results/).
The scripts generate undeformed and deformed views on the test specimen, force-displacement characteristic curves of the test specimen as well as plots of the strain distribution. Results are stored in [docs/images/](docs/images/).

## Undeformed Views
The views on the undeformed test specimen show the quad mesh for the rubber and the (helper) meshes for the fibers.

<p align="center">
<img src="results/test_specimen_mesh_rubber.png" height="300px"/> <img src="results/test_specimen_mesh_fibre.png" height="300px"/>
<img src="docs/images/test_specimen_mesh_rubber.png" height="300px"/> <img src="docs/images/test_specimen_mesh_fibre.png" height="300px"/>
</p>

## Deformed Views
The views on the deformed test specimen are carried out for $F_Z=3$ kN ($V=7$ mm) at $U=23$ mm.

First, the fiber normal forces per undeformed area are shown (for each fiber family).

![](results/test_specimen_deformed_fibre-1.png)
![](docs/images/test_specimen_deformed_fibre-1.png)

![](results/test_specimen_deformed_fibre-2.png)
![](docs/images/test_specimen_deformed_fibre-2.png)

Next, the max. principal values of the Cauchy stress of the rubber matrix are shown.

![](results/test_specimen_deformed_rubber.png)
![](docs/images/test_specimen_deformed_rubber.png)

The absolute force difference between the two fiber families is plotted on the quad-mesh.

![](results/test_specimen_deformed_fibre-difference.png)
![](docs/images/test_specimen_deformed_fibre-difference.png)

For a cycle of $U=\pm23$ mm (at $F_Z=3$ kN) the normal force ranges (double amplitudes) of the fiber families are plotted:

a) separated for each fiber family

![](results/test_specimen_deformed_fibre-amplitudes-1.png)
![](docs/images/test_specimen_deformed_fibre-amplitudes-1.png)

![](results/test_specimen_deformed_fibre-amplitudes-2.png)
![](docs/images/test_specimen_deformed_fibre-amplitudes-2.png)

b) the maximum value, taking both fiber families into account

![](results/test_specimen_deformed_fibre-range-max.png)
![](docs/images/test_specimen_deformed_fibre-range-max.png)

## Force-displacement characteristic curves

![](results/test_specimen_forces_vs_displacement.svg)
![](docs/images/test_specimen_forces_vs_displacement.svg)

[Table of Force-Displacement Data](results/test_specimen_forces_vs_displacement.md) [(csv)](results/test_specimen_forces_vs_displacement.csv)
[Table of Force-Displacement Data](docs/images/test_specimen_forces_vs_displacement.md) [(csv)](docs/images/test_specimen_forces_vs_displacement.csv)

## Strain distribution

The strain distribution of $\varepsilon_{yy}$ is evaluated at an applied tension of $V=6$ mm

![](results/LogStrainYY_V=6mm.svg)
![](docs/images/LogStrainYY_V=6mm.svg)

and of $V=7$ mm, both located in the middle of the height of the test specimen (at $Y=0$).

![](results/LogStrainYY_V=7mm.svg)
![](docs/images/LogStrainYY_V=7mm.svg)

[Table of Strain Distribution (6 mm)](results/LogStrainYY_V=6mm.md) [(csv)](results/LogStrainYY_V=6mm.csv)
[Table of Strain Distribution (6 mm)](docs/images/LogStrainYY_V=6mm.md) [(csv)](docs/images/LogStrainYY_V=6mm.csv)

[Table of Strain Distribution (7 mm)](results/LogStrainYY_V=7mm.md) [(csv)](results/LogStrainYY_V=7mm.csv)
[Table of Strain Distribution (7 mm)](docs/images/LogStrainYY_V=7mm.md) [(csv)](docs/images/LogStrainYY_V=7mm.csv)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
20 changes: 7 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ description = "Numeric simulation for a test specimen with a fiber-reinforced ru
readme = "README.md"
license = {file = "LICENSE"}
keywords = [
"python",
"constitution",
"automatic-differentiation",
"scientific-computing",
"cord-rubber-composite",
"damage-mechanisms",
"fatigue-testing",
"delamination",
"finite-elements-analysis",
"hyperelasticity",
"constitutive-model"
"tomography",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -42,19 +41,14 @@ requires-python = ">=3.8"
dependencies = [
"numpy",
"scipy",
"matplotlib",
"h5py",
"tqdm",
"meshio",
"pyvista",
"felupe",
"felupe[all]",
"matadi",
"pypardiso",
"termtables",
]

[tool.setuptools.dynamic]
version = {attr = "fiberreinforcedruber.__about__.__version__"}
version = {attr = "fiberreinforcedrubber.__about__.__version__"}

[project.urls]
Code = "https://github.com/adtzlr/fiberreinforcedrubber"
Expand Down
164 changes: 0 additions & 164 deletions script_test-specimen-amplitudes-max-diff.py

This file was deleted.

Loading

0 comments on commit 504d07d

Please sign in to comment.