CoolFace
Datasetpublic

smartFRACs/smartFRACs

smartFRACs - Dataset of flow simulations in single rough fractures A brief description of the dataset, its purpose, and what it contains. Dataset of lattice Boltzmann and finite volume simulations for single phase laminar flow into single rough fractures. Dataset Summary Size: [e.g., 10,000 samples] Languages: [e.g., English, Multilingual] Data Type: [e.g., Text, Image, Audio, Tabular] Use Case: [e.g., NLP, Vision, Speech Recognition] Source: [e.g., Collected… See the full description on the dataset page: https://huggingface.co/datasets/smartFRACs/smartFRACs.

sourceHugging Facecc-by-4.0updated 2mo agoView on Hugging Face
0likes607downloads
Dataset Card

smartFRACs - Dataset of flow simulations in single rough fractures

![Hugging Face Dataset](https://huggingface.co/datasets/smartFRACs/smartFRACs/tree/main)

A brief description of the dataset, its purpose, and what it contains.

Dataset of lattice Boltzmann and finite volume simulations for single phase laminar flow into single rough fractures.

Dataset Summary

  • Size: [e.g., 10,000 samples]
  • Languages: [e.g., English, Multilingual]
  • Data Type: [e.g., Text, Image, Audio, Tabular]
  • Use Case: [e.g., NLP, Vision, Speech Recognition]
  • Source: [e.g., Collected from ... / Synthesized / Scraped]

How to Use

You can load the dataset using 🤗 datasets:

python
import os
from huggingface_hub import HfFileSystem
from concurrent.futures import ThreadPoolExecutor

# User configuration:
hf_token = "your_token"

repo_type = "dataset"

# Base local directory to store downloaded data
local_base_dir = "./smartFRACs"

# Initialize Hugging Face Filesystem
fs = HfFileSystem(token=hf_token, repo_type=repo_type)


def download_files(remote_files, local_base):
    os.makedirs(local_base, exist_ok=True)

    def download(remote_file):
        relative_path = remote_file.split(f"datasets/{repo_id}/")[-1]
        local_file_path = os.path.join(local_base, relative_path)
        os.makedirs(os.path.dirname(local_file_path), exist_ok=True)
        fs.get_file(remote_file, local_file_path)
        print(f"Downloaded: {remote_file} to {local_file_path}")

    with ThreadPoolExecutor(max_workers=4) as executor:
        executor.map(download, remote_files)
        
repo_id = "smartFRACs/smartFRACs"
subset="**" # options: basic_LBM...
frac_id="*" # options: frac_001
path=f"datasets/{repo_id}/{subset}/{frac_id}.h5"
print(path)
remote_files = fs.glob(path)
download_files(remote_files, local_base_dir)