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.

Convert a PDE to the Weak Form

Please login with a confirmed email address before reporting spam

Hi,

I have a 2D geometry and time-dependent study with 1D heat transfer in solids, 2D chemical reaction and 2D gas diffusion physics, where I'm using the coefficient form PDEs to model the chemical reaction and gas diffusion.

Now I want to rebuild the model but with using the weak form physics for the gas diffusion. My question is how can convert the following equation into the weak form?

dP/dt+∇. (-D ∇P)=f

where :

P is the dependent variable to solve for.

t is time

∇ is [d/dx, d/dy]

f is a function of the gradient of another dependent variable with time (let's call the other variable CA)

I tried the following two formats but the study didn't converge all the way due to either initial values problems or other errors that I didn't get when solving with Coefficient form PDE, which suggests the weak form expression is wrong.

1st trial:

(-d(P, TIME)-d(-D*d(P, x), x)-d(-D*d(P, y), y)+-d(CA, TIME))*test(P)

2nd trial:

-d(P, TIME)*test(P)+D*(Px*test(Px)+Py*test(Py))+ -d(CA, TIME)*test(P)

I know this is rather a "mathematical" question than a technical one, but would appreciate your help. Thanks!

Eman


0 Replies Last Post 2020年2月5日 GMT-5 11:07
COMSOL Moderator

Hello Eman Salman

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.