Anti Periodic Boundary Conditions with Quadratic Elements Problem

Numerical methods and mathematical models of Elmer
Post Reply
pmxppl
Posts: 15
Joined: 29 Jun 2021, 13:41
Antispam: Yes

Anti Periodic Boundary Conditions with Quadratic Elements Problem

Post by pmxppl »

Hi

I am doing a MagnetoDynamics2D analysis and am using Anti Periodic boundary conditions at the edges using Mortar BCs with an Anti Radial Projector

Boundary Condition 7
Name = Boundary_1
Anti Radial Projector = Logical True
Galerkin Projector = Logical True
Mortar BC = Integer 8
Mortar BC Static = Logical True
End

Boundary Condition 8
Name = Boundary_2
End

Everything is working well when I use linear elements and I can see that the anti periodic condition for the magnetic potential is being correctly enforced.

The problem is when I use quadratic elements. The analysis solves fine but when I check whether the boundary condition is enforced I can see that it is on the corner nodes but is not on the mid side nodes of the quadratic element edges on the boundary. This then leads to some ugly behaviour in terms of flux densities. My mesh is conforming, such that the nodes at each edge are at the same radii so I can check one side of the BC with the other easily. I have also checked that all the nodes (i.e. corner and midside nodes) are included in the boundary specification.

Should the BC be being enforced on the midside nodes? Is there something I am doing wrong in the setup? Is there anything else I can try to get it to work? Do you have a test example which you can share showing this working?

Thanks and Best Regards,

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

Re: Anti Periodic Boundary Conditions with Quadratic Elements Problem

Post by raback »

Hi

Try with linear background mesh and quadratic elements with defining "Element = p:2". There is a test case related to this "RotatingBCPoisson2Dp2". The standard nodal elements may have some numerical issues.

-Peter
pmxppl
Posts: 15
Joined: 29 Jun 2021, 13:41
Antispam: Yes

Re: Anti Periodic Boundary Conditions with Quadratic Elements Problem

Post by pmxppl »

Hi Peter,

Thanks for your reply. I have tried as you suggested and the analysis runs fine and looks reasonable. I am writing the field results to .vtu file and then post processing. I notice that when using p elements of degree 2 the results file is the same size as when using linear elements and is only giving results at the nodes. How can I access the additional degrees of freedom so that I can post process and e.g. solve integrals over the elements or over contours?

Thanks and Best Regards,

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

Re: Anti Periodic Boundary Conditions with Quadratic Elements Problem

Post by raback »

Hi Paul,

SaveLine with given divisions can do this, for example. Unfortunately the VTU output currently does not. Basically this could be done but the solution in the linear nodes would still be exactly the same.

-Peter
Post Reply