# FEM solution becoming wider as number of nodes increase

My FEM scheme uses a 4-node quadrilateral element with bilinear shape functions. The simple problem I'm solving is. $$\nabla ^2 f = 5$$ But as I increase the number of nodes, the plot of the solution becomes flatter. I'm stumped as to why this might happen.Two plots below show how when I change the size of the mesh from a 7x7 to a approx. 30x30, the plot becomes much more spread out. Also the boundary condition is that $$f = 0$$ on the boundary

FIXED, had some typos in my code

• The result is obviously wrong. I think there is a mistake in your code but it's impossible to say what the mistake is without seeing the code. – knl Sep 22 at 4:52
• The fact that the solution changes significantly when you refine your grid hints in the direction, that some h-dependent scaling might have been forgotten. Can you give us a bit more information? What code are you using, do you have a minimal working example? Do you have a 1D example that you might check first? – MPIchael Sep 24 at 13:42