Skip to content

Conversation

@dnpham23
Copy link

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

dnpham23 and others added 30 commits August 14, 2025 13:53
Copy link
Collaborator

@hughcars hughcars left a comment

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!)

dnpham23 and others added 8 commits August 26, 2025 17:07
…julian mesh generators, fix outstanding bugs related to ceed errors when ranks are empty and order=3 accuracy
…yEdgeOrientations to add more robust check for whether all non-edge vertices are on the same side, other some minor changes
…d new mesh to test holes on different metal surfaces that are spatially separate.
@simlapointe
Copy link
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)

…void re-allocation of gridfunction, (2) usee P-multigrid instead of depth 1 hierachy for 2D solve, (3) reuse fec and fes of available for boundary submesh.
@dnpham23
Copy link
Author

dnpham23 commented Oct 1, 2025

@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
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