MHDFlows

Three Dimensional Magnetohydrodynamic(MHD) pseudospectral solvers written in julia with FourierFlows.jl

https://github.com/mhdflows/mhdflows.jl

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: scholar.google, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

fourierflows gpu julia magnetohydrodynamics pdes turbulence
Last synced: 8 months ago · JSON representation ·

Repository

Three Dimensional Magnetohydrodynamic(MHD) pseudospectral solvers written in julia with FourierFlows.jl

Basic Info
  • Host: GitHub
  • Owner: MHDFlows
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 10.6 MB
Statistics
  • Stars: 27
  • Watchers: 2
  • Forks: 2
  • Open Issues: 0
  • Releases: 11
Topics
fourierflows gpu julia magnetohydrodynamics pdes turbulence
Created about 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

MHDFlows.jl

doi

Julia flow

Three Dimensional Magnetohydrodynamic(MHD) pseudospectral solvers written in Julia language with FourierFlows.jl. This solver support the following features:

  1. 2/3D incompressible HD/MHD simulation (periodic boundary)
  2. Incompressible HD/MHD simulation with volume penalization method
  3. Isothermal compressible HD/MHD simulation (periodic boundary)
  4. 2/3D Electron magnetohydrodynamic simulation (periodic boundary)
  5. Passive Dye Tracer (Experimental Feature)

This package leverages the FourierFlows.jl package to set up the module. The main purpose of MHDFlows.jl aims to solve the portable 3D MHD problems on personal computer instead of cluster. Utilizing the Nvidia CUDA technology, the MHDFlows.jl could solve the front-end MHD turbulence research problems in the order of few-ten minutes by using a mid to high end gaming display card (see Memory usage & speed section). Feel free to modify yourself for your own research purpose.

Version No.

v 0.2.1
note : v 0.2.0 will be the final major update before the multi-gpu version v 0.3.0 release

Installation Guide & compatibility

The current version is tested on v1.7.3/1.8.2/1.9.0 version.

Currently, you have two way of installing MHDFlows.jl

  1. Download and build it yourself from here.

  2. Julia's built-in package manager installation (accessed by pressing ] in the Julia REPL command prompt)

julia julia> (v1.8) pkg> add MHDFlows

Scalability

The MHD Solver could either run on CPU or GPU. The scalability is same as Fourierflows, which is restricted to either a single CPU or single GPU. This restriction may change in the future depending on the development of FourierFlows. If you are running the package using GPU, the CUDA package is needed for the computation. Check out CUDA.jl for more detail.

Important note: As this is a 3D solver, the memory usage and computational time scale as N^3 (at least). Beware of the memory usage especially when you are using the GPU.

Memory usage & speed

Memory usage

For GPU users, here are some useful numbers of memory requirement for choosing the resolution of the simulation with RK4/ LSRK4 method. You may end up getting higher resolution for the same memory.

| Memory Size | Maximum Resolution ( $N^3$ ) | | ----------- | ------------------------------| | 6 GB | $256^3$ (pure MHD simulation) | | 10 GB | $320^3$ (pure MHD simulation) | | 24 GB | $512^3$ (pure MHD simulation) | | 80 GB | $700^3$ (pure MHD simulation) |

Speed

The following table provides the reference of the average runtime of 1 iteration in pure HD/MHD computation. As the benchmarks are running on the WSL2, the runtime could varies and does not reflect the best performance.

Method: compute the average time used of 100 iterations using RK4 method

Environment: WSL2 in Win11 (Ubuntu 18.04/20.04 LTS through jupyter-lab)

HD (Taylor Green Vortex, T = Float32)

| Spec CPU/GPU | $32^3$ | $64^3$ | $128^3$ | $256^3$ | | --------------------------- | ------ | ------ | ------- | ------- | | AMD Ryzen 7 5800x 8 threads | 0.040s | 0.074s | 0.490S | 7.025s | | NVIDIA RTX 3080 10GB | 0.016s | 0.018s | 0.023s | 0.152s |

MHD (Taylor Green Vortex, T = Float32)

| Spec CPU/GPU | $32^3$ | $64^3$ | $128^3$ | $256^3$ | | --------------------------- | ------ | ------ | ------- | ------- | | AMD Ryzen 7 5800x 8 threads | 0.049s | 0.180s | 1.490s | 14.50s | | NVIDIA RTX 3080 10GB | 0.013s | 0.012s | 0.037s | 0.271s |

Example

Few examples were set up to illustrate the workflow of using this package. Check out for more detail. The documentation is work in progress and will be available in the future.

Developer

MHDFlows is currently developed by Ka Wai HO@UW-Madison Astronomy.

Citing

This software is citable via zenodo. Please cite as:

Ka Wai HO. (2022). MHDFlows.jl (v.0.2.1b). Zenodo. https://doi.org/10.5281/zenodo.8242702

Owner

  • Name: MHDFlows
  • Login: MHDFlows
  • Kind: organization

Citation (CITATION.cff)

MHDFlows-version: 0.2.1
message: "If you use this software, please cite it as below."
authors:
  - family-names: HO
    given-names: Ka Wai HO
    orcid: https://orcid.org/0000-0003-3328-6300
title: MHDFlows/MHDFlows.jl: v.0.2.1b 
version: v.0.2.1b
date-released: 2023-08-13

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 2
  • Total pull requests: 12
  • Average time to close issues: 1 day
  • Average time to close pull requests: 1 minute
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 3.5
  • Average comments per pull request: 0.5
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • navidcy (1)
  • JuliaTagBot (1)
Pull Request Authors
  • doraemonho (12)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
juliahub.com: MHDFlows

Three Dimensional Magnetohydrodynamic(MHD) pseudospectral solvers written in julia with FourierFlows.jl

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 9.9%
Average: 27.5%
Stargazers count: 27.9%
Forks count: 33.3%
Dependent packages count: 38.9%
Last synced: 8 months ago

Dependencies

.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite