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.

importing 2D mesh in comsol ?

Please login with a confirmed email address before reporting spam

Dear All,

I am using a geometry imported from CAD and i d like to select a single face and
transform it to get only to work in 2D. Basically i d like to solve it in 2D.
How can i do to import geometry in 2D

anyone can help?

Nico

5 Replies Last Post Nov 30, 2012, 2:33 p.m. EST
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 Dec 28, 2009, 10:22 a.m. EST
Hi,

if you have a 3D cad model, you cannot import it straight into 2D, I use two options:

1) I select the face in the CAD tool and save it as a dxf file (this is not easily possible for my CAD tool, I must save it into an intermediat file format, export it to my CAM programme, dismount the volumes, extract the surfaces, and export to dxf, then I can read it in in COMSOL, sometimes I can export directly a surface from my CAD tool as an IGES, and then use the CAM to generate the dxf, slightly heavy anyhow ;)

2) you import the 3D into a COMSOL 3D geometry en then you can:
a) if the geometry is simple you set up the 2D view and you overright with the Comsos geometrical elements
b) you decompose the volumes inside COMSOL into surfaces, you split the surfaces, into individual surfaces you select those outside the plane of interest and you simply delete them. You complete your 3D comsol geometry if required all only in 1 plane, you save the comsol geometry ans a mphbin file, and you try to import it into a 2D geometry, hopefully if you have cleaned it up correctly it works, mostly it has done so far for me.

But neither ways are really satisfactory

If anybody has a simpler way I would appreciate to hear about it too ;)

Hope this helps
Good luck
Ivar
Hi, if you have a 3D cad model, you cannot import it straight into 2D, I use two options: 1) I select the face in the CAD tool and save it as a dxf file (this is not easily possible for my CAD tool, I must save it into an intermediat file format, export it to my CAM programme, dismount the volumes, extract the surfaces, and export to dxf, then I can read it in in COMSOL, sometimes I can export directly a surface from my CAD tool as an IGES, and then use the CAM to generate the dxf, slightly heavy anyhow ;) 2) you import the 3D into a COMSOL 3D geometry en then you can: a) if the geometry is simple you set up the 2D view and you overright with the Comsos geometrical elements b) you decompose the volumes inside COMSOL into surfaces, you split the surfaces, into individual surfaces you select those outside the plane of interest and you simply delete them. You complete your 3D comsol geometry if required all only in 1 plane, you save the comsol geometry ans a mphbin file, and you try to import it into a 2D geometry, hopefully if you have cleaned it up correctly it works, mostly it has done so far for me. But neither ways are really satisfactory If anybody has a simpler way I would appreciate to hear about it too ;) Hope this helps Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 30, 2012, 1:48 a.m. EST
I have imported a 2D geometry to COMSOL from Solidworks using the DXF extension. But the geometry is imported to COMSOL as read only. How can I use my imported geometry in COMSOL to do simulations.

COMSOL realizes the boundaries are there, but I can´t do anything to them.

What should I do to be able to do simulations on my imported dxf geometry in COMSOL 3.5? I only have the geometry, I have not done any meshing in my dxf file.
I have imported a 2D geometry to COMSOL from Solidworks using the DXF extension. But the geometry is imported to COMSOL as read only. How can I use my imported geometry in COMSOL to do simulations. COMSOL realizes the boundaries are there, but I can´t do anything to them. What should I do to be able to do simulations on my imported dxf geometry in COMSOL 3.5? I only have the geometry, I have not done any meshing in my dxf file.

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 Nov 30, 2012, 2:08 a.m. EST
Hi

I do not fully follow you there, if you import your DXF into a 2D view then you have got what you need, provided that your DXF geometry is build up of polylines (closed lines defining surfaces. Normally COMSOl will analyse this and go ahead to define entities: (sub)domains and boundaries. If not you would need to group yourgeometrical objects = lines into surfaces manually with the COMSOL commands

--
Good luck
Ivar
Hi I do not fully follow you there, if you import your DXF into a 2D view then you have got what you need, provided that your DXF geometry is build up of polylines (closed lines defining surfaces. Normally COMSOl will analyse this and go ahead to define entities: (sub)domains and boundaries. If not you would need to group yourgeometrical objects = lines into surfaces manually with the COMSOL commands -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 30, 2012, 2:16 a.m. EST
COMSOL does recognize the boundaries and subdomain, but does not let me to define anything physically on them.
COMSOL does recognize the boundaries and subdomain, but does not let me to define anything physically on them.

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 Nov 30, 2012, 2:33 p.m. EST
Hi
But in 3.5 these possibilities were very limited, COMSOL is not really set up for "mesh" import, it's designed for geometrical import, physics on domain, and boundary conditions on the boundaries + IC then you mesh as a discetization of your model.
Importing a mesh is starting in the middle of the story, you are missing the beginning, and now easy way to back track and invent it afterwards

--
Good luck
Ivar
Hi But in 3.5 these possibilities were very limited, COMSOL is not really set up for "mesh" import, it's designed for geometrical import, physics on domain, and boundary conditions on the boundaries + IC then you mesh as a discetization of your model. Importing a mesh is starting in the middle of the story, you are missing the beginning, and now easy way to back track and invent it afterwards -- 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.