wish17
Mechanical
- May 31, 2020
- 2
Hi everyone,
I am writing my own FEM program solving a 2-D diffusion equation for work. My initial version of the code is working okay; however, the stiffness matrix is very ill-conditioned which I suspect is resulting in inaccurate solution. I suspect I have issues in the weak formulation of the equation as well as in the application of the boundary conditions. Please see the attached derivation.
The weak form of the equation is given in Eq(3). When I evaluate the RHS of (3) by using the boundary conditions at z=1 and z=0, I get that it goes to zero. This gives me the following matrix equation to solve: [K]*{G} = {f}, where {f} is a zero vector, resulting in null solution vector {G}.
Any feedback on my derivation or the proper method of the application of boundary conditions would be much appreciated.
Thanks!
I am writing my own FEM program solving a 2-D diffusion equation for work. My initial version of the code is working okay; however, the stiffness matrix is very ill-conditioned which I suspect is resulting in inaccurate solution. I suspect I have issues in the weak formulation of the equation as well as in the application of the boundary conditions. Please see the attached derivation.
The weak form of the equation is given in Eq(3). When I evaluate the RHS of (3) by using the boundary conditions at z=1 and z=0, I get that it goes to zero. This gives me the following matrix equation to solve: [K]*{G} = {f}, where {f} is a zero vector, resulting in null solution vector {G}.
Any feedback on my derivation or the proper method of the application of boundary conditions would be much appreciated.
Thanks!