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.

How to solve two coupling first-order differential equations with four boundary conditions by Comsol?

Please login with a confirmed email address before reporting spam

hello, everyone:

I have learned the help of COMSOL for several days. However, a questions is not understund. I am wonder that weather the question ( below) can be soved by PDE or ODE or other method.

this is :

y1 y2 are as functions of x, and

dy1/dx=2x+y2(x)
dy2/dx=2x^2*y1(x)
x (- [0,2]

the boundary conditions are:
y1(0)=2,y2(0)=3
y1(2)=4,y2(2)=6

how to get the numerical solution of the equations by COMSOL?

thank you very much!!

4 Replies Last Post 5 ott 2010, 04:40 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 ott 2010, 08:12 GMT-4
Hi

well I tried to enteer your equations in V4.0a, blind without thinking too much, in coefficient and in general mode. I only set the system to linear, I left the rest as is and solved the two cases (you need to play a little with the solver settings when you mix two models like this and select the correct results.

The result are some "not very nice" oscillating graphs, and the oscillations arelinked to the mesh density, which indicates that something is wrong:
this is not an uniquely define BVP or a correctly set-up PDE.

So either I have missed a point,quite possible, or the equations cannot be solved like this

But we have discussed this before (with exaples) on the forum, see i.e. treads

(I havent found back the thread yet, it could have been about a year ago ;)

try a search on the forum

--
Good luck
Ivar
Hi well I tried to enteer your equations in V4.0a, blind without thinking too much, in coefficient and in general mode. I only set the system to linear, I left the rest as is and solved the two cases (you need to play a little with the solver settings when you mix two models like this and select the correct results. The result are some "not very nice" oscillating graphs, and the oscillations arelinked to the mesh density, which indicates that something is wrong: this is not an uniquely define BVP or a correctly set-up PDE. So either I have missed a point,quite possible, or the equations cannot be solved like this But we have discussed this before (with exaples) on the forum, see i.e. treads (I havent found back the thread yet, it could have been about a year ago ;) try a search on the forum -- Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 ott 2010, 10:16 GMT-4
your problem cannot be solved because it have no solution!!
Indeed you have too many BC. you need 2 BC on;y to complete your system.

If you remove 2 Bc in order to get a well posed problem, then it will be very easily solved by comsol or any other ode package along the lines pointed out by Ivar.

JF
your problem cannot be solved because it have no solution!! Indeed you have too many BC. you need 2 BC on;y to complete your system. If you remove 2 Bc in order to get a well posed problem, then it will be very easily solved by comsol or any other ode package along the lines pointed out by Ivar. JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 ott 2010, 04:23 GMT-4
Hi,

Thanks a lot for your help, specially for your mph file. Your result computed by Comsol is similar with mine by matlab only. I has computed the question by two ways using matlab. One is the command of "slove", the other is finite-differential method with iterative technique.

The question raised in the subject is only a example to research the way compute by Comsol. In fact, the example means nothing in practice. The question I really want to solve is so complex that not suit to type here, so I educe the example above.

I will research the mph file carfully and search the BVP in the forum.

thank you again!

youf.
Hi, Thanks a lot for your help, specially for your mph file. Your result computed by Comsol is similar with mine by matlab only. I has computed the question by two ways using matlab. One is the command of "slove", the other is finite-differential method with iterative technique. The question raised in the subject is only a example to research the way compute by Comsol. In fact, the example means nothing in practice. The question I really want to solve is so complex that not suit to type here, so I educe the example above. I will research the mph file carfully and search the BVP in the forum. thank you again! youf.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 ott 2010, 04:40 GMT-4
Hi,

Thanks a lot for your answer. I am very sorry for the unclear illustration to the example which really means nothing in practice. However, I felicitate to myself that I has be guided by Ivar and you.

thank you again!

youf.
Hi, Thanks a lot for your answer. I am very sorry for the unclear illustration to the example which really means nothing in practice. However, I felicitate to myself that I has be guided by Ivar and you. thank you again! youf.

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.