File size: 3,611 Bytes
2cbde0a
 
a2b1d04
2cbde0a
099c794
 
 
 
2cbde0a
 
099c794
2cbde0a
099c794
 
03b0ab8
 
 
 
 
 
 
 
 
 
a2b1d04
 
 
 
 
 
 
 
 
 
 
 
2cbde0a
 
 
 
 
03b0ab8
 
 
 
a2b1d04
 
 
 
2cbde0a
e37a9b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
dataset_info:
- config_name: geometry
  features:
  - name: node_coordinates_x
    list: float64
  - name: node_coordinates_y
    list: float64
  splits:
  - name: default
    num_bytes: 80664
    num_examples: 1
  download_size: 3772
  dataset_size: 80664
- config_name: parameters
  features:
  - name: velocity
    dtype: float64
  splits:
  - name: default
    num_bytes: 2400
    num_examples: 300
  download_size: 3632
  dataset_size: 2400
- config_name: snapshots
  features:
  - name: velocity_magnitude
    list: float64
  - name: pressure
    list: float64
  splits:
  - name: default
    num_bytes: 24199200
    num_examples: 300
  download_size: 18171167
  dataset_size: 24199200
configs:
- config_name: geometry
  data_files:
  - split: default
    path: geometry/default-*
- config_name: parameters
  data_files:
  - split: default
    path: parameters/default-*
- config_name: snapshots
  data_files:
  - split: default
    path: snapshots/default-*
---
# Lid-Driven Cavity Flow Dataset

## Dataset Description

This dataset contains computational fluid dynamics simulations of the classic lid-driven cavity problem with varying lid velocity parameters.

### Dataset Summary

The Lid-Driven Cavity dataset provides numerical simulations of viscous fluid flow in a square cavity with a moving lid. The dataset includes velocity magnitude and pressure fields, representing a fundamental benchmark problem in computational fluid dynamics suitable for validation of numerical methods and machine learning applications.

## Dataset Structure

### Data Instances

The dataset consists of three configurations:

- **geometry**: Mesh node coordinates
- **snapshots**: Flow field solutions (velocity magnitude and pressure)
- **parameters**: Lid velocity values for each simulation

### Data Fields

#### Geometry Configuration
- `node_coordinates_x`: Sequence of x-coordinates of mesh nodes (float64)
- `node_coordinates_y`: Sequence of y-coordinates of mesh nodes (float64)

#### Snapshots Configuration
- `velocity_magnitude`: Velocity magnitude at each node (float64)
- `pressure`: Pressure field at each node (float64)

#### Parameters Configuration
- `velocity`: Lid velocity parameter for each simulation (float64)

### Data Splits

- `default`: Contains all simulations

## Dataset Creation

### Source Data

The dataset was generated using numerical simulations of the incompressible Navier-Stokes equations in a square cavity with a moving top lid. This is a classic benchmark problem used for validating CFD codes.

### Preprocessing

Solutions are stored as 1D arrays corresponding to the nodal values. The geometry uses a structured or unstructured mesh representation of the square cavity domain.

## Usage

```python
from datasets import load_dataset
import numpy as np
import matplotlib.pyplot as plt

# Load geometry
ds_geom = load_dataset("SISSAmathLab/lid-cavity", name="geometry")

# Load snapshots
ds_data = load_dataset("SISSAmathLab/lid-cavity", name="snapshots")

# Load parameters
ds_params = load_dataset("SISSAmathLab/lid-cavity", name="parameters")

# Visualize velocity magnitude for first simulation
pts_x = np.asarray(ds_geom['default']['node_coordinates_x']).flatten()
pts_y = np.asarray(ds_geom['default']['node_coordinates_y']).flatten()
velocity_mag = ds_data['default']['velocity_magnitude'][0]

plt.scatter(pts_x, pts_y, c=velocity_mag, cmap='jet', s=1)
plt.colorbar(label='Velocity Magnitude')
plt.title('Lid-Driven Cavity Flow')
plt.xlabel('x')
plt.ylabel('y')
plt.axis('equal')
plt.show()
```


## Contact

For questions or issues, please contact SISSA mathLab.