GithubHelp home page GithubHelp logo

jaem-seo / vae_mhd_solver Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 7.48 MB

Variational Autoencoder (VAE)-like neural network to solve ideal MHD equilibrium in a tokamak

License: MIT License

Python 100.00%
fusion mhd neural-network physics plasma tokamak

vae_mhd_solver's Introduction

VAE-like MHD equilibrium solver

  • Magneto-Hydro-Dynamics (MHD) is the physics of electromagnetically interacting fluids.
  • Solving the MHD force balance equation is the first step for analyzing fusion plasmas in a tokamak.
  • This repository describes a variational auto-encoder (VAE)-like neural network to solve ideal MHD equilibrium.

Installation

  • You can install by
$ git clone https://github.com/jaem-seo/vae_mhd_solver.git
$ cd vae_mhd_solver

Try it out

$ python predict.py
  • This solves 0D-2D quantities of the MHD equilibrium, from 1D input profiles (pressure and current density) and the boundary coordinates.
  • The below are sample predictions for 2D magnetic flux structure, ψ and φ.

Description

  • The input profiles (pressure, current density, and plasma boundary) are

  • Then, the 2D outputs (ground truth and prediction) are

  • Other 0D and 1D physical quantities are also calculated.

Note

  • The current version has a limitation in that the reconstructed outputs are slightly jagged.
  • The model is similar to VAE, but the input and output are only physically consistent with each other, not the same structure.
  • A simple physical constraint has been added to the loss calculation.
  • The physical quantities for input/outputs are normalized according to CHEASE convention.

References

  • Kingma, Diederik P., and Max Welling. "Auto-encoding variational bayes." arXiv preprint arXiv:1312.6114 (2013).
  • Miller, R. L., et al. "Noncircular, finite aspect ratio, local equilibrium model." Physics of Plasmas 5.4 (1998): 973-978.
  • Lütjens, Hinrich, Anders Bondeson, and Olivier Sauter. "The CHEASE code for toroidal MHD equilibria." Computer physics communications 97.3 (1996): 219-260.

TODO

  • Physics (Grad-Shafranov equation)-informed loss applied
  • Additional encoder for general boundary coordinates

vae_mhd_solver's People

Contributors

jaem-seo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rahulsundar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.