WhitneyAVHarmonic - edge elements in 2D mesh

Discussion about coding and new developments
Post Reply
spanda
Posts: 6
Joined: 19 Feb 2018, 14:24
Antispam: Yes

WhitneyAVHarmonic - edge elements in 2D mesh

Post by spanda » 19 Feb 2018, 16:04

Hi!

I am trying to develop magnetodynamics solver for 2D case (x-y plane), with assumed current density J and magnetic vector potential A in the x-y plane, ie. with null z-component (Jz=0 and Az=0) :)

In the Elmer ModelsManual document, there is sentence (Bold) from the 15.1. - Introduction paragraph witch concerns me:
"This module may be used to solve a version of the Maxwell equations in the A-V form. The approximation
of the associated vector potential variable ~A is here done by using edge element basis functions, while the
classic Lagrange interpolation is applied to compute the scalar potential V . The use of edge elements LIMITS
the applicability of this solver to 3D problems
. In addition to performing the computations in the time
domain, the analogous version of the equations may also be solved in the frequency domain. Furthermore,
an additional solver may be called to produce nodal approximations of derived fields after the two potentials
have been obtained."
Does this means that edge elements in some sense are not yet fully implemented for 2D elements of 2D mesh?
In EdgeElementInfo function (ElementDescription module) it seems to me that edge basis functions are calculated for 2D elements too.
The only concern is 5191 line in code (I am not entirely sure what traces of 2-D edge elements refers to exactly)
IF (cdim == 2 .AND. dim==1) THEN
CALL Warn('EdgeElementInfo', 'Traces of 2-D edge elements have not been implemented yet')
RETURN
END IF
Is my attempt to develop this solver for any reason unfeasible in Elmer (or maybe redundant)?

Thanks!

Cheers,
Stje

raback
Site Admin
Posts: 3453
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: WhitneyAVHarmonic - edge elements in 2D mesh

Post by raback » 20 Feb 2018, 00:05

Hi

Typically for the 2D problems we are interested in magnetic field B(x,y) and hence the vector potential can only have a z-component. In the edge elements of a 2D these edges are not even present so this makes the use of edge elements impossible and I think the documentation refers to this case.

Now, for your case the symmetry is different and hence the above logic does not hold. To my knowledge there is no 2D solver utilizing edge elements. The warning seems to indicate that even though they would work there may be a limitation in setting the BCs related to it.

I will ask the author of the Hcurl and Hdiv conforming elements to comment.

-Peter

mika
Posts: 68
Joined: 15 Sep 2009, 07:44

Re: WhitneyAVHarmonic - edge elements in 2D mesh

Post by mika » 20 Feb 2018, 12:04

Hi,

Yes, 2-D edge elements over triangles and quadrilaterals have been implemented, so building a solver based on 2-D edge elements should be possible. The warning message

EdgeElementInfo: Traces of 2-D edge elements have not been implemented yet

relates to a situation where one tries to call the function EdgeElementInfo in order to obtain the restriction of a 2-D edge element function over an (1-D) edge that is a constituent part of the mesh. The function EdgeElementInfo doesn't return such restrictions yet. This shouldn't cause any problem if one makes just an assembly loop over 2-D elements and sets Dirichlet constraints. Boundary conditions of Dirichlet type should already work as the function EdgeElementInfo is not called in this connection.

For an example of 2-D solver you may also look at the test case

elmerfem/fem/tests/SecondOrderEdgeElement2D_BCs

and the code EdgeFEInterpolationTest.F90 there.

-- Mika

spanda
Posts: 6
Joined: 19 Feb 2018, 14:24
Antispam: Yes

Re: WhitneyAVHarmonic - edge elements in 2D mesh

Post by spanda » 20 Feb 2018, 14:26

Peter and Mika thank you for your answers. It is good to know this.
Thanks for reference on EdgeFEInterpolationTest.F90, it is really useful.

--Stje

Post Reply