← Back to team overview

dolfin team mailing list archive

[Question #109445]: Can't correctly solve the PDE with a (du/dx)^2 term

 

New question #109445 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/109445

As the question I posted a few days ago,  I got a trouble to solve  the PDE with  a (du/dx)^2 term correctly. 

e.g. Let's choose u=sin(3.0*pi*x) as the exact solution. (I actually modified the 1D poisson demo for this example)

To solve 

u^2*(du/dx)^2-*d2u/dx2=f,  on domain 0<x<1

we adjust f=9.0*pi*sin(3.0*pi*x)^2*cos(3.0*pi*x)^2+9.0*pi*pi*sin(3.0*pi*x) according to the exact solution. And obviously, u=0 at both x=0 and x=1.

The code to solve this problem is simple, I will attach it later.

But the result is not shown as the exact solution sin(3.0*pi*x). It looks similiar, but the amplitude is distorted. 

If  change the (du/dx)^2 term into du/dx, and follow the procedures above, I can get the same result as the exact solution sin(3.0*pi*x).

This is very strange to me. I think the FE processes on (du/dx)^2 may have some problem, or just I made a mistake somewhere in my code. I also post my complete code as below.

Any help would be appreicated.





-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.