Skip to content

Functionalities for flux trapping analysis#461

Open
dnpham23 wants to merge 11 commits into
awslabs:mainfrom
dnpham23:main
Open

Functionalities for flux trapping analysis#461
dnpham23 wants to merge 11 commits into
awslabs:mainfrom
dnpham23:main

Conversation

@dnpham23

Copy link
Copy Markdown

This PR adds methods to enable flux trapping analysis in magnetostatic simulations. Key additions are:

  • GetFluxLoopExcitationVector in curlcurloperator.cpp to compute the RHS for flux excitation
  • 2D solver for the surface curl problem in surfacecurlsolver.cpp, along with postprocessing function for verification
  • Modified magnetostaticsolver.cpp to enable 3D solve using flux BC
  • Update PostprocessTerminals to enable inductance calculations in flux-only and mix current-flux setups.
  • Supporting methods in geodata.cpp to find loop boundary edges on submesh and their orientations
  • Update configfile.cpp to look for flux loop terminals for magnetostatics
  • Example config files and meshes
  • MFEM patch

@hughcars hughcars left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't managed to review the MFEM portion directly yet, but this should be a lot to be going on with. At a high level,

  1. check running on more than 2 ranks, I was getting errors for 3 or more from geom factors not being initialized etc.
  2. run with order >= 3, I was getting errors where the computed flux was not matching the target flux, not sure what is causing this directly.

On the interface, broadly think more about how to a) avoid any 3D object allocation within the surface pde solving function and b) pass such objects in as buffers. There are already existing A sized gridfunctions, and even a true sized A buffer that can be used to compute the RHS (The next solution vector has already been allocated, you can use that!)

Comment thread cmake/ExternalMFEM.cmake Outdated
Comment thread docs/src/config/boundaries.md Outdated
Comment thread docs/src/config/boundaries.md Outdated
Comment thread docs/src/config/boundaries.md Outdated
Comment thread docs/src/guide/boundaries.md Outdated
Comment thread palace/drivers/surfacecurlsolver.cpp Outdated
Comment thread palace/drivers/surfacecurlsolver.cpp Outdated
Comment thread palace/drivers/surfacecurlsolver.cpp Outdated
Comment thread palace/models/curlcurloperator.cpp Outdated
Comment thread palace/drivers/surfacecurlsolver.cpp
Comment thread examples/double_circular_hole/mesh/two_square_sheets.jl Outdated
@simlapointe

Copy link
Copy Markdown
Contributor

In light of the recently merged #459, let's not forget to save all .msh files in binary format (just add gmsh.option.setNumber("Mesh.Binary", 1) to the mesh-generating julia scripts and regenerate the meshes)

@dnpham23

dnpham23 commented Oct 1, 2025

Copy link
Copy Markdown
Author

@hughcars All your requested changes are addressed. Sorry for the delay. Please have a look and feel free to take over if you feel it is more convenient and efficient that way.

@dnpham23 dnpham23 marked this pull request as ready for review October 1, 2025 21:12
@dnpham23 dnpham23 force-pushed the main branch 2 times, most recently from be9408f to 0d0272c Compare June 24, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants