Calculating div(grad(u)) and a line integral from pde solution
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear experts,
I imported a solution of -div(grad(u))=f(u) from the pde app. I would like to do 2 things:
1. re-calculate d^2u/dx^2+d^2u/dy^2 for checking the solution
2. calculate an integral of form int g(u,du/dx,du/dy) dy along a line where x=0.
For both of these tasks, the (brute force) solutions I came up with utilizes pdegrad, tri2grid and pdeprtni a lot.
For 1. I calculate the derivatives with pdegrad, map solution to nodes with pdeprtni and pdegrad again.
For 2. I calculate derivatives with pdegrad, map to square mesh with tri2grid and integrate with trapz.
Unfortunately, all this estimation introduces error. Can anyone suggest a more straightforward & accurate way of doing this?
Thanks!
Can anyone suggest a more strayou suggest
2 Kommentare
Siddharth Sundar
am 14 Okt. 2014
Bearbeitet: Siddharth Sundar
am 14 Okt. 2014
-Is there a reason you are comparing the two numerical solutions?
-What is the magnitude of error introduced at every step of the calculation?
-Did you try refining the mesh further before exporting the solution to MATLAB? That might help.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!