Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Swept mesh density dependent of a spatial function

Please login with a confirmed email address before reporting spam

Dear all,

I have a simple question: how can I define in swept mesh a function (spatial) of refinement? Just for example, I have a strip and I would have a very fine mesh only in the middle.
I have tried in this way: I set a parabolic function in Definitions>Analytic, 0.8+x^2 (supposing x is the direction of the swept), and then I inserted the function in Swept>Size>Max Element Size, hence an1(x). In this way I should get element of max 0.8 in the middle of the strip, and bigger going towards the sides.

But it seems that Comsol does not accept functions in element size parameters. What I am doing wrong?
Thank you very much

Fabio

3 Replies Last Post 6 mag 2013, 15:07 GMT-4
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: 1 decade ago 6 mag 2013, 11:57 GMT-4
Hi

use the dimensions node, but the best I know bout is to "cut" up your geometry by ading some internal boundaries, it helps for selecting and probing too

--
Good luck
Ivar
Hi use the dimensions node, but the best I know bout is to "cut" up your geometry by ading some internal boundaries, it helps for selecting and probing too -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 mag 2013, 13:03 GMT-4
Hi Ivar,

thank you for your reply. Yes I already know the solution to cut up domains, faces and edges and assign a respective size. I was wondering if there was some "analytical" solution...it's strange that Comsol does not accept a function in the size parameters...
A problem can come out if I have a function not only spatial but also time dependent, thus refining a mesh in a zone that "moves" with time, what a Gaussian Pulse can do (for instance, if a have a heat source that moves with time). How can I deal with this requirement?

Thank you again for any suggestions

Fabio
Hi Ivar, thank you for your reply. Yes I already know the solution to cut up domains, faces and edges and assign a respective size. I was wondering if there was some "analytical" solution...it's strange that Comsol does not accept a function in the size parameters... A problem can come out if I have a function not only spatial but also time dependent, thus refining a mesh in a zone that "moves" with time, what a Gaussian Pulse can do (for instance, if a have a heat source that moves with time). How can I deal with this requirement? Thank you again for any suggestions Fabio

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: 1 decade ago 6 mag 2013, 15:07 GMT-4
Hi

I believe that in the "dimensions node" you can define on edges, accept field variables but you need to trigger the remeshing somehow.

You can also "box mesh refinement", probably there too with variables (to be checked)

--
Good luck
Iva
Hi I believe that in the "dimensions node" you can define on edges, accept field variables but you need to trigger the remeshing somehow. You can also "box mesh refinement", probably there too with variables (to be checked) -- Good luck Iva

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.