Please login with a confirmed email address before reporting spam
Posted:
5 years ago
04.03.2020, 10:20 GMT-5
Seems like you are trying to convert the Diffusion equation. The second term on the first line should be the divergence of the gradient of P, not the gradient of the gradient, which doesn't make sense mathematically. You can then use vector calculus identites to obtain a term div(Dgrad(P)test(P)). Then use the divergence theorem to obtain an integral at the boundary only.
Let me know if you need further help,
Alex
Seems like you are trying to convert the Diffusion equation. The second term on the first line should be the divergence of the gradient of P, not the gradient of the gradient, which doesn't make sense mathematically. You can then use vector calculus identites to obtain a term div(D*grad(P)*test(P)). Then use the divergence theorem to obtain an integral at the boundary only.
Let me know if you need further help,
Alex
Please login with a confirmed email address before reporting spam
Posted:
5 years ago
05.03.2020, 09:12 GMT-5
Hello Alex,
Thank you for your reply. Yes, you are right, it is the diffusion equation, it worked well with the coefficient form PDE interface in Comsol.
Can you please explain further? do you mean I don't need to break down the 2nd term, but just use div(Dgrad(P)test(P) in the weak form equation part along with the rest of the equation? how is that I used the gradient twice?
how to set the integral for the boundary only? I know that in comsol we can either set the weak contribution as a BC or use a ready BC such as Dirichlet Boundary condition.
I tried many things by now, but I keep getting the error (Repeated error test failures. May have reached a singularity. Time: 0.11456355169943476, Undefined value found., Undefined value found in the stiffness matrix., There are 3 equations giving NaN/Inf in the matrix rows for the variable comp1.Pb., at coordinates: )
Which indicates that I'm missing some boundary conditions.
Thanks!
Eman
Hello Alex,
Thank you for your reply. Yes, you are right, it is the diffusion equation, it worked well with the coefficient form PDE interface in Comsol.
Can you please explain further? do you mean I don't need to break down the 2nd term, but just use div(Dgrad(P)test(P) in the weak form equation part along with the rest of the equation? how is that I used the gradient twice?
how to set the integral for the boundary only? I know that in comsol we can either set the weak contribution as a BC or use a ready BC such as Dirichlet Boundary condition.
I tried many things by now, but I keep getting the error (Repeated error test failures. May have reached a singularity. Time: 0.11456355169943476, Undefined value found., Undefined value found in the stiffness matrix., There are 3 equations giving NaN/Inf in the matrix rows for the variable comp1.Pb., at coordinates: )
Which indicates that I'm missing some boundary conditions.
Thanks!
Eman
Please login with a confirmed email address before reporting spam
Posted:
5 years ago
05.03.2020, 15:18 GMT-5
Updated:
5 years ago
05.03.2020, 15:24 GMT-5
Hi Eman,
Maybe you need to freshen up on your vector calculus. I have attached the equation I'm talking about. You will need to convert the first term on the right hand side into a boundary term by using the Divergence theorem (https://www.wikiwand.com/en/Divergence_theorem). This term will end up being input as a Zero Flux node by default, which you can change by adding a Weak Contribution or a Flux/Source node.
Cheers,
Alex
Hi Eman,
Maybe you need to freshen up on your vector calculus. I have attached the equation I'm talking about. You will need to convert the first term on the right hand side into a boundary term by using the Divergence theorem (https://www.wikiwand.com/en/Divergence_theorem). This term will end up being input as a Zero Flux node by default, which you can change by adding a Weak Contribution or a Flux/Source node.
Cheers,
Alex
Please login with a confirmed email address before reporting spam
Posted:
5 years ago
08.04.2020, 06:50 GMT-4
Many thanks, Alex.