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.

Ellipse shape using flc2hs function

Please login with a confirmed email address before reporting spam

Hello,

I'm working on a 3D model with the level set method and I would like to create an entry with an ellipse shape using the flc2hs function but I'm struggling on how to set the parameters of this function.

The equation of the ellipse is (x-x0)²/a²+(y-y0)²/b² = 1, with (x0 y0) as the center of the ellipse and a and b the radiuses of the ellipse. How can I implement this in the flc2hs function ?

Thanks !


3 Replies Last Post 23 ago 2022, 09:56 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 26 lug 2022, 12:15 GMT-4
Updated: 2 years ago 26 lug 2022, 13:59 GMT-4

Hello Dylan,

You can find the exact mathematical definition of the flc2hs function in the Reference Manual for COMSOL Multiphysics version 6.0 on page 357. The idea is that it's a smoothed Heaviside function, with the width of the smoothed region controled by the second argument. Away from that smoothing region, it returns 0 if the first argument is negative, and 1 if it is positive.

In the attached toy model, I use flc2hs to define an inhomogeneous thermal conductivity such that there is an ellipsoidal zone with a low conductivity in the center of the domain and a high conductivity elsewhere, with a smooth transition between the two. After computing the solution, you'll see how that causes the heat flux lines to curve outward to "avoid" the low conductivity chunk, as expected.

Hope this helps.

Best,

Jeff

-------------------
Jeff Hiller
Hello Dylan, You can find the exact mathematical definition of the flc2hs function in the Reference Manual for COMSOL Multiphysics version 6.0 on page 357. The idea is that it's a smoothed Heaviside function, with the width of the smoothed region controled by the second argument. Away from that smoothing region, it returns 0 if the first argument is negative, and 1 if it is positive. In the attached toy model, I use flc2hs to define an inhomogeneous thermal conductivity such that there is an ellipsoidal zone with a low conductivity in the center of the domain and a high conductivity elsewhere, with a smooth transition between the two. After computing the solution, you'll see how that causes the heat flux lines to curve outward to "avoid" the low conductivity chunk, as expected. Hope this helps. Best, Jeff


Please login with a confirmed email address before reporting spam

Posted: 2 years ago 23 ago 2022, 06:01 GMT-4

Thank you Jeff, it seems to work very well with the help of your model.

Thank you Jeff, it seems to work very well with the help of your model.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 23 ago 2022, 09:56 GMT-4

Glad I could help!

-------------------
Jeff Hiller
Glad I could help!

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.