Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

Potato Cooking & Moisture Diffusion Simulation Dataset (potato_dataset.nc)

This repository hosts a high-fidelity dataset of 33 transient forward finite-element simulations modeling coupled non-isothermal heat conduction and moisture transport in a continuum potato food matrix during convective oven cooking. Originally simulated in COMSOL Multiphysics over a 4,649-node spatial discretization, the dataset is structured as a CF-compliant, flat-group NetCDF-4 / HDF5 store (xarray.DataTree).


1. Physical Context & Parametric Variation

Governing Physics

The simulation models porous media transport governing the spatio-temporal evolution of temperature T(x, t) and liquid water saturation S_l(x, t):

ρcpβˆ‚Tβˆ‚t=βˆ‡β‹…(kβˆ‡T)βˆ’mΛ™evapΞ”Hevap \rho c_p \frac{\partial T}{\partial t} = \nabla \cdot (k \nabla T) - \dot{m}_{\text{evap}} \Delta H_{\text{evap}}

βˆ‚(ρwΟ•Sl)βˆ‚t=βˆ‡β‹…(ρwDwβˆ‡Sl)βˆ’mΛ™evap \frac{\partial (\rho_w \phi S_l)}{\partial t} = \nabla \cdot (\rho_w D_w \nabla S_l) - \dot{m}_{\text{evap}}

where x ∈ Ξ© βŠ‚ ℝ³ represents the 3D food geometry discretized into 4,649 nodes.

What Changes from Simulation to Simulation?

The geometry (4,649 nodes), physical material properties (porosity Ο†, density ρ, intrinsic permeability, moisture diffusivity D_w, and thermal conductivity k), and initial internal states (Tβ‚€ β‰ˆ 279 K, S_{l, 0} β‰ˆ 0.51) are held strictly constant across all runs.

The only parameter that changes from simulation to simulation is the exogenous oven temperature heating profile: T_oven(t).

Each experiment represents a unique thermal trajectory:

  • Dynamic heating schedules: multi-step temperature jumps, ramps, isothermal holds, and complex harmonic sweeps.
  • Temperature ranges: ambient initial states (~279.15 K / 6 Β°C) up to high roasting temperatures (456.0 K / 183 Β°C).
  • Temporal span: 1400 seconds (~23.3 minutes) sampled uniformly at 10 s intervals (141 discrete timesteps).

2. NetCDF-4

potato_dataset.nc
└── /{exp_name}                                [Flat experiment root group]
    β”‚   Dimensions:   (time: 141, node: 4649, spatial: 3)
    β”‚   Coordinates:
    β”‚     β”œβ”€β”€ time                             [s, range: 0.0 to 1400.0, step: 10s]
    β”‚     β”œβ”€β”€ spatial                          ['x', 'y', 'z'] (Cartesian meters)
    β”‚     └── coordinates (node, spatial)      [m, shape: 4649 x 3]
    β”‚   Attributes:   run_name, session, type, {exp_name}_oven_temperature.csv
    β”‚
    β”œβ”€β”€ Data Variables:
    β”‚     β”œβ”€β”€ Oven Temperature (time)          [K] Exogenous oven heating schedule
    β”‚     β”œβ”€β”€ Temperature (time, node)         [K] Continuum temperature across 4,649 nodes
    β”‚     └── Water Saturation (time, node)    [-] Volumetric water saturation across 4,649 nodes

3. Discretization & Variable Breakdown

Each of the 33 experiment groups contains the following variables and coordinates:

Variable / Coordinate Dimensions Type Units Physical Range Description
Oven Temperature (time: 141) Data Variable K 279.15 – 456.00 Exogenous oven temperature profile over time.
Temperature (time: 141, node: 4649) Data Variable K 277.26 – 381.77 Continuum material temperature at every mesh node.
Water Saturation (time: 141, node: 4649) Data Variable β€” 0.022 – 0.514 Volumetric liquid water saturation (S_l ∈ [0, 1]).
coordinates (node: 4649, spatial: 3) Coordinate m x ∈ [βˆ’0.08, 0.08]
y ∈ [βˆ’0.10, βˆ’0.075]
z = 0.0
3D Cartesian coordinates of the 4,649 finite-element nodes.
time (time: 141) Coordinate s 0.0 – 1400.0 Physical simulation time coordinate (10 s resolution).
spatial (spatial: 3) Coordinate β€” ['x', 'y', 'z'] Dimension scale for Cartesian spatial axes.

4. How to Use the Dataset in Python

NetCDF-4 files on Hugging Face are stored as binary Git LFS files. You can stream or download them directly using huggingface_hub and xarray with the h5netcdf engine.

