Skip to content

Commit

Permalink
adding field calculation for A and V
Browse files Browse the repository at this point in the history
  • Loading branch information
Patarimi committed Oct 4, 2024
1 parent 184a77a commit 2b3ffb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hades/wrappers/ngsolve_w.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def compute(geom: NGGeom, freq: float = 1e9, *, debug: bool = False):

# Magnetic vector potential
# see https://www.nic.funet.fi/index/elmer/doc/ElmerModelsManual.pdf (p144)
# see https://youtu.be/jDvbnaJqkZY?si=fF6g0qdabd4LvxgT&t=777
# $\Delta \vec{A} + \omega ^2 \mu \epsilon_0 \epsilon_r \vec{A} = -\mu \vec{J}$
# $\Delta V + \omega ^2 \mu \epsilon_0 \epsilon_r V = -\frac \rho \epsilon$
a_vec = ng.BilinearForm(fes, symmetric=True, condense=True)
a_vec += 1 / mu0 * ng.curl(u) * ng.curl(v) * ng.dx
a_vec += 1j * omega * sigma_coeff * u * v * ng.dx
Expand Down

0 comments on commit 2b3ffb7

Please sign in to comment.