Mortar - switch between strong and weak

Numerical methods and mathematical models of Elmer
Post Reply
mb5
Posts: 20
Joined: 10 Jun 2017, 18:07
Antispam: Yes

Mortar - switch between strong and weak

Post by mb5 »

Hi,

I'm using the WhitneyAVSolver for a rotating electrical machine. For convergence tests I want to switch between strong and weak level projector. I've tested with the ELMER testcase "RotatingBCMagnetoDynamics".

Code: Select all

Boundary Condition 3
  Target Boundaries(2) = 1 2
  Name = "Mortar Inside"

  Mortar BC =  Integer 2
  Rotational Projector = Logical True
  Level Projector = Logical True
  Level Projector Strong = Logical True
End

Boundary Condition 4
  Name = "Periodic Rotor Master"
  Target Boundaries(1) = 4

  Mortar BC = 5
  Radial Projector = Logical True
  Level Projector = Logical True
  Level Projector Strong = Logical True
End

Boundary Condition 5
  Name = "Periodic Rotor Target"
  Target Boundaries(1) = 3
End

Boundary Condition 6
  Name = "Periodic Stator Master"
  Target Boundaries(1) = 10

  Mortar BC = 7
  Radial Projector = Logical True
  Level Projector = Logical True
  Level Projector Strong = Logical True
End
I've tried to change all key words to

Code: Select all

  Level Projector Strong = Logical False


But when I observe the output of the iterative solver there is no difference between "Level Projector Strong = Logical True" and "Level Projector Strong = Logical False":

Code: Select all

IterSolver: Calling real valued iterative solver
      20 0.4205E-02
      40 0.2775E-03
      60 0.1631E-03
      80 0.6869E-06
     100 0.1104E-09
     101 0.6994E-10
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.11339663E-02  2.0000000     ) :: mgdynamics
Shouldn't this keyword influence the convergence? How can I switch between strong and weak coupling of the mortar?

regards
Martin


edit:
I also tried the other key words from the documentation:

Code: Select all

  Level Projector Plane Edges Strong = Logical False (or True)
  Level Projector Nodes Strong = Logical False (or True)
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Mortar - switch between strong and weak

Post by raback »

Hi

What kind of interface mesh do you have?

For meshes that are extruded and hence consisting of edges in (x,y) plane and along z-axis it is possibe to flatten down the interface mesh plane such that the edges are cartesian. Then using simple geometric justification you can map vertical and horizontal edges separately using strong interpolation. Unfortunately this all fails if the mesh is unstructured, skewed etc.

Perhaps you could analyze the output whether the code detects that the strong projection cannot be used.

If strong projection cannot be used then a weak projector is created that utilizes the mortar FE approach.

-Peter
mb5
Posts: 20
Joined: 10 Jun 2017, 18:07
Antispam: Yes

Re: Mortar - switch between strong and weak

Post by mb5 »

Hi,
thanks for your reply.

I have an extruded mesh (along z-axis). For testing I use the "RotatingBCMagnetoDynamics" testcase from the ELMER sources which also have a extruded mesh. I've done the first simulation (strong) here with

Code: Select all

  Level Projector Strong = Logical True
  Level Projector Plane Edges Strong = Logical True
  Level Projector Nodes Strong = Logical True
and the second one (weak) with this:

Code: Select all

  Level Projector Strong = Logical False
  Level Projector Plane Edges Strong = Logical False
  Level Projector Nodes Strong = Logical False
I've compared both output with a diff-tool but there is no difference between this two simulations (except dates/times).

Is this a bug when using weak/strong mortar with the WhitneyAVSolver?

Regards
Martin

edit: I couldn't find any warnings in the output about weak/strong mortar.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Mortar - switch between strong and weak

Post by raback »

Hi

You were right. The flags were not ideally comprised. They only had an effect of turning a requested weak to strong but not the opposite. The weak can be requested by "Galerkin Projector = True" but as it was not given all projectors were defaulted to be strong.

There is now a branch "ProjectorFlags" in GitHub which has better treatment of the flags.

- if "galerkin projector == true" or mesh is skewed or nonstructured the projectors are defaulted to be weak
- both true and false value change the default (except skewed edges which can never be strong)

I will not merge immediately before running some further tests.

Thanx for diligent testing!

-Peter
mb5
Posts: 20
Joined: 10 Jun 2017, 18:07
Antispam: Yes

Re: Mortar - switch between strong and weak

Post by mb5 »

Hi,

thanks for your reply. I've tested your "ProjectorFlags" branch. For my case I can switch between strong and weak now. :)
Good to know about the key words. The ElmerSolver Manual doesn't know about "galerkin projector" or "level projector strong".

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

Re: Mortar - switch between strong and weak

Post by raback »

Hi

Thanx for testing. The many choices reflect the development history. The choice of projectors affects the linear system and hence we have kept all choices. It is even possible to do hybrid weak/strong projector.

One thing: when we test the continuity over different pairs some of the conditions affect the same dof. Hence it usually is better to say "Mortar BCs Additive = True" to sum together such conditions.

-Peter
Post Reply