Installation

pip install huggingface_hub xarray h5netcdf numpy matplotlib pyvista

Loading and Inspecting an Experiment

from huggingface_hub import hf_hub_download
import xarray as xr

# 1. Download NetCDF file from Hugging Face Hub cache
file_path = hf_hub_download(
    repo_id="MaxKannapinn/potato_dataset_comsol",
    filename="potato_dataset.nc",
    repo_type="dataset",
)

# 2. Open an individual simulation experiment group
exp_name = "313-a3nl473h300t1400"
ds = xr.open_dataset(file_path, group=f"/{exp_name}", engine="h5netcdf")

print(ds)
print("Mesh nodes:", ds.dims["node"])         # 4649
print("Timesteps:", ds.dims["time"])          # 141
print("Oven schedule:", ds["Oven Temperature"].values[:5])
print("Node coordinates shape:", ds.coords["coordinates"].shape)  # (4649, 3)

Time-Series Visualization: Core vs. Surface vs. Oven

import numpy as np
import matplotlib.pyplot as plt

# Identify geometric core node (minimum distance to centroid) and outer surface node
coords = ds.coords["coordinates"].values
center_pt = np.mean(coords, axis=0)
dists = np.linalg.norm(coords - center_pt, axis=1)

core_node_idx = int(np.argmin(dists))
surface_node_idx = int(np.argmax(dists))

time = ds["time"].values
t_oven = ds["Oven Temperature"].values
t_core = ds["Temperature"].values[:, core_node_idx]
t_surface = ds["Temperature"].values[:, surface_node_idx]

plt.figure(figsize=(9, 5))
plt.plot(time, t_oven, 'k--', label="Oven Temperature Profile (Input)")
plt.plot(time, t_surface, 'r-', label="Potato Surface Node")
plt.plot(time, t_core, 'b-', label="Potato Core Node")
plt.xlabel("Time [s]")
plt.ylabel("Temperature [K]")
plt.title(f"Thermal Response: {exp_name}")
plt.grid(True, alpha=0.3)
plt.legend()
plt.tight_layout()
plt.show()

3D Spatial Rendering with PyVista

Because the 3D node coordinates are embedded directly in the dataset under coordinates, you can render the spatial fields as 3D point clouds or unstructured meshes:

import pyvista as pv

# Extract mesh coordinates and final temperature field (at t = 1400s)
coords = ds.coords["coordinates"].values
final_temp = ds["Temperature"].values[-1, :]

# Create PyVista point cloud
cloud = pv.PolyData(coords)
cloud["Temperature_K"] = final_temp

# Render interactive 3D plot
plotter = pv.Plotter()
plotter.add_mesh(cloud, scalars="Temperature_K", cmap="inferno", point_size=8, render_points_as_spheres=True)
plotter.add_scalar_bar(title="Temperature [K]")
plotter.show()

5. Metadata & Embedded Files

Each experiment embeds its original numerical oven temperature control table directly in the group attributes under {exp_name}_oven_temperature.csv. You can read it directly from the dataset attributes:

csv_text = ds.attrs[f"{exp_name}_oven_temperature.csv"]
print(csv_text[:200])

6. Citation & Academic Works

This dataset was generated and published by Dr.-Ing. Maximilian Kannapinn (Technische UniversitΓ€t Darmstadt).

If you use this dataset or its numerical benchmarks in your research, please cite the corresponding publications:

@phdthesis{kannapinn2023digital,
  title={Digital Twins for Autonomous Thermal Food Processing},
  author={Kannapinn, Maximilian},
  year={2023},
  school={Technische Universit{\"a}t Darmstadt},
  address={Darmstadt, Germany},
  doi={10.26083/tuprints-00024386}
}

@article{kannapinn2022physics,
  title={Physics-based digital twins for autonomous thermal food processing: Efficient, non-intrusive reduced-order modeling},
  author={Kannapinn, Maximilian and Pham, Minh Khang and Sch{\"a}fer, Michael},
  journal={Innovative Food Science \& Emerging Technologies},
  volume={81},
  pages={103143},
  year={2022},
  publisher={Elsevier},
  doi={10.1016/j.ifset.2022.103143}
}

@article{kannapinn2025digital,
  title={Digital twins for autonomous thermal food processing: A model predictive control study with reduced-order models of augmented neural ordinary differential equation type},
  author={Kannapinn, Maximilian and Dorer, Denis and Sch{\"a}fer, Michael and Weeger, Oliver},
  journal={Journal of Food Engineering},
  year={2025},
  publisher={Elsevier},
  doi={10.1016/j.jfoodeng.2025.112918}
}
Downloads last month
28