Mortar BC with Whitney Solver
Mortar BC with Whitney Solver
Hi,
I am trying to implement a model with mortar BC in 3D with the Whitney solver and I am not sure how to proceed. Figure shows results from a simple test case in which I show a comparison between a 3D and a 2D case. On the right you can see a slice of the 3D model, on the left the 2D results are shown. For each case, I created two separate meshes (top and bottom) and stitch them together with ElmerGrid using the -unite flag. If you look in detail, you can see the mesh interface in the figure. I am not sure what type of projection I should use in the 3D case. Clearly the magnetic field in the 3D case is not properly mapped between both meshes. Please refer to the .sif file for the projection types that I've tried. I've also attached both meshes (cery coarse given size limitations of the forum). Cheers,
Francisco
I am trying to implement a model with mortar BC in 3D with the Whitney solver and I am not sure how to proceed. Figure shows results from a simple test case in which I show a comparison between a 3D and a 2D case. On the right you can see a slice of the 3D model, on the left the 2D results are shown. For each case, I created two separate meshes (top and bottom) and stitch them together with ElmerGrid using the -unite flag. If you look in detail, you can see the mesh interface in the figure. I am not sure what type of projection I should use in the 3D case. Clearly the magnetic field in the 3D case is not properly mapped between both meshes. Please refer to the .sif file for the projection types that I've tried. I've also attached both meshes (cery coarse given size limitations of the forum). Cheers,
Francisco
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Mortar BC with Whitney Solver
For the 3D I turned of the Edge Basis, did not test to see if this mattered
However
! Edge Basis = Logical True
Apply Mortar BCs = True
when I added Apply Mortar BCs = True to Solver 2 I got results across the mortar
Apparently you have to do this to both solvers
I used the normal projector
However
! Edge Basis = Logical True
Apply Mortar BCs = True
when I added Apply Mortar BCs = True to Solver 2 I got results across the mortar
Apparently you have to do this to both solvers
I used the normal projector
Re: Mortar BC with Whitney Solver
Thanks for taking a look at the case. I did as suggested (deactivate Edge basis, add Apply Mortar BCs to solver 2, and use normal project) but I am still getting a similar response. I am using a relatively new commit (Nov 11) for this test. I haven't tried with previous versions though.
Cheers,
Cheers,
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Mortar BC with Whitney Solver
Can you post your updated SIF file?
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Mortar BC with Whitney Solver
When it worked yesterday it was with the variable magnetic field strength, not magnetic field strength e. Yesterday I did not check magnetic field strength e. In your new sif you only get magnetic field strength e. The first is nodal data and the second is elemental data. Not sure why it works with nodal data and not elemental data.
Re: Mortar BC with Whitney Solver
Maybe the nodal data on a coarse mesh looks like it crossed the boundary, but really didn't?
Rich.
Rich.
Re: Mortar BC with Whitney Solver
Yes, I think that the post processing step allows for the nodal values to leak into the bottom air body. Here is another way to see the results (plotting Magnetic flux Density e using the Discontinuous Bodies flag). You can see that the bottom surface of body 1 (top, air, right plot) is several order of magnitude larger than the bottom surface of body 2 (bottom, air, left figure). These two should be the same if the mortar bc were working, so I suspect something is not quite working well. Hopefully it is only related to the way I set up the case and I just need to add some flags to the sif file.
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Mortar BC with Whitney Solver
Hi
We had a look at the case as it was looking bad for the eye.
There is a challenge in convergence. This comes from the coarse mesh and mortar BCs. You could try switching the slave and master pieces for the mortar BC and using the following linear system settings:
This uses ILU5 for the rows associated to the mortar constraint but not for the edge degree of freedoms. It is a little expensive but here we can afford it. I woud think that if master and slave would be better compatible the convergence would be better and of course there would be no need to switch the BCs.
Even after this the continuity looks bad. But this is just a artefact of the very coarse mesh and of the fact the continuity over the interface is not enforced. The "Discontinuous Bodies" only does it within materials and omits the mortar BCs. There are just two element layers separating the magnet and the jump so you cannot expect too smooth solution.
-Peter
We had a look at the case as it was looking bad for the eye.
There is a challenge in convergence. This comes from the coarse mesh and mortar BCs. You could try switching the slave and master pieces for the mortar BC and using the following linear system settings:
Code: Select all
Linear System Iterative Method = GCR
Linear System Solver = Iterative
Linear System GCR Restart = 1000
Linear System Preconditioning = ilu5
Linear System Max Iterations = 1000
Edge Basis = True
Even after this the continuity looks bad. But this is just a artefact of the very coarse mesh and of the fact the continuity over the interface is not enforced. The "Discontinuous Bodies" only does it within materials and omits the mortar BCs. There are just two element layers separating the magnet and the jump so you cannot expect too smooth solution.
-Peter
- Attachments
-
- Jump2.PNG
- Magnetic Flux Density on y-axis
- (50.31 KiB) Not downloaded yet
Re: Mortar BC with Whitney Solver
Hi Peter,
Thanks for checking the case. Things certainly improved with your settings, even with a coarse mesh (see figure). Left: tet mesh with quad faces on the boundaries, right: hex mesh. Continuity is greatly improved, I suspect things will get better with a denser mesh, I might try that over the weekend.
I have a much complex case in mind so I might as well try that. However, I set up a quick case with a denser mesh and I had this error with ilu5 preconditioner. Any tips as to how to avoid this error? iluX with X lower than 5 possibly?
Cheers,
Thanks for checking the case. Things certainly improved with your settings, even with a coarse mesh (see figure). Left: tet mesh with quad faces on the boundaries, right: hex mesh. Continuity is greatly improved, I suspect things will get better with a denser mesh, I might try that over the weekend.
I have a much complex case in mind so I might as well try that. However, I set up a quick case with a denser mesh and I had this error with ilu5 preconditioner. Any tips as to how to avoid this error? iluX with X lower than 5 possibly?
Code: Select all
ERROR:: CRS_IncompleteLU: Number of nonzeros larger than HUGE(Integer)
ERROR:: CRS_IncompleteLU: Try some cheaper preconditioner!