Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Why Comsol solution is mesh dependent?

Please login with a confirmed email address before reporting spam

Hi,

I tried to solve the following simple 1D problem by COMSOL.

du/dx=-u

u(x=0)=1
u(x=1)=0

1D Comsol PDE gives a solution which is mesh dependent! If you refine the mesh, you get a different solution in 1D domain.

By the way. this is a simple 1st order ODE has general solution, u=A*exp(-u). It only has one arbitrary constant. How does Comsol deal with two point BCs in this particular case?

Thanks for your help.


Guodong

4 Replies Last Post 9 avr. 2010, 19:05 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 avr. 2010, 22:17 UTC−4
I haven't tried working in 1D yet, but aren't you seeing a basic property of the finite element method here?

In 2D graphing, for instance, if you try to fit a higher order curve solution with a finite number of lower order elements, then the solution will change with the number of elements. It's like plotting a complex curve using short straight line segments: the more segments, the better fit.

If you had an exponential order 1D element, it would solve your problem with any arbitrary number of elements.

I took a quick look at the elements available and I see linear, quadratic, .... up to quintic. No exponential there. I think you're stuck with mesh dependent solutions.

Maybe I'm missing something in your question, but I learned a little from thinking about it anyway.

-Jeff
I haven't tried working in 1D yet, but aren't you seeing a basic property of the finite element method here? In 2D graphing, for instance, if you try to fit a higher order curve solution with a finite number of lower order elements, then the solution will change with the number of elements. It's like plotting a complex curve using short straight line segments: the more segments, the better fit. If you had an exponential order 1D element, it would solve your problem with any arbitrary number of elements. I took a quick look at the elements available and I see linear, quadratic, .... up to quintic. No exponential there. I think you're stuck with mesh dependent solutions. Maybe I'm missing something in your question, but I learned a little from thinking about it anyway. -Jeff

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 avr. 2010, 03:31 UTC−4
the problem you describe dont have a solution [ "not well posed" ] but comsol dont know that this is why he try and provide "garbage".. this is the old wisdom
Garbage in -> Garbage out :-)
JF
the problem you describe dont have a solution [ "not well posed" ] but comsol dont know that this is why he try and provide "garbage".. this is the old wisdom Garbage in -> Garbage out :-) JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 avr. 2010, 11:54 UTC−4
ditto -
your BC u(x=1)=0 cannot be satisfied with the DE. Another way to look at it is this- You have a first order DE but two BC's thus the problem is overspecified and not well posed.
ditto - your BC u(x=1)=0 cannot be satisfied with the DE. Another way to look at it is this- You have a first order DE but two BC's thus the problem is overspecified and not well posed.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 avr. 2010, 19:05 UTC−4
just wanted to point out that if the second boundary condition satisfied the solution...

i.e. analytic solution was Ae^-x and based on boundary 0, A was equal to unity...

then inserting u(x=0)=1 and u(x=1)=e^(-x)

in this manner your second boundary condition satifies the DE.

just wanted to point out that if the second boundary condition satisfied the solution... i.e. analytic solution was Ae^-x and based on boundary 0, A was equal to unity... then inserting u(x=0)=1 and u(x=1)=e^(-x) in this manner your second boundary condition satifies the DE.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.