spatial_coordinates listlengths 128 128 | time_coordinates listlengths 21 21 | u_initial listlengths 128 128 | u_trajectory listlengths 21 21 | viscosity float64 0.1 0.1 | domain_length float64 6.28 6.28 | timestep float64 0.01 0.01 | save_interval int64 10 10 |
|---|---|---|---|---|---|---|---|
[
0,
0.049473900056532176,
0.09894780011306435,
0.14842170016959652,
0.1978956002261287,
0.24736950028266086,
0.29684340033919304,
0.3463173003957252,
0.3957912004522574,
0.4452651005087896,
0.4947390005653217,
0.5442129006218539,
0.5936868006783861,
0.6431607007349183,
0.6926346007914504,... | [
0,
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7000000000000001,
0.8,
0.9,
1,
1.1,
1.2,
1.3,
1.4000000000000001,
1.5,
1.6,
1.7,
1.8,
1.9000000000000001,
2
] | [
-0.0008340887321044131,
-0.0076848051954036736,
-0.014903310685325024,
-0.02229530847404487,
-0.029652112654859272,
-0.03675363696959328,
-0.04337169468982894,
-0.0492744995121087,
-0.05423000565849717,
-0.05801026246736721,
-0.06039472103394404,
-0.06117581003078322,
-0.060161569050666504,
... | [
[
-0.0008340887321044131,
-0.0076848051954036736,
-0.014903310685325024,
-0.02229530847404487,
-0.029652112654859272,
-0.03675363696959328,
-0.04337169468982894,
-0.0492744995121087,
-0.05423000565849717,
-0.05801026246736721,
-0.06039472103394404,
-0.0611758100307832... | 0.1 | 6.283185 | 0.01 | 10 |
[
0,
0.049473900056532176,
0.09894780011306435,
0.14842170016959652,
0.1978956002261287,
0.24736950028266086,
0.29684340033919304,
0.3463173003957252,
0.3957912004522574,
0.4452651005087896,
0.4947390005653217,
0.5442129006218539,
0.5936868006783861,
0.6431607007349183,
0.6926346007914504,... | [
0,
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7000000000000001,
0.8,
0.9,
1,
1.1,
1.2,
1.3,
1.4000000000000001,
1.5,
1.6,
1.7,
1.8,
1.9000000000000001,
2
] | [
-0.006708210692545026,
-0.05988480348051603,
-0.11345872518691352,
-0.167096961417211,
-0.22046603037349027,
-0.27323325847763197,
-0.3250684908744954,
-0.37564737853186986,
-0.4246526447813411,
-0.47177752939157797,
-0.5167266556999291,
-0.5592203995521919,
-0.598995446215283,
-0.63580811... | [
[
-0.006708210692545026,
-0.05988480348051603,
-0.11345872518691352,
-0.167096961417211,
-0.22046603037349027,
-0.27323325847763197,
-0.3250684908744954,
-0.37564737853186986,
-0.4246526447813411,
-0.47177752939157797,
-0.5167266556999291,
-0.5592203995521919,
-0.... | 0.1 | 6.283185 | 0.01 | 10 |
[
0,
0.049473900056532176,
0.09894780011306435,
0.14842170016959652,
0.1978956002261287,
0.24736950028266086,
0.29684340033919304,
0.3463173003957252,
0.3957912004522574,
0.4452651005087896,
0.4947390005653217,
0.5442129006218539,
0.5936868006783861,
0.6431607007349183,
0.6926346007914504,... | [
0,
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7000000000000001,
0.8,
0.9,
1,
1.1,
1.2,
1.3,
1.4000000000000001,
1.5,
1.6,
1.7,
1.8,
1.9000000000000001,
2
] | [
-0.005085410897903335,
-0.042238485828316435,
-0.07418273826948743,
-0.10082071292868937,
-0.12211594401864109,
-0.13808913269026296,
-0.1488167740553207,
-0.1544286968228438,
-0.15510486821545819,
-0.15107051369165772,
-0.14259211468220814,
-0.12997167356698605,
-0.11354054581519674,
-0.0... | [
[
-0.005085410897903335,
-0.042238485828316435,
-0.07418273826948743,
-0.10082071292868937,
-0.12211594401864109,
-0.13808913269026296,
-0.1488167740553207,
-0.1544286968228438,
-0.15510486821545819,
-0.15107051369165772,
-0.14259211468220814,
-0.12997167356698605,
... | 0.1 | 6.283185 | 0.01 | 10 |
[0.0,0.049473900056532176,0.09894780011306435,0.14842170016959652,0.1978956002261287,0.2473695002826(...TRUNCATED) | [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7000000000000001,0.8,0.9,1.0,1.1,1.2,1.3,1.4000000000000001,1.5,1.6,1(...TRUNCATED) | [-0.0041575021641474435,-0.035867981028914454,-0.06577375250458467,-0.09390000568489262,-0.120282744(...TRUNCATED) | [[-0.0041575021641474435,-0.035867981028914454,-0.06577375250458467,-0.09390000568489262,-0.12028274(...TRUNCATED) | 0.1 | 6.283185 | 0.01 | 10 |
[0.0,0.049473900056532176,0.09894780011306435,0.14842170016959652,0.1978956002261287,0.2473695002826(...TRUNCATED) | [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7000000000000001,0.8,0.9,1.0,1.1,1.2,1.3,1.4000000000000001,1.5,1.6,1(...TRUNCATED) | [-0.005983395133850604,-0.05315879980621811,-0.10035478729366262,-0.14744258095070634,-0.19429025979(...TRUNCATED) | [[-0.005983395133850604,-0.05315879980621811,-0.10035478729366262,-0.14744258095070634,-0.1942902597(...TRUNCATED) | 0.1 | 6.283185 | 0.01 | 10 |
[0.0,0.049473900056532176,0.09894780011306435,0.14842170016959652,0.1978956002261287,0.2473695002826(...TRUNCATED) | [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7000000000000001,0.8,0.9,1.0,1.1,1.2,1.3,1.4000000000000001,1.5,1.6,1(...TRUNCATED) | [0.003176536445828592,0.030742356712084234,0.06255701985462517,0.09821131882956863,0.137266338486961(...TRUNCATED) | [[0.003176536445828592,0.030742356712084234,0.06255701985462517,0.09821131882956863,0.13726633848696(...TRUNCATED) | 0.1 | 6.283185 | 0.01 | 10 |
[0.0,0.049473900056532176,0.09894780011306435,0.14842170016959652,0.1978956002261287,0.2473695002826(...TRUNCATED) | [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7000000000000001,0.8,0.9,1.0,1.1,1.2,1.3,1.4000000000000001,1.5,1.6,1(...TRUNCATED) | [0.008446528330521464,0.07537356076588005,0.14271423994715215,0.2100029232023674,0.2767798796777662,(...TRUNCATED) | [[0.008446528330521464,0.07537356076588005,0.14271423994715215,0.2100029232023674,0.2767798796777662(...TRUNCATED) | 0.1 | 6.283185 | 0.01 | 10 |
[0.0,0.049473900056532176,0.09894780011306435,0.14842170016959652,0.1978956002261287,0.2473695002826(...TRUNCATED) | [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7000000000000001,0.8,0.9,1.0,1.1,1.2,1.3,1.4000000000000001,1.5,1.6,1(...TRUNCATED) | [0.005950916722003157,0.052362129308046235,0.09787260199504383,0.14232828591173624,0.185571459365690(...TRUNCATED) | [[0.005950916722003157,0.052362129308046235,0.09787260199504383,0.14232828591173624,0.18557145936569(...TRUNCATED) | 0.1 | 6.283185 | 0.01 | 10 |
[0.0,0.049473900056532176,0.09894780011306435,0.14842170016959652,0.1978956002261287,0.2473695002826(...TRUNCATED) | [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7000000000000001,0.8,0.9,1.0,1.1,1.2,1.3,1.4000000000000001,1.5,1.6,1(...TRUNCATED) | [0.002214195925451761,0.021688023700183346,0.04467902235123954,0.0710372903195943,0.1005860516852184(...TRUNCATED) | [[0.002214195925451761,0.021688023700183346,0.04467902235123954,0.0710372903195943,0.100586051685218(...TRUNCATED) | 0.1 | 6.283185 | 0.01 | 10 |
[0.0,0.049473900056532176,0.09894780011306435,0.14842170016959652,0.1978956002261287,0.2473695002826(...TRUNCATED) | [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7000000000000001,0.8,0.9,1.0,1.1,1.2,1.3,1.4000000000000001,1.5,1.6,1(...TRUNCATED) | [-0.0006230427631917166,-0.0063245978271977464,-0.013567092092102113,-0.022526198242239358,-0.033352(...TRUNCATED) | [[-0.0006230427631917166,-0.0063245978271977464,-0.013567092092102113,-0.022526198242239358,-0.03335(...TRUNCATED) | 0.1 | 6.283185 | 0.01 | 10 |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
1D Burgers Equation Dataset (FEniCS Implementation)
This dataset generates samples from the 1D viscous Burgers equation using FEniCS/DOLFINx for robust finite element simulation of nonlinear PDE dynamics.
Mathematical Formulation
Equation: 1D viscous Burgers equation
∂u/∂t + u∂u/∂x = ν∂²u/∂x², x ∈ [0, 1], t ∈ [0, T]
Boundary Conditions: Homogeneous Dirichlet
u(0, t) = u(1, t) = 0
Initial Conditions: Smooth random functions from Gaussian process
u(x, 0) = u₀(x) ~ GP(0, k(x,x'))
Physical Significance
The Burgers equation models:
- Nonlinear advection (u∂u/∂x): Wave steepening leading to shock formation
- Viscous diffusion (ν∂²u/∂x²): Smoothing and energy dissipation
- Competition between nonlinearity and diffusion at different viscosity scales
This makes it ideal for studying operator learning on nonlinear PDEs with shock dynamics.
Dataset Features
- Random initial conditions: GP sampling ensures smooth, diverse profiles
- Random viscosity: ν ∈ [0.01, 0.1] for multi-scale dynamics
- Full trajectories: Complete space-time evolution for operator learning
- Robust numerics: FEniCS + Newton method handles nonlinear terms accurately
Variables
The dataset returns a dictionary with the following fields:
Coordinates
spatial_coordinates:(Nx,)- Physical x coordinates on scaled domaintime_coordinates:(nt,)- Time evolution points
Solution Fields
u_initial:(Nx,)- Initial condition u₀(x)u_trajectory:(nt, Nx)- Complete space-time solution u(x,t)
Parameters
viscosity: Viscosity coefficient ν (randomly sampled per sample)domain_length: Physical domain length (for coordinate scaling)timestep: Time integration step size usedsave_interval: Trajectory sampling interval
Dataset Parameters
- Computational domain: [0, 1] (unit interval)
- Physical domain: Scaled to specified length (default: 2π)
- Default grid points: 128 spatial points
- Default time range: [0, 2.0]
- Spatial resolution: P1 Lagrange finite elements
- Temporal resolution: 0.01 time units with backward Euler
PDE-Specific Parameters
- Viscosity range: ν ∈ [0.01, 0.1] (randomly sampled)
- Boundary conditions: Homogeneous Dirichlet (u = 0 at boundaries)
- Initial conditions: GP-sampled smooth functions with zero BCs
- Time integration: Implicit backward Euler with Newton solver
Installation
pip install -r requirements.txt
Note: Requires FEniCS/DOLFINx installation. Run in appropriate container or environment.
Usage
Basic Usage
from dataset import BurgersDataset
# Create dataset
dataset = BurgersDataset(
Lx=2*np.pi, # Physical domain scaling
Nx=128, # Spatial resolution
stop_sim_time=2.0, # Simulation time
timestep=0.01, # Time step
save_interval=10 # Trajectory sampling
)
# Generate sample
sample = next(iter(dataset))
print(f"Initial condition shape: {sample['u_initial'].shape}")
print(f"Trajectory shape: {sample['u_trajectory'].shape}")
print(f"Viscosity: {sample['viscosity']:.4f}")
Generate Dataset
python generate_data.py # Creates train/test splits as parquet files
Visualization
Run the plotting scripts to visualize samples:
python plot_sample.py # 3-panel plot: initial, evolution, comparison
python plot_animation.py # Animated shock formation and evolution
Implementation Details
- Solver: DOLFINx finite elements with Newton's method
- Time integration: Implicit backward Euler for stability
- Spatial discretization: P1 Lagrange elements on unit interval
- Nonlinear solver: Newton iteration with automatic Jacobian
- Boundary conditions: Essential BCs enforced strongly
Files
dataset.py: Main BurgersDataset class with FEniCS solvergenerate_data.py: Batch generation and parquet exportplot_sample.py: 3-panel visualization (initial, evolution, comparison)plot_animation.py: Time evolution animation with shock trackingrequirements.txt: Dependencies including FEniCS/DOLFINx
Data Generation
Generate the full dataset:
python generate_data.py
This creates train/test splits saved as chunked parquet files in the data/ directory.
- Downloads last month
- 5
