1
$\begingroup$

I have created a program to solve 2D, time-dependent PDEs with the finite element method and get reasonable looking results for the 2D acoustic wave equation. Now I would like to go further and solve a PDE with a known exact/analytic solution to compare against. However, I have a lot of trouble finding a suitable equation. It seems that there are no 2D, time-dependent equations with an analytic solution that does not involve infinite sums or the like. I thought about taking a 1D equation and extend it to two dimensions by just solving it on a 2D domain without changing anything, in effect replicating the equation along the y-axis. However, boundary conditions seem to mess things up and these 1D equations work on infinite domains, i.e. the whole real axis.

Is there such an equation for me to use? Is there a different established way of testing the correctness of a PDE solver implementation?

$\endgroup$
1
  • 8
    $\begingroup$ For a simple domain (square, circle) there are tons of analytic solutions. You can produce one easily: just make up some function f(x,y,t) and plug it in your PDE, so you can find what source term on the RHS is needed to make this f(x,y,t) satisfy the equation. That's the idea, you can look up the details and examples if you search for "manufactured solutions". $\endgroup$ Nov 23, 2020 at 23:53

1 Answer 1

5
$\begingroup$

As Maxim's comment points out, you ought to be able to create any solution you like, crank it through the original, continuous PDE, generate a forcing function, boundary conditions (time-dependent), and initial condition, plug those into your program, run it, and compare the answer you get to the function you started with. This is known as the Method of Manufactured Solutions, and is a very effective way of establishing the quality of the solutions of your program. It's also a great way to do mesh and time-step refinement studies that may fit your or a reviewer's needs.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.