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.

Better understanding of the test() function

Please login with a confirmed email address before reporting spam

To get the weak form of a boundary condition, one has to multiply it with a 'test-function' and integrate over the given boundary. While COMSOL does the integrating, the contents of the integral are displayed in the 'weak constraint' or 'weak contribution' section in the equation view of the corresponding node.

While the test function, mathematically, is definded as a more-or-less often differentiable hat-function on a given region, it is displayed in most COMSOL models as something like this

rest_of_equation*(test(uTx) + test(u) + test(vty))

or similar. And there ends my comprehension, because even in boundary conditions where no velocity is existent, these test functions still include spatial derivatives of the velocity field or the velocity field itself.

Can anyone explain to me, why there are velocity terms used in the test functions?

Best regards,
Christian Kelb

3 Replies Last Post 4 giu 2015, 09:05 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 lug 2011, 10:12 GMT-4
I have the same problem.

When I tried looking at the "Marangoni convection" example, the shear free term was replaced with the temperature gradient term. But when typing this expression in the weak constraint node, there was a "test(u)".
All I understand is that the weak contribution node can control the flux term.
Still, I'm not sure what kind of operator comsol is using, and I couldn't get much info out of the manual..

Is there anyone who can clarify on how to use the weak constraint node?
I'm very sure there are a lot of ppl out there who's eager to know.

Thanks.

I have the same problem. When I tried looking at the "Marangoni convection" example, the shear free term was replaced with the temperature gradient term. But when typing this expression in the weak constraint node, there was a "test(u)". All I understand is that the weak contribution node can control the flux term. Still, I'm not sure what kind of operator comsol is using, and I couldn't get much info out of the manual.. Is there anyone who can clarify on how to use the weak constraint node? I'm very sure there are a lot of ppl out there who's eager to know. Thanks.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 3 giu 2015, 03:56 GMT-4
Hi Christian
Did yoy find the answer of your question and may you share that with me?? I have a same propblem with the meaning of test function. I have 3 independant variable named T, P, u and I have some terms such as test(PTx) in the weak expression. Please if you find let me know the differences between test(Px) with Test(PTx).
Thanks in advance
Regards
Somaieh
Hi Christian Did yoy find the answer of your question and may you share that with me?? I have a same propblem with the meaning of test function. I have 3 independant variable named T, P, u and I have some terms such as test(PTx) in the weak expression. Please if you find let me know the differences between test(Px) with Test(PTx). Thanks in advance Regards Somaieh

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 4 giu 2015, 09:05 GMT-4
My colleague Chien Liu has authored a few great blogs to get users started on the weak form: www.comsol.com/blogs/?s=weak+form
On the weak form in COMSOL, see also the Reference Manual, version 5.1, page 762 and following.

Suffixes like Tx, Ty and Tz are appended to a variable's name to indicate its tangential derivatives on a lower dimensional entity (for instance in 3D on a boundary or edge). See the Reference Manual, version 5.1, page ~250 for more on COMSOL syntax.
Jeff
My colleague Chien Liu has authored a few great blogs to get users started on the weak form: http://www.comsol.com/blogs/?s=weak+form On the weak form in COMSOL, see also the Reference Manual, version 5.1, page 762 and following. Suffixes like Tx, Ty and Tz are appended to a variable's name to indicate its tangential derivatives on a lower dimensional entity (for instance in 3D on a boundary or edge). See the Reference Manual, version 5.1, page ~250 for more on COMSOL syntax. Jeff

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.