Convergence issues faced in strain L2 function

69 views
Skip to first unread message

Pratyusa Kar

unread,
Dec 14, 2024, 7:41:36 PM12/14/24
to deal.II User Group
Hi, 

I have a simple 2D linear elasticity problem, a square domain x(0,1), y(0,1). In that I am fixing x=0 in all directions and applying a displacement of 0.02 along x direction at the edge x=1.

I am facing issues with the strain L2 function convergence in my code. Couple of checks I already did:
- The main solver and field calculation runs fine. Gives meaningful plot of u which shows boundary conditions are fine. 
- In the compute strain projection function, I printed strain_xx_cell_rhs(i) (which prints ux,0 )
- I also printed cell_matrix. 

The code does not converge with the CG solver. Since the problem is simple, I am not sure if I am missing something. Any help will be appreciated. 

I have attached the main.cc and a snapshot of the error.

Thank you. 


Screenshot from 2024-12-14 18-23-13.png
main3.cc

Pratyusa Kar

unread,
Dec 15, 2024, 3:59:42 PM12/15/24
to deal.II User Group
Also I checked with a 4 element mesh and 1 quadrature point. However, I see a noninvertible mass matrix. I do not understand what is missing in the code. 

Thank you. 

Wolfgang Bangerth

unread,
Dec 15, 2024, 6:41:06 PM12/15/24
to dea...@googlegroups.com
On 12/15/24 08:40, Pratyusa Kar wrote:
> Also I checked with a 4 element mesh and 1 quadrature point. However, I see a
> noninvertible mass matrix. I do not understand what is missing in the code.

Pratyusa:
OK, so you already determined that the matrix is not invertible. The question
is why. What happens if you have only one cell? Or you look at the cell matrix
of a single cell?

I don't understand what you mean by "and 1 quadrature point". I checked with
your code, and if I understand correctly, you are using a Q1 element to
project the strain onto, and that you are using a 2x2 Gauss formula. That
seems appropriate.

I looked at your code, and I do not understand why fe_L2 is vector valued. You
are trying to project individual components of the strain onto a finite
element. The individual components are scalars. Why is fe_L2 not also a scalar?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Pratyusa Kar

unread,
Dec 16, 2024, 9:09:57 AM12/16/24
to dea...@googlegroups.com
Hi Dr. Bangerth,

Thank you for the explanation. 

Yes I just did the problem with 1 element and figured out that because I was using vector to output the strain the errors come up. I should have checked this before. 

Now with scalar definition my problem is converging even with multiple elements and proper refined mesh. 

 Thank you. 
Regards,
Pratyusa


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dealii/b4075a0d-7dd5-4253-a695-0d3b104a7d1f%40colostate.edu.
Reply all
Reply to author
Forward
0 new messages