File size: 2,821 Bytes
8ca777f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4d46b7c
 
 
 
8ca777f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
task_categories:
- graph-ml
tags:
- physics learning
- geometry learning
license: cc-by-sa-4.0
viewer: false
dataset_info:
  splits:
  - name: all_samples
    num_bytes: 6436997670
    num_examples: 2
  download_size: 6436997670
  dataset_size: 6436997670
configs:
- config_name: default
  data_files:
  - split: all_samples
    path: data/all_samples/*
---
<p align='center'>
<img src='https://i.ibb.co/8njZ0BzV/Ahmed.png' alt='https://i.ibb.co/8njZ0BzV/Ahmed.png' width='1000'/>
</p>

```yaml
legal:
  owner: neashton (https://huggingface.co/datasets/neashton/ahmedml)
  license: cc-by-sa-4.0
  doi: doi:10.57967/hf/5002
  arxiv: arxiv:2407.20801
data_production:
  physics: Computational Fluid Dynamics (RANS-LES)
  simulator: OpenFOAM
  type: simulation
  script: Converted to PLAID format for standarized access; no changes to data content.
plaid:
  version: 0.1.10
num_samples:
  all_samples: 2
storage_backend: zarr

```
This dataset was generated with [`plaid`](https://plaid-lib.readthedocs.io/), we refer to this documentation for additional details on how to extract data from `plaid_sample` objects.

The simplest way to use this dataset is to first download it:
```python
from plaid.storage import download_from_hub

repo_id = "channel/dataset"
local_folder = "downloaded_dataset"

download_from_hub(repo_id, local_folder)
```

Then, to iterate over the dataset and instantiate samples:
```python
from plaid.storage import init_from_disk

local_folder = "downloaded_dataset"
split_name = "train"

datasetdict, converterdict = init_from_disk(local_folder)

dataset = datasetdict[split]
converter = converterdict[split]

for i in range(len(dataset)):
    plaid_sample = converter.to_plaid(dataset, i)
```

It is possible to stream the data directly:
```python
from plaid.storage import init_streaming_from_hub

repo_id = "channel/dataset"

datasetdict, converterdict = init_streaming_from_hub(repo_id)

dataset = datasetdict[split]
converter = converterdict[split]

for sample_raw in dataset:
    plaid_sample = converter.sample_to_plaid(sample_raw)
```

Plaid samples' features can be retrieved like the following:
```python
from plaid.storage import load_problem_definitions_from_disk
local_folder = "downloaded_dataset"
pb_defs = load_problem_definitions_from_disk(local_folder)

# or
from plaid.storage import load_problem_definitions_from_hub
repo_id = "channel/dataset"
pb_defs = load_problem_definitions_from_hub(repo_id)


pb_def = pb_defs[0]

plaid_sample = ... # use a method from above to instantiate a plaid sample

for t in plaid_sample.get_all_time_values():
    for path in pb_def.get_in_features_identifiers():
        plaid_sample.get_feature_by_path(path=path, time=t)
    for path in pb_def.get_out_features_identifiers():
        plaid_sample.get_feature_by_path(path=path, time=t)
```