Welcome to maelstrom’s documentation!¶
Relevant publications are [KP03], [DAG89], [Chu08], [DDKS12].
maelstrom.heat
¶
maelstrom.maxwell
¶
The equation system defined here are largely based on [CCG+97], with the addition of the material flux \(u\) of the liquid.
Given an electric field \(E\), a magnetic field \(B\), and a material flux \(u\), the current density \(J\) in the material is given by
where \(\sigma\) is the electrical conductivity.
This leads to
Assuming that \(B\) is given by the potential \(\phi\), \(B = \curl(\phi e_{\theta})\), we end up with
(Note that \(\curl\) is taken in cylindrial coordinates.)
Following Chaboudez, this eventually leads to the equation system
The differential operators are interpreted like 2D for \(r\) and \(z\).
For the weak formulation, the volume elements \(2\pi r\,\text{d}x\) are used. This corresponds to the full 3D rotational formulation and also makes sure that at least the diffusive term is nice and symmetric. Additionally, it avoids dividing by \(r\) in the convections and the right hand side.
Here with no convection in direction \(\theta\):
-
maelstrom.maxwell.
build_system
(V, dx, Mu, Sigma, omega, f_list, f_degree, convections, bcs)¶ Build FEM system for
\[\div\left(\frac{1}{\mu r} \nabla(r\phi)\right) + \left\langle u, \frac{1}{r} \nabla(r\phi)\right\rangle + \text{i} \sigma \omega \phi = f\]by multiplying with \(2\pi r v\) and integrating over the domain and the preconditioner given by [KL12].
-
maelstrom.maxwell.
compute_joule
(Phi, voltages, omega, Sigma, Mu, subdomain_indices)¶ See, e.g., equation (2.17) in [CCG+97].
In a time-harmonic approximation with
..math:
\begin{align} A &= \Re(a exp(\text{i} \omega t)),\\ B &= \Re(b exp(\text{i} \omega t)), \end{align}
the time-average of \(A\cdot B\) over one period is
..math:
\overline{A\cdot B} = \frac{1}{2} \Re(a \cdot b^*)
see http://www.ece.rutgers.edu/~orfanidi/ewa/ch01.pdf. In particular,
..math:
\overline{A\cdot A} = \frac{1}{2} \|a\|^2.
Consequently, we can compute the average source term over one period as
..math:
s = \frac{1}{2} \|j\|^2 / \sigma = \frac{1}{2} \|E\|^2 \sigma.
(Not using \(j\) avoids explicitly dividing by \(\sigma\) which is 0 at nonconductors.)
-
maelstrom.maxwell.
compute_lorentz
(Phi, omega, sigma)¶ In a time-harmonic discretization with quantities
\[\begin{split}\begin{align} A &= \Re(a \exp(\text{i} \omega t)),\\ B &= \Re(b \exp(\text{i} \omega t)), \end{align}\end{split}\]the time-average of \(A\times B\) over one period is
\[\overline{A\times B} = \frac{1}{2} \Re(a \times b^*),\]see http://www.ece.rutgers.edu/~orfanidi/ewa/ch01.pdf. Since the Lorentz force generated by the current \(J\) in the magnetic field \(B\) is
\[F_L = J \times B,\]its time average is
\[\overline{F_L} = \frac{1}{2} \Re(j \times b^*).\]With
\[\begin{split}J &= \Re(\exp(\text{i} \omega t) j e_{\theta}),\\ B &= \Re\left( \exp(i \omega t) \left( -\frac{\text{d}\phi}{\text{d}z} e_r + \frac{1}{r} \frac{\text{d}(r\phi)}{\text{d}r} e_z \right) \right),\end{split}\]we have
\[\begin{split}\overline{F_L} &= \frac{1}{2} \Re\left(j \frac{d\phi^*}{dz} e_z + \frac{j}{r} \frac{d(r\phi^*)}{dr} e_r\right)\\ &= \frac{1}{2} \Re\left(\frac{j}{r} \nabla(r\phi^*)\right)\\\end{split}\]In the workpiece, we can assume
\[j = -\text{i} \sigma \omega \phi\]which gives
\[\begin{split}\begin{align*} \overline{F_L} &= \frac{\sigma\omega}{2r} \Im\left( \phi \nabla(r \phi^*) \right)\\ &= \frac{\sigma\omega}{2r} \left( \Im(\phi) \nabla(r \Re(\phi)) -\Re(\phi) \nabla(r \Im(\phi)) \right) \end{align*}\end{split}\]
-
maelstrom.maxwell.
compute_potential
(coils, V, dx, mu, sigma, omega, convections, verbose=True, io_submesh=None)¶ Compute the magnetic potential \(\Phi\) with \(A = \exp(\text{i} \omega t) \Phi e_{\theta}\) for a number of coils.
-
maelstrom.maxwell.
get_voltage_current_matrix
(phi, physical_indices, dx, Sigma, omega, v_ref)¶ Compute the matrix that relates the voltages with the currents in the coil rings. (The relationship is indeed linear.)
This is according to [KP02].
The entry \(J_{k,l}\) in the resulting matrix is the contribution of the potential generated by coil \(l\) to the current in coil \(k\).
-
maelstrom.maxwell.
prescribe_voltage
(A, b, coil_rings, voltage, v_ref, J)¶ Get the voltage coefficients \(c_l\) with the total voltage prescribed.
-
maelstrom.maxwell.
solve
(V, dx, Mu, Sigma, omega, f_list, convections, f_degree=None, bcs=None, tol=1e-12, verbose=False)¶ Solve the complex-valued time-harmonic Maxwell system in 2D cylindrical coordinates
\[\div\left(\frac{1}{\mu r} \nabla(r\phi)\right) + \left\langle u, \frac{1}{r} \nabla(r\phi)\right\rangle + i \sigma \omega \phi = f\]with finite elements.
Parameters: - V – function space for potentials
- dx – measure
- Mu (dictionary) – mu per subdomain
- Sigma (dictionary) – sigma per subdomain
- omega (float) – current frequency
- f_list – list of right-hand sides for each of which a solution will be computed
- convections (dictionary) – convection, defined per subdomain
- bcs – Dirichlet boundary conditions
- tol (float) – relative solver tolerance
- verbose (boolean) – solver verbosity
Return type: list of functions
maelstrom.stabilization
¶
Stabilization techniques for PDEs with dominating convection. The classical article about SUPG is [BH82]; for an overview of methods, see [JK07], [JK08], and [BGS04].
-
maelstrom.stabilization.
supg
(mesh, convection, diffusion, element_degree)¶ For each cell, this function return the expression
..math:
\begin{align*} \tau &= \frac{h}{2\|b\|} \left(\frac{1}{\tanh Pe} - \frac{1}{Pe}\right)\\ & = \frac{h^2}{4\varepsilon} \frac{1}{Pe} \left(\frac{1}{\tanh Pe} - \frac{1}{Pe}\right) \end{align*}
with the element diameter in the direction of the convection vector \(b\) and the Péclet number \(Pe = \frac{\|b\| h}{2\varepsilon}\); see (3) in [JK08]. Note that \(\tau\) does not have a singularity for \(\|b\|=0\) since
..math:
\frac{1}{\tanh Pe} - \frac{1}{Pe} = \frac{1}{3}Pe + O(Pe^3)
for \(Pe\approx 0\). This Taylor expansion (with a few more terms) is made use of in the code.
maelstrom.stokes
¶
Numerical solution schemes for the Stokes equation in cylindrical coordinates.
-
maelstrom.stokes.
F
(u, p, v, q, f, r, mu, my_dx)¶
-
maelstrom.stokes.
stokes_solve
(up_out, mu, u_bcs, p_bcs, f, my_dx=<Mock name='mock.dx' id='139668395699504'>)¶
References¶
[BGS04] | Pavel B. Bochev, Max D. Gunzburger, and John N. Shadid. Stability of the supg finite element method for transient advection–diffusion problems. Computer Methods in Applied Mechanics and Engineering, 193(23-26):2301–2323, June 2004. URL: http://dx.doi.org/10.1016/j.cma.2004.01.026, doi:10.1016/j.cma.2004.01.026. |
[BH82] | Alexander N. Brooks and Thomas J.R. Hughes. Streamline upwind/petrov-galerkin formulations for convection dominated flows with particular emphasis on the incompressible navier-stokes equations. Computer Methods in Applied Mechanics and Engineering, 32(1-3):199–259, September 1982. URL: http://dx.doi.org/10.1016/0045-7825(82)90071-8, doi:10.1016/0045-7825(82)90071-8. |
[CCG+97] | C. Chaboudez, S. Clain, R. Glardon, D. Mari, J. Rappaz, and M. Swierkosz. Numerical modeling in induction heating for axisymmetric geometries. IEEE Transactions on Magnetics, 33(1):739–745, 1997. URL: http://dx.doi.org/10.1109/20.560107, doi:10.1109/20.560107. |
[Chu08] | Paul K. Chu. Semiconductor Materials & Physics. City University of Hong Kong, 2008. URL: http://personal.cityu.edu.hk/~appkchu/AP4120/2.PDF. |
[DAG89] | J.J. Derby, L.J. Atherton, and P.M. Gresho. An integrated process model for the growth of oxide crystals by the czochralski method. Journal of Crystal Growth, 97(3-4):792–826, October 1989. URL: http://dx.doi.org/10.1016/0022-0248(89)90583-6, doi:10.1016/0022-0248(89)90583-6. |
[DDKS12] | W. Dreyer, P. -É. Druet, O. Klein, and J. Sprekels. Mathematical modeling of czochralski type growth processes for semiconductor bulk single crystals. Milan Journal of Mathematics, 80(2):311–332, July 2012. URL: http://dx.doi.org/10.1007/s00032-012-0184-9, doi:10.1007/s00032-012-0184-9. |
[GRS07] | Christian Grossmann, Hans-Görg Roos, and Martin Stynes. Numerical Treatment of Partial Differential Equations. Springer Berlin Heidelberg, 2007. URL: http://dx.doi.org/10.1007/978-3-540-71584-9, doi:10.1007/978-3-540-71584-9. |
[GMS06] | J.L. Guermond, P. Minev, and Jie Shen. An overview of projection methods for incompressible flows. Computer Methods in Applied Mechanics and Engineering, 195(44-47):6011–6045, September 2006. URL: http://dx.doi.org/10.1016/j.cma.2005.10.010, doi:10.1016/j.cma.2005.10.010. |
[Joh16] | Volker John. Finite Element Methods for Incompressible Flow Problems. Springer International Publishing, 2016. URL: http://dx.doi.org/10.1007/978-3-319-45750-5, doi:10.1007/978-3-319-45750-5. |
[JK07] | Volker John and Petr Knobloch. On spurious oscillations at layers diminishing (sold) methods for convection–diffusion equations: part i – a review. Computer Methods in Applied Mechanics and Engineering, 196(17-20):2197–2215, March 2007. URL: http://dx.doi.org/10.1016/j.cma.2006.11.013, doi:10.1016/j.cma.2006.11.013. |
[JK08] | Volker John and Petr Knobloch. On spurious oscillations at layers diminishing (sold) methods for convection–diffusion equations: part ii – analysis for and finite elements. Computer Methods in Applied Mechanics and Engineering, 197(21-24):1997–2014, April 2008. URL: http://dx.doi.org/10.1016/j.cma.2007.12.019, doi:10.1016/j.cma.2007.12.019. |
[KP02] | O. Klein and P. Philip. Correct voltage distribution for axisymmetric sinusoidal modeling of induction heating with prescribed current, voltage, or power. IEEE Transactions on Magnetics, 38(3):1519–1523, May 2002. URL: http://dx.doi.org/10.1109/20.999125, doi:10.1109/20.999125. |
[KP03] | Olaf Klein and Peter Philip. Transient numerical investigation of induction heating during sublimation growth of silicon carbide single crystals. Journal of Crystal Growth, 247(1-2):219–235, January 2003. URL: http://dx.doi.org/10.1016/s0022-0248(02)01903-6, doi:10.1016/s0022-0248(02)01903-6. |
[KL12] | Michael Kolmbauer and Ulrich Langer. A robust preconditioned minres solver for distributed time-periodic eddy current optimal control problems. SIAM Journal on Scientific Computing, 34(6):B785–B809, January 2012. URL: http://dx.doi.org/10.1137/110842533, doi:10.1137/110842533. |
[LMW+12] | Anders Logg, Kent-Andre Mardal, Garth N. Wells, and others. Automated Solution of Differential Equations by the Finite Element Method. Springer, 2012. ISBN 978-3-642-23098-1. doi:10.1007/978-3-642-23099-8. |
[vdV03] | Henk A. van der Vorst. Iterative Krylov Methods for Large Linear Systems. Cambridge University Press, 2003. URL: http://dx.doi.org/10.1017/cbo9780511615115, doi:10.1017/cbo9780511615115. |