Calculating div(grad(u)) and a line integral from pde solution
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Siddharth Sundar
le 14 Oct 2014
Modifié(e) : Siddharth Sundar
le 14 Oct 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.
Réponses (0)
Voir également
Catégories
En savoir plus sur Numerical Integration and Differentiation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!