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.

Drawing a custom function

Please login with a confirmed email address before reporting spam

Hi all,

I was just wondering if there is a way to draw a custom function to create a 2D or 3D geometry.

Can an analytical function be drawn or a list of point be interpolated to create a custom curve?

I have COMSOL 3.5a version.

Thanks in advance for your help.

Regards,

Valerio

1 Reply Last Post 04.02.2010, 00:37 GMT-5
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 04.02.2010, 00:37 GMT-5
Hi
from my knowledge there is no direct way (see a couple of other discussion threads). In anycase you must define a segment length, thesselation or finally a "meshing" density to represent you analytical function.

The only workaround I know about is using the ALE to deform a surface. Lets say you start from a cube in 3D, you would want to change the height Z of one face for each X,Y, then you first mesh the system to the desires local element size, you define your function Z=f(x,y) and you impose a deformation of the top surface based on this function. Once solved you save your meshed geometry, and you go on with your physical model.

One point, selecting the mesh finesse: too small it imposes a high mesh density on your problem, too coarse it limits the accuracy of your analytical function, but yoo can always make the mesh finer for your physics.

Hope this helps
Good luck
Ivar
Hi from my knowledge there is no direct way (see a couple of other discussion threads). In anycase you must define a segment length, thesselation or finally a "meshing" density to represent you analytical function. The only workaround I know about is using the ALE to deform a surface. Lets say you start from a cube in 3D, you would want to change the height Z of one face for each X,Y, then you first mesh the system to the desires local element size, you define your function Z=f(x,y) and you impose a deformation of the top surface based on this function. Once solved you save your meshed geometry, and you go on with your physical model. One point, selecting the mesh finesse: too small it imposes a high mesh density on your problem, too coarse it limits the accuracy of your analytical function, but yoo can always make the mesh finer for your physics. Hope this helps Good luck Ivar

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.