SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.06036 · 2022

Guaranteed Conservation of Momentum for Learning Particle-based Fluid Dynamics

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2210.06036.json · badge: /api/ran/2210.06036.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
tum-pbs/dmcf canonical (classifier label)
classifier basis not recorded on the link
8 ran · 4 no recorded run
FunctionStatusWhere it lives
align_vector Ran
ran on a synthesized input
tum-pbs/dmcf/models/pbf_model.py
code served (permissive licence) · get_code("ae3f795ff6ed6081")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Create two 3D vectors for alignment
v0 = tf.constant([1.0, 0.0, 0.0], dtype=tf.float32)
v1 = tf.constant([0.0, 1.0, 0.0], dtype=tf.float32)

ARGS = {
    "v0": v0,
    "v1": v1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:OperatorNotAllowedInGraphError)
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
align_vector Ran
ran on a synthesized input
tum-pbs/dmcf/datasets/dataset_reader_physics.py
code served (permissive licence) · get_code("1b0c88e4ca0cf441")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function align_vector takes two vectors v0 and v1
# Both should be 3D vectors (based on the cross product and matrix operations)
v0 = np.array([1.0, 0.0, 0.0], dtype=np.float32)
v1 = np.array([0.0, 1.0, 0.0], dtype=np.float32)

ARGS = {
    "v0": v0,
    "v1": v1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
dict_hash Ran
ran on a synthesized input
tum-pbs/dmcf/datasets/dataset_reader_physics.py
code served (permissive licence) · get_code("82414e2580de1f2f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import hashlib
import json

# The function dict_hash takes a dictionary and computes its MD5 hash
# It uses json.dumps with sort_keys=True to serialize the dict
# So we need to provide a valid dictionary argument

ARGS = {
    "d": {
        "key1": "value1",
        "key2": 42,
        "key3": [1, 2, 3],
        "key4": {"nested": True}
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gen_dict Ran
ran on a synthesized input
tum-pbs/dmcf/datasets/column_gen.py
code served (permissive licence) · get_code("e0098d40a9e04a2a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct arguments for gen_dict
# Parameters: data, idx, res, obs_size, grav, width=1, side_walls=False

# data should be a numpy array with shape (time_steps, num_particles + obs_size, 2)
# where the last dimension is [position, velocity]
# obs_size particles at the end are obstacles
time_steps = 3
num_particles = 5
obs_size = 2
data = np.random.randn(time_steps, num_particles + obs_size, 2).astype(np.float32)

# idx is a scene identifier (integer)
idx = 0

# res is a resolution scalar for normalization
res = 10.0

# grav is gravity magnitude
grav = 9.81

# width for particle expansion (optional, default 1)
width = 1

# side_walls flag (optional, default False)
side_walls = False

ARGS = {
    'data': data,
    'idx': idx,
    'res': res,
    'obs_size': obs_size,
    'grav': grav,
    'width': width,
    'side_walls': side_walls
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gen_dict Ran
ran on a synthesized input
tum-pbs/dmcf/datasets/free_fall_gen.py
code served (permissive licence) · get_code("c77df885068434af")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct valid arguments for gen_dict function
pos = [
    np.random.randn(5, 3).astype(np.float32),  # 5 particles, 3 dimensions
    np.random.randn(5, 3).astype(np.float32)   # 2 timesteps
]

vel = [
    np.random.randn(5, 3).astype(np.float32),  # 5 particles, 3 dimensions
    np.random.randn(5, 3).astype(np.float32)   # 2 timesteps
]

idx = 42

res = 1.0

grav = -9.81

ARGS = {
    'pos': pos,
    'vel': vel,
    'idx': idx,
    'res': res,
    'grav': grav
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_ckpt Ran
ran on a synthesized input
tum-pbs/dmcf/run_sample.py
code served (permissive licence) · get_code("c583d2d47369eb21")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import tempfile
import os

# Create a minimal TensorFlow model
class MinimalModel(tf.Module):
    def __init__(self):
        super(MinimalModel, self).__init__()
        self.dense = tf.keras.layers.Dense(4)
    
    def __call__(self, x):
        return self.dense(x)

# Create a temporary directory for checkpoint storage
temp_dir = tempfile.mkdtemp()
ckpt_path = os.path.join(temp_dir, "ckpt")

# Create and save a checkpoint to make the directory structure valid
model = MinimalModel()
ckpt = tf.train.Checkpoint(step=tf.Variable(1), model=model)
manager = tf.train.CheckpointManager(ckpt, ckpt_path, max_to_keep=100)
manager.save()

ARGS = {
    "ckpt_path": ckpt_path,
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sample_sphere Ran
ran on a synthesized input
tum-pbs/dmcf/datasets/free_fall_gen.py
code served (permissive licence) · get_code("8efa0beb5787dff2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (216, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    'r': 5.0,
    'res': 10,
    'sres': 2,
    'dim': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (216, 3) — shape (216, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
step Ran
ran on a synthesized input
tum-pbs/dmcf/datasets/free_fall_gen.py
code served (permissive licence) · get_code("40a148b6fb7749bc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct arguments for the step function
pos = np.array([1.0, 2.0, 3.0])
vel = np.array([0.5, 0.0, -0.5])
grav = -9.8
dt = 0.1
mode = 0

ARGS = {
    "pos": pos,
    "vel": vel,
    "grav": grav,
    "dt": dt,
    "mode": mode
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gen_data Not yet run
unverified (harvested, no recorded run)
tum-pbs/dmcf/datasets/column_gen.py
code served (permissive licence) · get_code("581865281c139f39")
How it ran

no invocation recorded.

random_rotation_matrix Not yet run
unverified (harvested, no recorded run)
tum-pbs/dmcf/datasets/dataset_reader_physics.py
code served (permissive licence) · get_code("2c6afc6f30f0eb06")
How it ran

no invocation recorded.

run_inference Not yet run
unverified (harvested, no recorded run)
tum-pbs/dmcf/run_sample.py
code served (permissive licence) · get_code("842cdabb9a891360")
How it ran

no invocation recorded.

run_rollout Not yet run
unverified (harvested, no recorded run)
tum-pbs/dmcf/run_sample.py
code served (permissive licence) · get_code("efb41573197fb0f6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We present a novel method for guaranteeing linear momentum in learned physics simulations. Unlike existing methods, we enforce conservation of momentum with a hard constraint, which we realize via antisymmetrical continuous convolutional layers. We combine these strict constraints with a hierarchical network architecture, a carefully constructed resampling scheme, and a training approach for temporal coherence. In combination, the proposed method allows us to increase the physical accuracy of the learned simulator substantially. In addition, the induced physical bias leads to significantly better generalization performance and makes our method more reliable in unseen test cases. We evaluate our method on a range of different, challenging fluid scenarios. Among others, we demonstrate that our approach generalizes to new scenarios with up to one million particles. Our results show that the proposed algorithm can learn complex dynamics while outperforming existing approaches in generalization and training performance. An implementation of our approach is available at https://github.com/tum-pbs/DMCF.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2210.06036")
get_code_for_paper("2210.06036")
have("2210.06036")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2210.06036.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2210.06036.svg)](https://syntology.ai/paper/2210.06036)

Connect an agent — have() is free.