Helmholtz decomposition refinement
-
Cylinder box: we should have a 45° degree angle for the normal vector at the edges of the faces. -
Cylinder box: check the computation of the surface elements: Comment from @nicolastd from a previous review: For the other case, I understand well that the number of points is given by the Gauss circle problem (https://en.wikipedia.org/wiki/Gauss_circle_problem) And then for a spacing in the y-z plane of Dy, there are N = pi R^2/Dy^2 points, which gives a volume element of Dy^2, such that the area is given by volume element times number of points. For the other case, the number of points in the lateral surface is given by approximately N = \[ pi R^2/Dy^2(1-(1-2/3*Dy)^2\] \* L/Dx The area been 2*pi*R*L, I would obtain to first order in Dy something like 4/3*Dx*Dy/R
-
Surface correction helmholtz_decomposition_inc.F90/X(compute_surface_correction_long_field)
andhelmholtz_decomposition_inc.F90/X(compute_surface_correction_trans_field)
:Check the consistency of the code, computing the surface correction does not always lead to an improvement. This could be related to the field being non Coulomb Gauge for small boxes. Shouldn the surface lie inside the region that is affected by the absorbing boundary conditions? So basically in the boundary of the inner stencil
Check parallelization (Check that inclusion of reduction over mesh does not affect the results).
Asking for the surface correction makes the code quite slow. Se should add the support for openmp (like the direct poisson solver)
-
Non Coulomb-Gauge: Add a test for non Coulomb Gauge, implementing the formulas https://www.scirp.org/pdf/jmp_2016053115275279.pdf, page 1033, from equation 30 - We have to ensure that the Vector Potential is in Coulomb Gauge:
- After computing
A
compute its divergence. If it is too far from zero, then output a warning that the potential is not in Coulomb Gauge. We can define "too far from zero" as: \frac{\nabla \cdot A}{|A|}*spacing
- This should be as close to zero as possible
- After computing
- Getting the vector potential directly in Coulomb Gauge: https://en.wikipedia.org/wiki/Gauge_fixing#Coulomb_gauge
- Create a generic routine (as an output of the maxwell system) that computes the formula above for a generic field (or potential). The goal is to output the divergence of B and A
- SOLVED BY !2234 (merged)
- We have to ensure that the Vector Potential is in Coulomb Gauge:
-
Non-zero field at the boundaries: when we take derivates of a field in a small box (such that the field is non-zero at the boundaries), we get spikes. The solution to this is part of a bigger effort, of expanding function in series. See #835