How to Set Field Continuity Boundary Conditions in Comsol

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 can i set boundary condition on a part of a boundary

志远 陈

Please login with a confirmed email address before reporting spam

I import a geometry into COMSOL 5.2 through livelink for SolidWorks. And it's been divided into several domains and boundaries automatically.
But I have encountered a problem. I want to set boundary conditions on just a small part of a boundary. For example, there's a geometry -- a cube. And i want to set temperature condition on a triangle area on a surface. What can i do to make this happen?


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Apr 19, 2016, 3:29 p.m. UTC

You will need to draw that triangle on the surface, either in the CAD package (SolidWorks, for you) before you import it into COMSOL, or in COMSOL. See www.comsol.com/community/forums/general/thread/15263/#p246712 regarding the latter.
Best,
Jeff

You will need to draw that triangle on the surface, either in the CAD package (SolidWorks, for you) before you import it into COMSOL, or in COMSOL. See https://www.comsol.com/community/forums/general/thread/15263/#p246712 regarding the latter. Best, Jeff


Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Apr 19, 2016, 9:16 p.m. UTC

Hi,

As long as the boundary condition is of Neumann type, another possibility is to write the load as a boolean expression based on the coordinates. Something like

17.4*(x>0.2)*(x<0.35)*(y<0.12)

This is of course only feasible for simple geometrical shapes of the loaded area. Also, the mesh must be fine enough, so that the discretization errors are small.

Actually the same idea can be used also for Dirichlet type boundary conditions, but with a little trick. If the degree of freedom is 'u', then the following expression for the value of a Dirichlet condition will prescribe u to 12 inside an area, and let u be free elsewhere:

if((x>0.2)*(x<0.35)*(y<0.12),12, u)

If anyone is curious about how this expression works, a Dirichlet condition is implemented as u - prescribed_value. But if the prescribed value happens to be 'u' itself, u - u will cancel during the symbolic evaluation and the constraint magically disappears.

Regards,
Henrik

Hi, As long as the boundary condition is of Neumann type, another possibility is to write the load as a boolean expression based on the coordinates. Something like 17.4*(x>0.2)*(x


Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Apr 20, 2016, 7:00 a.m. UTC

Hi Henrik

Thanks for the nice trick, then it should also apply to other cases, such as T for temperature (in K) etc
Worth a Blog presentation with several examples on different physics, for me :)

--
Good luck
Ivar

Hi Henrik Thanks for the nice trick, then it should also apply to other cases, such as T for temperature (in K) etc Worth a Blog presentation with several examples on different physics, for me :) -- Good luck Ivar


志远 陈

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Apr 22, 2016, 7:24 a.m. UTC

Thank you very much. I'll try that immediately

Thank you very much. I'll try that immediately


Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Jun 27, 2016, 1:23 p.m. UTC

Hi Ivar, The blog post that you suggested is now published! https://www.comsol.com/blogs/how-to-make-boundary-conditions-conditional-in-your-simulation/ Regards, Henrik

zirkleitaind.blogspot.com

Source: https://www.comsol.com/forum/thread/110073/how-can-i-set-boundary-condition-on-a-part-of-a-boundary

0 Response to "How to Set Field Continuity Boundary Conditions in Comsol"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel