Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wslda wslda
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wsldawslda
  • Wiki
  • Helmholtz decomposition code

Helmholtz decomposition code · Changes

Page history
Update Helmholtz decomposition code authored Feb 20, 2026 by Gabriel Wlazłowski's avatar Gabriel Wlazłowski
Hide whitespace changes
Inline Side-by-side
Helmholtz-decomposition-code.md
View page @ 1805f134
**VERSION>=2021.09.01**
Link to code: [extensions/helmholtz-decomposition](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/extensions/helmholtz-decomposition)
# Introduction
Analysis of turbulence and vortices requires knowledge of the kinetic energy, its conservation and its modes. This tool performs the Helmholtz Decomposition, in order to extract the compressive and rotational components of kinetic energy density of the flow as shown in **Tsubota, Fujimoto, Yui** (2017) [**Numerical Studies of Quantum Turbulence**](https://arxiv.org/abs/1704.02566).
Analysis of turbulence and vortices requires knowledge of the kinetic energy, its conservation, and its modes. This tool performs the Helmholtz Decomposition in order to extract the compressive and rotational components of kinetic energy density of the flow, as shown in **Tsubota, Fujimoto, Yui** (2017) [**Numerical Studies of Quantum Turbulence**](https://arxiv.org/abs/1704.02566).
We define the effective velocity field as $`\omega(\textbf{r},t)=\sqrt{\rho(\textbf{r},t)}v(\textbf{r},t)`$. From this, we can calculate the kinetic energy as:
......@@ -28,16 +28,16 @@ Note that in our specific case, we assume the component $`\omega_0(t)`$ to be ze
# Usage
The cast line consists of few specific entries. After the executable name, call the `.wtxt` file that needs to be analyzed, together with a number indicating the spin component you wish to inspect:
The cast line consists of a few specific entries. After the executable name, call the `.wtxt` file that needs to be analyzed, together with a number indicating the spin component you wish to inspect:
* 0 is for spin "a" (up)
* 1 is for spin "b" (down)
* 2 is for spin "a"+"b"
Here is an example of how it should look like:
Here is an example of how it should look:
```bash
[gabrielw@node2066 tmp]$ mpirun -np 5 wslda-hdc-3d test2.wtxt 0
Adding new variables [wc_a, wi_a] to w-data set.
Adding new variables [wc_a, wi_a] to the w-data set.
Number of measurements = 10
Starting time = -1
Lattice size = 80 x 80 x 16
......@@ -51,7 +51,7 @@ Here is an example of how it should look like:
....
Completed in 4s ( 0m 4s)!
```
For large lattices, the code might take longer than it shows due to MPI memory cleaning routines.
For large lattices, the code might take longer than it appears due to MPI memory-cleaning routines.
The code outputs four files:
* Two of them are `.wdat`, and they contain data about $`\omega_c(\textbf{r},t)`$ and $`\omega_i(\textbf{r},t)`$ in binary form. These can be read via VisIt by selecting the corresponding quantity from the VisIt HUD (wc*/wi*);
......@@ -61,12 +61,12 @@ The code outputs four files:
3. rotational energy,
4. compressive energy calculated via spectral decomposition
5. rotational energy calculated via spectral decomposition
* One `hhspec*.txt` file, containing data blocks for every timestep and showing the compressive and rotational spectra as a function of k. In current version, only rotational spectra is reliable. **[TODO: Fix compressive.]**
* One `hhspec*.txt` file, containing data blocks for every timestep and showing the compressive and rotational spectra as a function of k. In the current version, only rotational spectra are reliable.
Units for every quantity are expressed in terms of **density** $`\rho`$, since we take $`m=\hbar=k_B=1`$. As a result, energies have measure units of $`\rho^{5/6}`$.
# Limitations
Presently the code supports only 3D data. However, you can apply it to 2D as well. In order to do that, you need to increase data dimensionality of the datasets you wish to analyze. You can do it using wdata tool `wdata-datadim-up`. For example:
Presently, the code supports only 3D data. However, you can apply it to 2D as well. To do that, you need to increase the data dimensionality of the datasets you wish to analyze. You can do it using the wdata tool `wdata-datadim-up`. For example:
```bash
[gabrielw@node2066 tmp]$ wdata-datadim-up test1.wtxt test2 3
# WDATA TOOL: DATADIM MODIFIER
......@@ -101,7 +101,7 @@ Presently the code supports only 3D data. However, you can apply it to 2D as wel
```
The resizing tool operates on all the variables listed in the `.wtxt` file, but the Helmholtz decomposition tool only needs **density and current for each spin component**. If your dataset is spin-symmetric, using only the "a" component will be enough. The new `.wtxt` file will link to the resized files for each quantity.
The result of the resizing will be a dataset with cylindrical symmetry: some effects of a fully-3D simulation **will not show up** (as, in the case of vortices, Kelvin waves or vortex rings).
The result of the resizing will be a dataset with cylindrical symmetry: some effects of a fully 3D simulation **will not show up** (e.g., vortices, Kelvin waves, or vortex rings).
# Developers
* Andrea Barresi, Warsaw University of Technology
Clone repository

Content of Documentation
Official webpage
W-BSK Toolkit