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.

Customized geometry

Please login with a confirmed email address before reporting spam

Hi!

Does anyone know how to import geometry created in Matlab (or the corresponding .mat file) into COMSOL? I wish to create a 2D parabolic dish but could not find any windows in the COMSOL GUI to key in equations for customized geometries.

Thanks!!!

6 Replies Last Post 11.01.2010, 09:36 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 13.10.2009, 11:06 GMT-4
Hello,

What comes to my mind at the first place is to create the geometry using Comsol script commands like line1, arc1 and alike. The final geometry can be first processed by `geomcoerce` (do you need a closed curve, area or solid?) and exported by `geomexport` with a DXF extension. The CAD Import can be used to import the geometry to Comsol afterwards.

Hope it helps,
Onur
Hello, What comes to my mind at the first place is to create the geometry using Comsol script commands like line1, arc1 and alike. The final geometry can be first processed by `geomcoerce` (do you need a closed curve, area or solid?) and exported by `geomexport` with a DXF extension. The CAD Import can be used to import the geometry to Comsol afterwards. Hope it helps, Onur

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 23.10.2009, 15:19 GMT-4
I have the same question.

For example, I am interested in flow in a channel whose upper boundary is a sine function. How can I draw the upper boundary?

Thanks a lot.
I have the same question. For example, I am interested in flow in a channel whose upper boundary is a sine function. How can I draw the upper boundary? Thanks a lot.

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 23.10.2009, 15:47 GMT-4
Use the command geomfile from matlab,

Using geomfile you can specify the size of any domain, as long as you can specify the boundaries of the domain as functions of some parameter. However the documentation is not very clear, and you will have to do a bit of trial and error.

However its a very powerful option.
Use the command geomfile from matlab, Using geomfile you can specify the size of any domain, as long as you can specify the boundaries of the domain as functions of some parameter. However the documentation is not very clear, and you will have to do a bit of trial and error. However its a very powerful option.

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 02.11.2009, 06:03 GMT-5
Hi everyone!

Thanks for all the advice. In the end, I resorted to using Autocad to generate the parabola, then import it into COMSOL, because it was easier. I noticed if we want to do that in COMSOL, we have to write the MATLAB script that gives the output in the form of an "object" array, and I can't simply use the x and y coordinates which were in the form of a double array. Or is there an easier way I'm not aware of?
Hi everyone! Thanks for all the advice. In the end, I resorted to using Autocad to generate the parabola, then import it into COMSOL, because it was easier. I noticed if we want to do that in COMSOL, we have to write the MATLAB script that gives the output in the form of an "object" array, and I can't simply use the x and y coordinates which were in the form of a double array. Or is there an easier way I'm not aware of?

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: 2 decades ago 03.11.2009, 02:44 GMT-5
Hi

You can geerate several types of higher order cures in COMSOL, at least rather easily in 2D by creating a Bezier curve and then editing it (double click on the curve). If you have a surface, decompose it first ("coerce to curve") and "slpit" it to elementary items, and delete unwanted items. Then play with the weight value. sqrt(2) gives a circle.

You have als the "higher" order curves.

Take a look in the documentation for the full formulas or select a good mathematics book on Bezier curves

Good luck
Ivar
Hi You can geerate several types of higher order cures in COMSOL, at least rather easily in 2D by creating a Bezier curve and then editing it (double click on the curve). If you have a surface, decompose it first ("coerce to curve") and "slpit" it to elementary items, and delete unwanted items. Then play with the weight value. sqrt(2) gives a circle. You have als the "higher" order curves. Take a look in the documentation for the full formulas or select a good mathematics book on Bezier curves Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.01.2010, 09:36 GMT-5
Hello,

i want to create a parable, following this formula: y(x)=x^2/(c). How can i create such a curve in Comsol? I am using the Bezier 2nd degree tool at the moment, but I am not sure, how to select the weight and the points.

Thanks for helping!

Moritz
Hello, i want to create a parable, following this formula: y(x)=x^2/(c). How can i create such a curve in Comsol? I am using the Bezier 2nd degree tool at the moment, but I am not sure, how to select the weight and the points. Thanks for helping! Moritz

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.