Calculating div(grad(u)) and a line integral from pde solution
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Siddharth Sundar
2014 年 10 月 14 日
編集済み: Siddharth Sundar
2014 年 10 月 14 日
-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.
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!