surface growth simulations for structural build-up investigations
Project description
ossobuco
Ossobuco is a python library to simulate the growth of products in the gap between two arbitrary surfaces. It was developed to study the strengthening of contact points between two cement grains as occurs during early-age structural build-up in fresh cement pastes (Michel et al. 2024).
License
Copyright © 2024 ETH Zurich (Luca Michel)
Ossobuco is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Ossobuco is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Ossobuco. If not, see https://www.gnu.org/licenses/.
Usage/installation
The dependencies required for ossobuco are given in requirements.txt. These can be installed by running
pip install -r requirements.txt
To create a virtual environment
python -m venv name_of_venv
source name_of_venv/bin/activate
Basic Usage
Structure
- gap.py generates a gap, fills it with products and stores the output in a bamboost database (www.bamboost.ch)
- displayer.py takes a bamboost Simulation object and allows to visualize the simulation at a given timestep and generate GIFs of the simulations
- postprocess.py takes a bamboost Simulation object and allows to postprocess the raw n_particles-interaction output from gap.py for further analysis
Algorithm
We define two discretized surfaces (upper and lower), $h_{up}$ and $h_{low}$.
The gap is then defined as $D(x) = h_{up}(x) - h_{low}(x)$.
We then grow products between the surfaces by reducing $D(x)$ by $\delta$:
$$ D_i(x){new} = D_i(x){current} - \delta$$
for randomly picked $x$.
We increment the interaction by 1 unit whenever $D_i = 0$, untill the gap is filled.
Example usage
Further examples can be found in the examples directory.
from gap import Gap
import matplotlib.pyplot as plt
parameters = {
'xmax' : 3,
'xaxis_resolution' : 1,
'phi_low' : 0,
'amplitude_low' : 0,
'alt_low' : 0,
'phi_up' : 0,
'amplitude_up' : 0,
'alt_up' : 1,
'h_prod' : 0.5,
'interaction_touch' : 1,
'fct':'sin',
'seed' : 10
}
fig, axes = plt.subplots(1, 2, figsize=(6,3))
ax1, ax2 = axes[0], axes[1]
gap = Gap(parameters)
gap.display_geometry(ax=ax1)
gap.fill()
gap.plot_output(ax=ax2, fit=False)
npart, gapinteraction = gap.extract_results()
plt.tight_layout()
plt.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ossobuco-0.0.1.tar.gz.
File metadata
- Download URL: ossobuco-0.0.1.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cb9f81fdb1ac2e33a903054573167d0219260ec8938eb7019bc2b498f179bba
|
|
| MD5 |
1289432c56ef81175a2f4fceef7970ee
|
|
| BLAKE2b-256 |
cdad1d72017f922166b94e792a40e8665ad4edb4f4e1545bb4e1e05c483e3546
|
File details
Details for the file ossobuco-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ossobuco-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
343e697b05f13b7c57cd763020e0ac2fe61391fdd17e37ca94a34df3b1b349e4
|
|
| MD5 |
b6c63c5dc980ab4f5a4753c24d60c11b
|
|
| BLAKE2b-256 |
5de53b14080c2b6cdd8ec04c3e8f588e7b2811a09f0662129d89943eff8832a0
|