Skip to content

oameye/HelmholtzDecomposition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HelmholtzDecomposition

A Mathematica package for performing analytical Helmholtz decomposition of vector fields in n dimensions, following the approach in Richters and Glotz, "Analytical Helmholtz Decomposition of n-Dimensional Vector Fields" (10.1016/j.jmaa.2023.127138).

Quick Start

(* Load the package *)
Needs["HelmholtzDecomposition`"];

(* Define your coordinate variables *)
x = Subscript[x, 1]; y = Subscript[x, 2];

(* Your vector field *)
f = {x^2 + y, x*y};
coords = {x, y};

(* Complete decomposition with output *)
PrintHelmholtz[f, coords]

(* Direct access to components *)
{gradient, rotational} = HelmholtzDecomposition[f, coords];

Main Functions

One defines variables:

  • f: Vector field as a list (e.g., {x^2, y^2})
  • xvec: Coordinate variables as a list (e.g., {x, y})

The package as the following main functions:

  • HelmholtzDecomposition[f, xvec]: Returns {gradient, rotational} components as a list.

  • HelmholtzGradient[f, xvec]: Returns only the gradient component.

  • HelmholtzRotational[f, xvec]: Returns only the rotational component.

  • PrintHelmholtz[f, xvec]: Displays the complete Helmholtz decomposition as in the original code of Richters and Glotz.

Citation and License

Any intellectual property rights of the original authors are fully respected. Please cite the original paper when using this code.

About

Analytical Helmholtz decomposition of vector fields in n dimensions

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published