ExCALIBUR-NEPTUNE / NESO

MIT License
4 stars 4 forks source link

Implement 2D Hasegawa-Wakatani in 3D into NESO #177

Closed jwscook closed 1 year ago

jwscook commented 1 year ago

This is no longer dependent on "Hermes3 in 2D in NESO". Plan is to get Dave Moxey contributing directly to NESO.

jwscook commented 1 year ago

Ben Dudson has given us details of the 3D drift-reduced fluid equations as per https://github.com/bendudson/hermes-3/tree/master/examples/linear. We have the equations! This can go straight into NESO and not first a standalone Nektar mini-app.

jwscook commented 1 year ago

PR lives in https://github.com/ExCALIBUR-NEPTUNE/NESO/pull/181 Current issue is solving for $\phi$: not likely to be unit problem; could be boundary condition.

jwscook commented 1 year ago

It's relatively stable but not giving sensible answers. OP judges that it's now stable enough to add particle functionality to it.

jwscook commented 1 year ago

Ed & Owen to go through nondimensionalisation tomorrow.

jwscook commented 1 year ago

Problems with the $\phi$ solve reported. Different solvers are available: petsc, mumps. These will need extra config efforts in build. Also direct solves e.g. https://doc.nektar.info/doxygen/4.0.0/page_coupled_solver.html and use of preconditioner Diagonal etc.

jwscook commented 1 year ago

Focusing on simplified Helmsolve ${\vec{ \vec D}} \nabla_\bot \phi = \omega$ which now works with 2 Dirichlet boundary conditions. This is because the "grounded" dof with all Neumann BCs is wrong post-solve, but this "grounding" functionality can be turned off. @will-saunders-ukaea knows how cos this is done in the electrostatic solve.

will-saunders-ukaea commented 1 year ago

https://github.com/ExCALIBUR-NEPTUNE/NESO/blob/83d9c49e54c4026379ac1739d934489f59aa8639/solvers/Electrostatic2D3V/EquationSystems/PoissonPIC.cpp#L46C42-L46C50

False disables the checks (i.e. the pinning) true enables (and it's up to the user to check the pde is well posed?).

jwscook commented 1 year ago

In comms with Mike Kryjak of Hermes3 fame.

jwscook commented 1 year ago

2D HW equations work in 3D (no parallel dynamics) for any order (tested up to 6 modes). Let's figure out what neutral physics is sensible and use 2DHW in 3D w/ particles as the near term milestone.

jwscook commented 1 year ago
  1. Get the HW system working properly in 3D with the perp Laplacian & parallel dynamics (i.e. the kappa coeff becomes a derivative along the field lines)
  2. Get the LAPD system going having completed (1).
jwscook commented 1 year ago

This is now a tidy up PR https://github.com/ExCALIBUR-NEPTUNE/NESO/pull/209 Look into problem with energy conservation wrt initial conditions but move on at end of week. Will reach out to Sanket.

oparry-ukaea commented 1 year ago

Fixed by PR #209