Name | hw2d JSON |
Version |
1.0.4
JSON |
| download |
home_page | None |
Summary | Reference HW2D Implementation in Python |
upload_time | 2024-04-09 20:33:25 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7.1 |
license | MIT |
keywords |
plasma physics
simulation
turbulence
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<img align="right" width="170" height="170" src="imgs/logo_large_text.jpg">
# The Hasegawa-Wakatani model of plasma turbulence
![hw2d-status](https://github.com/the-rccg/hw2d/actions/workflows/main.yml/badge.svg)
![hw2d-documentation](https://github.com/the-rccg/hw2d/actions/workflows/pdoc.yml/badge.svg)
![hw2d-publish](https://github.com/the-rccg/hw2d/actions/workflows/python-publish.yml/badge.svg)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/hw2d.svg)](https://pypi.org/project/hw2d/)
[![DOI](https://zenodo.org/badge/671837450.svg)](https://zenodo.org/doi/10.5281/zenodo.10365012)
[![status](https://joss.theoj.org/papers/f5334c75275080b267d40b0429d711a2/status.svg)](https://joss.theoj.org/papers/f5334c75275080b267d40b0429d711a2)
This repository contains a reference implementations for the Hasegawa-Wakatani model in two dimensions using Python.
The purpose is to provide a playground for education and scientific purposes: be it testing numerical or machine learning methods, or building related models quicker, while improving the comparability of results.
Stable, verified parameters and values are published along with this repository.
### Installation
Install a pure NumPy version via
```
pip install hw2d
```
and to include accelerators (currently supporting: Numba), use the following:
```
pip install hw2d[accelerators]
```
### Usage
Running `python -m hw2d` will let you run a hw2d simulation. It exposes the CLI Interface of the code located in src/hw2d/run.py with all parameters available there. Simply run `python -m hw2d --help` to get a full rundown of all available parameters along with their explanations.
If accelerators like Numba are installed, these will be used automatically. To manually decide which function should be run with which accelerator, simply change the imports in srd/hw2d/model.py to select the appropriate function. Default uses Numba for periodic gradients and the Arakawa scheme, and to be extended in the future.
### Example Usage
Example of running a fully converged turbulent simulation:
```python
python -m hw2d --step_size=0.025 --end_time=1000 --grid_pts=512 --c1=1.0 --k0=0.15 --N=3 --nu=5.0e-08 --output_path="test.h5" --buffer_length=100 --snaps=1 --downsample_factor=2 --movie=1 --min_fps=10 --speed=5 --debug=0
```
The code will run a grid of `512x512` in steps of `0.025` from 0 to `1000` for an adiabatic coefficient of `1.0` and hyperdiffusion of order `3` with a coefficient of `5.0e-08`. The resulting data will be saved to "test.h5" after every `1` frame and written in batches of `100` using a `2`x downsampled representation (256,256). This file will then be turned into a movie with at least `10` frames per second, running at `5`t per second. The entire process will use no debugging.
Full documentation is available at: https://the-rccg.github.io/hw2d/
### Reference Methods
The implementation presented here is by no means meant to be the optimal, but an easy to understand starting point to build bigger things upon and serve as a reference for other work.
This reference implementation uses:
- Gradients $\left(\partial_x, \partial_y, \nabla \right)$: Central finite difference schemes (2nd order accurate)
- Poisson Bracket $\left([\cdot, \cdot]\right)$: Arakawa Scheme (2nd order accurate, higher order preserving)
- Poisson Solver $\left(\nabla^{-2}\cdot\right)$: Fourier based solver
- Time Integration $\left(\partial_t\right)$: Explicit Runge-Kutta (4th order accurate)
The framework presented here can be easily extended to use alternative implementations.
### Contributions encouraged
Pull requests are strongly encouraged.
The simplest way to contribute is running simulations and committing the results to the historical runs archive. This helps in exploring the hyper-parameter space and improving statistical reference values for all.
If you don't know where to start in contributing code, implementing new numerical methods or alternative accelerators make for good first projects!
### Code guidelines
All commits are auto-formatted using `Black` to keep a uniform presentation.
## The Hasegawa-Wakatani Model
The HW model describes drift-wave turbulence using two physical fields: the density $n$ and the potential $\phi$ using various gradients on these.
$$
\begin{align}
\partial_t n &= c_1 \left( \phi - n \right)
- \left[ \phi, n \right]
- \kappa_n \partial_y \phi
- \nu \nabla^{2N} n
\\\
\partial_t \Omega &= c_1 \left( \phi - n \right)
- \left[ \phi, \Omega \right]
- \nu \nabla^{2N} \Omega
\\\
\Omega &= \nabla^2 \phi
\end{align}
$$
https://github.com/the-rccg/hw2d/assets/28964733/30d40e53-72a9-49b5-9bc5-87dc3f10a076
## Dynamics of the different phases
The model produces self-organizing turbulent structures in a three distinct stages: initial self-organization, linear drift waves, and a stable turbulent phase.
For the interesting intermediary phase for the adiabatic coefficient, `c1=1`, the initial perturbation will start organizing to produce linear drift waves through the $\partial_t \phi$ component.
The system transitions into this first linear phase at roughly t=15, saturates at around t=45, and breaks down to transition into the turbulent phase at about t=80.
The turbulent phase is visually saturated at around t=125, but physical parameters overshoot and only fall into the long term stable phase at around t=200.
## Physical Properties
### Numerical values for each frame
The reason why the Hasegawa-Wakatani Model has been the de-facto testing bed for new methods are its statistically stationary properties of the complex turbulent system.
The module includes all code needed to generate these values.
It goes further, however, and provides reference values along with statistical bounds for the first time for a vast range of values.
This allows simple comparison, as well es evaluation of new methods to one reference community built resource.
$$
\begin{align}
\Gamma^n &= - \iint{ \mathrm{d}^2x \space \left( n \space \partial_y \phi \right) } \\\
\Gamma^c &= c_1 \iint{ \mathrm{d}^2x \space \left(n - \phi \right)^2} \\\
E &= \small \frac{1}{2} \normalsize \iint{\mathrm{d}^2 x \space \left(n^2 - \left|\nabla_\bot \phi \right|^2 \right)} \\\
U &= \small \frac{1}{2} \normalsize \iint{\mathrm{d}^2 x \space \left(n-\nabla_\bot^2 \phi\right)^2} = \small \frac{1}{2} \normalsize \iint{\mathrm{d}^2 x \space \left(n-\Omega\right)^2}
\end{align}
$$
### Spectral values for each frame
Additionally, some spectral properties are included for more detailed analysis beyond the scalar factors, among these are:
$$
\begin{align}
\Gamma^n \small (k_y) \normalsize &= - i k_y \space n \small (k_y) \normalsize \space \phi^* \small (k_y) \normalsize \\\
\delta \small (k_y) \normalsize &= - \mathrm{Im}\left( \mathrm{log} \left( n^* \small (k_y) \normalsize \space \phi \small (k_y) \normalsize \right) \right) \\\
E^N \small (k_y) \normalsize &= \small \frac{1}{2}\normalsize \big| n \small (k_y) \normalsize \big|^2 \\\
E^V \small (k_y) \normalsize &= \small \frac{1}{2}\normalsize \big| k_y \space \phi \small (k_y) \normalsize \big|^2
\end{align}
$$
### Predictable in- and outflows over time
Finally, due to the definition of the fields as perturbation fields with background density gradients, the system gains and loses energy and enstrophy in a predictable manner over time.
The conservation of these are also tested within the continuous integration pipeline.
The definitions are given by:
$$
\begin{align}
\partial_t E &= \Gamma^N - \Gamma ^c - \mathfrak{D}^E \\\
\partial_t U &= \Gamma^N - \mathfrak{D}^U \\\
\mathfrak{D}^E &= \quad \iint{ \mathrm{d}^2x \space (n \mathfrak{D^n} - \phi \mathfrak{D}^\phi)} \\\
\mathfrak{D}^U &= - \iint{ \mathrm{d}^2x \space (n - \Omega)(\mathfrak{D}^n - \mathfrak{D}^\phi)} \\\
with \quad \mathfrak{D}^n \small (x,y) \normalsize &= \nu \nabla^{2N} n \quad and \quad
\mathfrak{D}^\phi \small (x,y) \normalsize = \nu \nabla^{2N} \phi
\end{align}
$$
### General notes
It is the common practice across all reference texts to calculate $\int\cdot$ as $\langle \cdot \rangle$ for a unitless box of size one in order to get comparable values for all properties.
## Common Issues in Simulating HW2D
### Crashing/NaN encountered
#### within < 10 timesteps
The simulation has exploded in one direction. Most commonly this means that the hyper-diffusion components are too large.
- reduce the hyper diffusion order: `N`
- reduce the diffusion coefficient: `nu`
- reduce the initial perturbation: `scale`
#### around t=75-125
The timestep is too big in the turbulent phase. CFL criteria are no longer satisfied and simulation crashes.
- reduce: `step_size`
### Chessboard pattern emerges
The energy accumulates at grid scale. Hyper-diffusion component is not large enough to dissipate the energy.
- increase: `nu`
- increase: `N`
### Physical values deviate from references
The HW2D model can create stable simulations that are under-resolved, through very large hyper-diffusion terms. A higher resolution is needed for this box size.
- increase: `grid_pts`
If the esntrophy goes way above reference values, however, it can mean that the hyper-diffusion is too small.
- increase: `nu`
# References
The region between the adiabatic and hydrodynamic limit is defined at `c_1=1`. For this dynamic and a box size of `k0=0.15`, a minimum grid size of `512x512` is needed at a `dt=0.025`. To generate a stable simulation with hyper-diffusion (`N=3`) requires a value of `nu=5e-08`.
## Reference Step Sizes
Minimum step sizes for the system can be evaluated by setting hyper-diffusion to zero `N=0` and `nu=0` and running to about `age=200` to reach into the turbulent steady-state regime.
| integrator | `c1` | Box Size | `grid_pts` | min `dt` |
| ---------- | ---- | -------- | ---------- | -------- |
| rk4 | 1.0 | 0.15 | 1024x1024 | 0.025 |
| rk4 | 1.0 | 0.15 | 512x512 | 0.025 |
| rk4 | 1.0 | 0.15 | 256x256 | 0.05 |
| rk4 | 1.0 | 0.15 | 128x128 | 0.05 |
| rk4 | 1.0 | 0.15 | 64x64 | 0.05 |
| rk4 | 1.0 | 0.15 | 32x32 | 0.05 |
## Reference Timetraces
Sample traces are given for `512x512`, `dt=0.05`, `c1=1`, `N=3`, and `nu=5e-08`. Note that the statistical nature does mean single simulations can deviate for quite some time from the statistical mean.
![Plot1](imgs/gamma_n-and-gamma_c.jpg)
![Plot2](imgs/enstrophy-energy-kinetic_energy-thermal_energy.jpg)
## Reference Values
Reference values are averaged over 25 runs starting from well within the turbulent steady-state `t=300` with the standard deviation across the simulations denoted by $\pm$.
Each run to `t=1,000` at `512x512` and `dt=0.025` requires roughly 125GB (3 million floats/frame for 3 fields over 40,000 frames per simulation), meaning the summary contains information for 10TB of data. This does not include the hypterparameter stabilization tests.
As a result, it is practically unfeasible to supply this data.
| **Metric** | **HW2D Data** | **Stegmeir** | **Camargo** | **HW** | **Zeiler** |
| -------------------- | --------------- | ------------ | ----------- | ---------- | ---------- |
| **** | 512x512 | [Stegmeir et al.](https://doi.org/10.17617/2.2085490) | [Camargo et al.](https://doi.org/10.1063/1.871116) | [In Stegmeir](https://doi.org/10.1088/1361-6587/aaa373) | [Zeiler et al.](https://doi.org/10.1063/1.871566) |
| **$\Gamma_n$** | $0.60 \pm 0.01$ | $0.64$ | $0.73$ | $0.61$ | $0.8$ |
| **$\delta\Gamma_n$** | $0.05 \pm 0.01$ | $n/a$ | $n/a$ | $n/a$ | $n/a$ |
| **$\Gamma_c$** | $0.60 \pm 0.01$ | $n/a$ | $0.72$ | $n/a$ | $n/a$ |
| **$\delta\Gamma_n$** | $0.03 \pm 0.01$ | $n/a$ | $n/a$ | $n/a$ | $n/a$ |
| **$E$** | $3.78 \pm 0.07$ | $3.97$ | $4.4$ | $3.82$ | $6.1$ |
| **$\delta E$** | $0.29 \pm 0.03$ | $0.26$ | $0.16$ | $0.26$ | $0.51$ |
| **$U$** | $13.2 \pm 0.91$ | $n/a$ | $12.8$ | $n/a$ | $n/a$ |
| **$\delta U$** | $0.68 \pm 0.08$ | $n/a$ | $1.66$ | $n/a$ | $n/a$ |
Raw data
{
"_id": null,
"home_page": null,
"name": "hw2d",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7.1",
"maintainer_email": null,
"keywords": "Plasma Physics, Simulation, Turbulence",
"author": null,
"author_email": "Robin Greif <rccgreif@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/43/cd/acad60addddfe979f2859424c4febf9eed03de81c2edef301c1420c42fd0/hw2d-1.0.4.tar.gz",
"platform": null,
"description": "<img align=\"right\" width=\"170\" height=\"170\" src=\"imgs/logo_large_text.jpg\">\n\n# The Hasegawa-Wakatani model of plasma turbulence\n\n![hw2d-status](https://github.com/the-rccg/hw2d/actions/workflows/main.yml/badge.svg)\n![hw2d-documentation](https://github.com/the-rccg/hw2d/actions/workflows/pdoc.yml/badge.svg)\n![hw2d-publish](https://github.com/the-rccg/hw2d/actions/workflows/python-publish.yml/badge.svg)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/hw2d.svg)](https://pypi.org/project/hw2d/)\n[![DOI](https://zenodo.org/badge/671837450.svg)](https://zenodo.org/doi/10.5281/zenodo.10365012)\n[![status](https://joss.theoj.org/papers/f5334c75275080b267d40b0429d711a2/status.svg)](https://joss.theoj.org/papers/f5334c75275080b267d40b0429d711a2)\n\nThis repository contains a reference implementations for the Hasegawa-Wakatani model in two dimensions using Python.\nThe purpose is to provide a playground for education and scientific purposes: be it testing numerical or machine learning methods, or building related models quicker, while improving the comparability of results.\n\nStable, verified parameters and values are published along with this repository.\n\n### Installation \n\nInstall a pure NumPy version via\n```\npip install hw2d\n```\n\nand to include accelerators (currently supporting: Numba), use the following:\n```\npip install hw2d[accelerators]\n```\n\n### Usage\n\nRunning `python -m hw2d` will let you run a hw2d simulation. It exposes the CLI Interface of the code located in src/hw2d/run.py with all parameters available there. Simply run `python -m hw2d --help` to get a full rundown of all available parameters along with their explanations.\n\nIf accelerators like Numba are installed, these will be used automatically. To manually decide which function should be run with which accelerator, simply change the imports in srd/hw2d/model.py to select the appropriate function. Default uses Numba for periodic gradients and the Arakawa scheme, and to be extended in the future.\n\n### Example Usage \n\nExample of running a fully converged turbulent simulation:\n```python\npython -m hw2d --step_size=0.025 --end_time=1000 --grid_pts=512 --c1=1.0 --k0=0.15 --N=3 --nu=5.0e-08 --output_path=\"test.h5\" --buffer_length=100 --snaps=1 --downsample_factor=2 --movie=1 --min_fps=10 --speed=5 --debug=0\n```\nThe code will run a grid of `512x512` in steps of `0.025` from 0 to `1000` for an adiabatic coefficient of `1.0` and hyperdiffusion of order `3` with a coefficient of `5.0e-08`. The resulting data will be saved to \"test.h5\" after every `1` frame and written in batches of `100` using a `2`x downsampled representation (256,256). This file will then be turned into a movie with at least `10` frames per second, running at `5`t per second. The entire process will use no debugging. \n\nFull documentation is available at: https://the-rccg.github.io/hw2d/\n\n### Reference Methods\n\nThe implementation presented here is by no means meant to be the optimal, but an easy to understand starting point to build bigger things upon and serve as a reference for other work.\nThis reference implementation uses:\n\n- Gradients $\\left(\\partial_x, \\partial_y, \\nabla \\right)$: Central finite difference schemes (2nd order accurate)\n- Poisson Bracket $\\left([\\cdot, \\cdot]\\right)$: Arakawa Scheme (2nd order accurate, higher order preserving)\n- Poisson Solver $\\left(\\nabla^{-2}\\cdot\\right)$: Fourier based solver\n- Time Integration $\\left(\\partial_t\\right)$: Explicit Runge-Kutta (4th order accurate)\n\nThe framework presented here can be easily extended to use alternative implementations.\n\n### Contributions encouraged\n\nPull requests are strongly encouraged. \n\nThe simplest way to contribute is running simulations and committing the results to the historical runs archive. This helps in exploring the hyper-parameter space and improving statistical reference values for all.\n\nIf you don't know where to start in contributing code, implementing new numerical methods or alternative accelerators make for good first projects!\n\n### Code guidelines\n\nAll commits are auto-formatted using `Black` to keep a uniform presentation.\n\n\n## The Hasegawa-Wakatani Model\n\nThe HW model describes drift-wave turbulence using two physical fields: the density $n$ and the potential $\\phi$ using various gradients on these.\n\n$$\n\\begin{align}\n \\partial_t n &= c_1 \\left( \\phi - n \\right)\n - \\left[ \\phi, n \\right]\n - \\kappa_n \\partial_y \\phi\n - \\nu \\nabla^{2N} n \n \\\\\\\n \\partial_t \\Omega &= c_1 \\left( \\phi - n \\right)\n - \\left[ \\phi, \\Omega \\right]\n - \\nu \\nabla^{2N} \\Omega \n \\\\\\\n \\Omega &= \\nabla^2 \\phi\n\\end{align}\n$$\n\n\n\nhttps://github.com/the-rccg/hw2d/assets/28964733/30d40e53-72a9-49b5-9bc5-87dc3f10a076\n\n\n\n\n## Dynamics of the different phases\n\nThe model produces self-organizing turbulent structures in a three distinct stages: initial self-organization, linear drift waves, and a stable turbulent phase.\n\nFor the interesting intermediary phase for the adiabatic coefficient, `c1=1`, the initial perturbation will start organizing to produce linear drift waves through the $\\partial_t \\phi$ component. \nThe system transitions into this first linear phase at roughly t=15, saturates at around t=45, and breaks down to transition into the turbulent phase at about t=80.\nThe turbulent phase is visually saturated at around t=125, but physical parameters overshoot and only fall into the long term stable phase at around t=200. \n\n\n## Physical Properties\n\n### Numerical values for each frame\n\nThe reason why the Hasegawa-Wakatani Model has been the de-facto testing bed for new methods are its statistically stationary properties of the complex turbulent system.\nThe module includes all code needed to generate these values.\nIt goes further, however, and provides reference values along with statistical bounds for the first time for a vast range of values.\nThis allows simple comparison, as well es evaluation of new methods to one reference community built resource.\n\n$$\n\\begin{align}\n \\Gamma^n &= - \\iint{ \\mathrm{d}^2x \\space \\left( n \\space \\partial_y \\phi \\right) } \\\\\\\n \\Gamma^c &= c_1 \\iint{ \\mathrm{d}^2x \\space \\left(n - \\phi \\right)^2} \\\\\\\n E &= \\small \\frac{1}{2} \\normalsize \\iint{\\mathrm{d}^2 x \\space \\left(n^2 - \\left|\\nabla_\\bot \\phi \\right|^2 \\right)} \\\\\\\n U &= \\small \\frac{1}{2} \\normalsize \\iint{\\mathrm{d}^2 x \\space \\left(n-\\nabla_\\bot^2 \\phi\\right)^2} = \\small \\frac{1}{2} \\normalsize \\iint{\\mathrm{d}^2 x \\space \\left(n-\\Omega\\right)^2} \n\\end{align}\n$$\n\n\n### Spectral values for each frame\n\nAdditionally, some spectral properties are included for more detailed analysis beyond the scalar factors, among these are:\n\n$$\n\\begin{align}\n \\Gamma^n \\small (k_y) \\normalsize &= - i k_y \\space n \\small (k_y) \\normalsize \\space \\phi^* \\small (k_y) \\normalsize \\\\\\\n \\delta \\small (k_y) \\normalsize &= - \\mathrm{Im}\\left( \\mathrm{log} \\left( n^* \\small (k_y) \\normalsize \\space \\phi \\small (k_y) \\normalsize \\right) \\right) \\\\\\\n E^N \\small (k_y) \\normalsize &= \\small \\frac{1}{2}\\normalsize \\big| n \\small (k_y) \\normalsize \\big|^2 \\\\\\\n E^V \\small (k_y) \\normalsize &= \\small \\frac{1}{2}\\normalsize \\big| k_y \\space \\phi \\small (k_y) \\normalsize \\big|^2 \n\\end{align}\n$$\n\n\n### Predictable in- and outflows over time\n\nFinally, due to the definition of the fields as perturbation fields with background density gradients, the system gains and loses energy and enstrophy in a predictable manner over time.\nThe conservation of these are also tested within the continuous integration pipeline.\nThe definitions are given by:\n\n$$\n\\begin{align}\n \\partial_t E &= \\Gamma^N - \\Gamma ^c - \\mathfrak{D}^E \\\\\\\n \\partial_t U &= \\Gamma^N - \\mathfrak{D}^U \\\\\\\n \\mathfrak{D}^E &= \\quad \\iint{ \\mathrm{d}^2x \\space (n \\mathfrak{D^n} - \\phi \\mathfrak{D}^\\phi)} \\\\\\\n \\mathfrak{D}^U &= - \\iint{ \\mathrm{d}^2x \\space (n - \\Omega)(\\mathfrak{D}^n - \\mathfrak{D}^\\phi)} \\\\\\\n with \\quad \\mathfrak{D}^n \\small (x,y) \\normalsize &= \\nu \\nabla^{2N} n \\quad and \\quad \n \\mathfrak{D}^\\phi \\small (x,y) \\normalsize = \\nu \\nabla^{2N} \\phi \n\\end{align}\n$$\n\n### General notes\n\nIt is the common practice across all reference texts to calculate $\\int\\cdot$ as $\\langle \\cdot \\rangle$ for a unitless box of size one in order to get comparable values for all properties.\n\n\n## Common Issues in Simulating HW2D\n\n### Crashing/NaN encountered \n\n#### within < 10 timesteps\n\nThe simulation has exploded in one direction. Most commonly this means that the hyper-diffusion components are too large. \n- reduce the hyper diffusion order: `N`\n- reduce the diffusion coefficient: `nu`\n- reduce the initial perturbation: `scale`\n\n\n#### around t=75-125\n\nThe timestep is too big in the turbulent phase. CFL criteria are no longer satisfied and simulation crashes.\n- reduce: `step_size`\n\n### Chessboard pattern emerges\n\nThe energy accumulates at grid scale. Hyper-diffusion component is not large enough to dissipate the energy.\n- increase: `nu`\n- increase: `N`\n \n\n### Physical values deviate from references\n\nThe HW2D model can create stable simulations that are under-resolved, through very large hyper-diffusion terms. A higher resolution is needed for this box size.\n- increase: `grid_pts`\n\nIf the esntrophy goes way above reference values, however, it can mean that the hyper-diffusion is too small.\n- increase: `nu`\n\n# References\n\nThe region between the adiabatic and hydrodynamic limit is defined at `c_1=1`. For this dynamic and a box size of `k0=0.15`, a minimum grid size of `512x512` is needed at a `dt=0.025`. To generate a stable simulation with hyper-diffusion (`N=3`) requires a value of `nu=5e-08`.\n\n## Reference Step Sizes\n\nMinimum step sizes for the system can be evaluated by setting hyper-diffusion to zero `N=0` and `nu=0` and running to about `age=200` to reach into the turbulent steady-state regime.\n\n| integrator | `c1` | Box Size | `grid_pts` | min `dt` |\n| ---------- | ---- | -------- | ---------- | -------- |\n| rk4 | 1.0 | 0.15 | 1024x1024 | 0.025 |\n| rk4 | 1.0 | 0.15 | 512x512 | 0.025 |\n| rk4 | 1.0 | 0.15 | 256x256 | 0.05 |\n| rk4 | 1.0 | 0.15 | 128x128 | 0.05 |\n| rk4 | 1.0 | 0.15 | 64x64 | 0.05 |\n| rk4 | 1.0 | 0.15 | 32x32 | 0.05 |\n\n\n## Reference Timetraces\n\nSample traces are given for `512x512`, `dt=0.05`, `c1=1`, `N=3`, and `nu=5e-08`. Note that the statistical nature does mean single simulations can deviate for quite some time from the statistical mean.\n\n![Plot1](imgs/gamma_n-and-gamma_c.jpg)\n![Plot2](imgs/enstrophy-energy-kinetic_energy-thermal_energy.jpg)\n\n\n## Reference Values\n\nReference values are averaged over 25 runs starting from well within the turbulent steady-state `t=300` with the standard deviation across the simulations denoted by $\\pm$. \nEach run to `t=1,000` at `512x512` and `dt=0.025` requires roughly 125GB (3 million floats/frame for 3 fields over 40,000 frames per simulation), meaning the summary contains information for 10TB of data. This does not include the hypterparameter stabilization tests. \nAs a result, it is practically unfeasible to supply this data. \n\n| **Metric** | **HW2D Data** | **Stegmeir** | **Camargo** | **HW** | **Zeiler** |\n| -------------------- | --------------- | ------------ | ----------- | ---------- | ---------- |\n| **** | 512x512 | [Stegmeir et al.](https://doi.org/10.17617/2.2085490) | [Camargo et al.](https://doi.org/10.1063/1.871116) | [In Stegmeir](https://doi.org/10.1088/1361-6587/aaa373) | [Zeiler et al.](https://doi.org/10.1063/1.871566) |\n| **$\\Gamma_n$** | $0.60 \\pm 0.01$ | $0.64$ | $0.73$ | $0.61$ | $0.8$ |\n| **$\\delta\\Gamma_n$** | $0.05 \\pm 0.01$ | $n/a$ | $n/a$ | $n/a$ | $n/a$ |\n| **$\\Gamma_c$** | $0.60 \\pm 0.01$ | $n/a$ | $0.72$ | $n/a$ | $n/a$ |\n| **$\\delta\\Gamma_n$** | $0.03 \\pm 0.01$ | $n/a$ | $n/a$ | $n/a$ | $n/a$ |\n| **$E$** | $3.78 \\pm 0.07$ | $3.97$ | $4.4$ | $3.82$ | $6.1$ |\n| **$\\delta E$** | $0.29 \\pm 0.03$ | $0.26$ | $0.16$ | $0.26$ | $0.51$ |\n| **$U$** | $13.2 \\pm 0.91$ | $n/a$ | $12.8$ | $n/a$ | $n/a$ |\n| **$\\delta U$** | $0.68 \\pm 0.08$ | $n/a$ | $1.66$ | $n/a$ | $n/a$ |\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Reference HW2D Implementation in Python",
"version": "1.0.4",
"project_urls": {
"Changelog": "https://github.com/the-rccg/hw2d/blob/main/CHANGES.md",
"Homepage": "https://github.com/the-rccg/hw2d",
"Issues": "https://github.com/the-rccg/hw2d/issues"
},
"split_keywords": [
"plasma physics",
" simulation",
" turbulence"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b14a563560c89aaa2777c86297f2fce19164f2499da7a1d65fece05056927a06",
"md5": "125b8f62c695d3ed42b11bca29e453ed",
"sha256": "da0a5b8ae4b2d33d40bc13b06628b6b810cf24ce0cd1ad1a89a536c18d32d3c6"
},
"downloads": -1,
"filename": "hw2d-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "125b8f62c695d3ed42b11bca29e453ed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.1",
"size": 53781,
"upload_time": "2024-04-09T20:33:24",
"upload_time_iso_8601": "2024-04-09T20:33:24.405409Z",
"url": "https://files.pythonhosted.org/packages/b1/4a/563560c89aaa2777c86297f2fce19164f2499da7a1d65fece05056927a06/hw2d-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "43cdacad60addddfe979f2859424c4febf9eed03de81c2edef301c1420c42fd0",
"md5": "d1c9d2fa0a30fd83b74b5a8094380c2a",
"sha256": "a153a3a21a8b528d7c38af195f085300bbe0f1dfad16d08d29b1ff397c3791f8"
},
"downloads": -1,
"filename": "hw2d-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "d1c9d2fa0a30fd83b74b5a8094380c2a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.1",
"size": 48396,
"upload_time": "2024-04-09T20:33:25",
"upload_time_iso_8601": "2024-04-09T20:33:25.912135Z",
"url": "https://files.pythonhosted.org/packages/43/cd/acad60addddfe979f2859424c4febf9eed03de81c2edef301c1420c42fd0/hw2d-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-09 20:33:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "the-rccg",
"github_project": "hw2d",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hw2d"
}