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 properly define the divergence of the gradient of a scalar variable manually?
Posted 2025年2月25日 GMT+8 17:25 Modeling Tools & Definitions, Physics Interfaces Version 6.3 4 Replies
Please login with a confirmed email address before reporting spam
Hi,
I am trying to define the divergence of the gradient of a scalar variable, namely
,
and use it as a source term in a general form PDE in a 2D model, where is a constant and
is the dependent variable.
By the definition of the divergence of the gradient of a scalar variable, I assume what I should do is define a variable in COMSOL like below
Laplacian_xi=d(d(xi,x),x)+d(d(xi,y),y)
which corresponds to
.
However, if I put Laplacian_xi in the source term of the general form PDE, and set Conserved flux as 0, the result differs greatly from defining d(xi,x) and d(xi,y) in the Conserved flux and set the source term as 0.
Can anyone tell me what I did wrong? Do I need to define any weak form to make d(d(xi,x),x)+d(d(xi,y),y) work properly?
Best Runzi Wang