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.

Weak form vs. Coefficient form PDE

Please login with a confirmed email address before reporting spam

Hi

I have implemented a coupled problem of simple two phase flow in porous media in coefficient form PDE and also in weak form PDE. However the results are not identical. I can not figure out what the problem is and how to correct it. The dependent variables are ‘p’ and ‘s’. The coupled equation is
C1 Delta(p) =0
C2 ds/dt+ C3 Delta(p)+ C3 Delta(s)=0
where
Delta=Laplacian=grad.grad

And in weak form

(C1)*(test(px)*px+test(py)*py)
-C2*test(s)*st+(C3)*(test(px)*px+test(py)*py)+(C4)*(test(sx)*sx+test(sy)*sy)

Is there any problem with this weak from?
I have uploaded my model. Can any body please check my model and find the problem.

Thank you in advance.


5 Replies Last Post Mar 10, 2011, 7:39 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 9, 2011, 12:08 p.m. EST
I found out that the problem is with Flux/source boundary condition in weak form. It doesn't contribute in the model. But I still don't know why.
I found out that the problem is with Flux/source boundary condition in weak form. It doesn't contribute in the model. But I still don't know why.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 10, 2011, 5:28 a.m. EST
I think that you weak form is wrong.
Your firs equation in my Comsol becomes

C1*(-px-py)*test(p)

Ciao Anto

I think that you weak form is wrong. Your firs equation in my Comsol becomes C1*(-px-py)*test(p) Ciao Anto

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 10, 2011, 6:05 a.m. EST
Thank you for reply.
Sorry I made a mistake in writing my system of equation. Actually I should have written it like:

C1 Delta (p) =0
C2 ds/dt+ C3 Delta(p)+ C3 Delta(p)=0
Here
Delta=Laplacian = grad. garad

And in weak form

(C1)*(test(px)*px+test(py)*py)
-C2*test(s)*st+(C3)*(test(px)*px+test(py)*py)+(C4)*(test(sx)*sx+test(sy)*sy)

I still have problem with the boundary condition in the weak form. It doesn’t work properly.
I have corrected my first post.
Thank you for reply. Sorry I made a mistake in writing my system of equation. Actually I should have written it like: C1 Delta (p) =0 C2 ds/dt+ C3 Delta(p)+ C3 Delta(p)=0 Here Delta=Laplacian = grad. garad And in weak form (C1)*(test(px)*px+test(py)*py) -C2*test(s)*st+(C3)*(test(px)*px+test(py)*py)+(C4)*(test(sx)*sx+test(sy)*sy) I still have problem with the boundary condition in the weak form. It doesn’t work properly. I have corrected my first post.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 10, 2011, 6:21 a.m. EST
I suppose that your laplacian is
delta=div.grad
and your equations read

(i) C1 delta(p)=0
(ii) C2 ds/dt + C3 delta(p)+C4 delta(s)=0

Now if delta(p) is zero by (i) the second will be simply

(ii) C2 ds/dt + C4 delta(s)=0

and the second equation is no more coupled to the first.
In any case the weak form is

(i) C1*(-Px*test(Px)-Py*test(Py))
(ii) (-C3*Px-C4*Sx)*test(Sx)+(-C3*Py-C4*Sy)*test(Sy) + C2*St*test(S)

Rob


I suppose that your laplacian is delta=div.grad and your equations read (i) C1 delta(p)=0 (ii) C2 ds/dt + C3 delta(p)+C4 delta(s)=0 Now if delta(p) is zero by (i) the second will be simply (ii) C2 ds/dt + C4 delta(s)=0 and the second equation is no more coupled to the first. In any case the weak form is (i) C1*(-Px*test(Px)-Py*test(Py)) (ii) (-C3*Px-C4*Sx)*test(Sx)+(-C3*Py-C4*Sy)*test(Sy) + C2*St*test(S) Rob

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 10, 2011, 7:39 a.m. EST
Dear Rob

I really appreciate your help. I corrected my weak form and it works.

Mojtaba
Dear Rob I really appreciate your help. I corrected my weak form and it works. Mojtaba

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.