Dissipative hamiltonian neural network for exact mass conservation #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The proposed changes include the implementation of two mass conservation models and two mass-conserving SSA models as dissipative hamiltonian neural networks.
The implementation is based on a Helmholtz decomposition of the 2-dimensional mass flux vector field Hv̄ into a divergent, curl-free component d and a rotational, divergence-free component r. The two components are modelled based on two scalar potential fields D and R that replace variables u, v, and a in the network output. These variables are instead computed from the potential fields like this:
Hv̄ = d + r = grad(D) + J grad(R) = [D_x, D_y] + [-R_y, R_x]
with
div(d) = div(Hv̄) and curl(d) = 0
curl(r) = curl(Hv̄) and div(r) = 0
u = (D_x - R_y) / H
v = (D_y + R_x)/ H
a = D_xx + D_yy
with _x and _xx indicating the first and second derivative in the indicated direction, and with u,v being the depth-integrated velocity components and a being the mass flux divergence.
Constructing the mass flux and velocity field in this way exactly satisfies the 2-dimensional continuity equation. Evaluating the residual of the continuity equation in the physics loss of the network is thus no longer necessary. Rather, the equations are entirely implemented as data misfit functions, currently for misfit with observed velocity and dHdt.
References:
Bente et al. 2025, http://arxiv.org/abs/2510.06286
Sosanya and Greydanus 2022, http://arxiv.org/abs/2201.10085
Schoder et al. 2020, https://pmc.ncbi.nlm.nih.gov/articles/PMC7648005/
Bathia et al. 2013, https://ieeexplore.ieee.org/abstract/document/6365629