Update README.md
Browse files
README.md
CHANGED
|
@@ -51,3 +51,87 @@ configs:
|
|
| 51 |
- split: default
|
| 52 |
path: snapshots/default-*
|
| 53 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
- split: default
|
| 52 |
path: snapshots/default-*
|
| 53 |
---
|
| 54 |
+
# Elastic Block Dataset
|
| 55 |
+
|
| 56 |
+
## Dataset Description
|
| 57 |
+
|
| 58 |
+
This dataset contains structural mechanics simulations of an elastic block under varying Young's modulus parameters.
|
| 59 |
+
|
| 60 |
+
### Dataset Summary
|
| 61 |
+
|
| 62 |
+
The Elastic Block dataset provides numerical simulations of elastic deformation in a 2D block with parametrized material properties. The dataset includes displacement fields in both x and y directions, making it suitable for reduced-order modeling, surrogate modeling, and machine learning applications in structural mechanics.
|
| 63 |
+
|
| 64 |
+
## Dataset Structure
|
| 65 |
+
|
| 66 |
+
### Data Instances
|
| 67 |
+
|
| 68 |
+
The dataset consists of three configurations:
|
| 69 |
+
|
| 70 |
+
- **geometry**: Mesh information (nodes and connectivity)
|
| 71 |
+
- **snapshots**: Displacement field solutions
|
| 72 |
+
- **parameters**: Young's modulus values for each simulation
|
| 73 |
+
|
| 74 |
+
### Data Fields
|
| 75 |
+
|
| 76 |
+
#### Geometry Configuration
|
| 77 |
+
- `node_coordinates_x`: Sequence of x-coordinates of mesh nodes (float64)
|
| 78 |
+
- `node_coordinates_y`: Sequence of y-coordinates of mesh nodes (float64)
|
| 79 |
+
- `connectivity`: Sequence of element connectivity (triangular elements, int32)
|
| 80 |
+
|
| 81 |
+
#### Snapshots Configuration
|
| 82 |
+
- `displacement_x`: Displacement field in x-direction at each node (float64)
|
| 83 |
+
- `displacement_y`: Displacement field in y-direction at each node (float64)
|
| 84 |
+
|
| 85 |
+
#### Parameters Configuration
|
| 86 |
+
- `youngs_modulus`: Young's modulus parameter for each simulation (float64)
|
| 87 |
+
|
| 88 |
+
### Data Splits
|
| 89 |
+
|
| 90 |
+
- `default`: Contains all simulations
|
| 91 |
+
|
| 92 |
+
## Dataset Creation
|
| 93 |
+
|
| 94 |
+
### Source Data
|
| 95 |
+
|
| 96 |
+
The dataset was generated using finite element simulations of linear elasticity with varying Young's modulus parameters.
|
| 97 |
+
|
| 98 |
+
### Preprocessing
|
| 99 |
+
|
| 100 |
+
Displacement solutions are stored as 1D arrays (one for each direction) corresponding to the nodal values on the mesh.
|
| 101 |
+
|
| 102 |
+
## Usage
|
| 103 |
+
|
| 104 |
+
```python
|
| 105 |
+
from datasets import load_dataset
|
| 106 |
+
import numpy as np
|
| 107 |
+
import matplotlib.pyplot as plt
|
| 108 |
+
import matplotlib.tri as mtri
|
| 109 |
+
|
| 110 |
+
# Load geometry
|
| 111 |
+
ds_geom = load_dataset("SISSAmathLab/elastic-block", name="geometry")
|
| 112 |
+
|
| 113 |
+
# Load snapshots
|
| 114 |
+
ds_data = load_dataset("SISSAmathLab/elastic-block", name="snapshots")
|
| 115 |
+
|
| 116 |
+
# Load parameters
|
| 117 |
+
ds_params = load_dataset("SISSAmathLab/elastic-block", name="parameters")
|
| 118 |
+
|
| 119 |
+
# Visualize displacement field for first simulation
|
| 120 |
+
pts_x = np.asarray(ds_geom['default']['node_coordinates_x']).flatten()
|
| 121 |
+
pts_y = np.asarray(ds_geom['default']['node_coordinates_y']).flatten()
|
| 122 |
+
connectivity = ds_geom['default']['connectivity'][0]
|
| 123 |
+
displacement_x = np.asarray(ds_data['default']['displacement_x'][0])
|
| 124 |
+
|
| 125 |
+
triang = mtri.Triangulation(pts_x, pts_y, connectivity)
|
| 126 |
+
plt.tripcolor(triang, displacement_x)
|
| 127 |
+
plt.colorbar(label='Displacement X')
|
| 128 |
+
plt.title('Elastic Block - X Displacement')
|
| 129 |
+
plt.xlabel('x')
|
| 130 |
+
plt.ylabel('y')
|
| 131 |
+
plt.axis('equal')
|
| 132 |
+
plt.show()
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
## Contact
|
| 136 |
+
|
| 137 |
+
For questions or issues, please contact SISSA mathLab.
|