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 two fem structures into COMSOL CAD

Please login with a confirmed email address before reporting spam

Hi all,

I am trying to import two fem structure variables into COMSOL CAD.
File>Import>FEM structure>Enter name of FEM structure variable>OK.

I had no problem to import each FEM structure into COMSOL CAD. However, it was impossible to import two fem structures into COMSOL simultaneously. For example, when I try to export the 2nd FEM structure, I need to save and close a current model that has the 1st FEM structure. Q> Can we import two FEM structures into a single COMSOL model?

In MATLAB Interface, I created my 1st and 2nd fem structures in the following way:
g1=geomcoerce('solid',{f1,b1});
g2=geomcoerce('solid',{f2,b2});
g12=g1*g2; % Intersection
fem1.geom=geomcsg(split(g12)); % The 1st FEM structure
g3=geomcoerce('solid',{f3,b3});
fem2.geom=geomcsg(split(g3)); % The 2nd FEM structure

Q> In MATLAB Interface, how can I combine two fem structures into one and import it to COMSOL? I tried the followings, but the result was unsuccessful.
g4=g1*g2+g3; % Intersection and Union
fem3.geom=geomcsg(split(g4));

Q> If it is impossible to do such a work in COMSOL GUI, how can I perform the work in MATLAB Interface environment?

Thank you very much for all your suggestions.

Evan


1 Reply Last Post 14 nov 2009, 04:45 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: 2 decades ago 14 nov 2009, 04:45 GMT-5
H

my way around to understand how COMSOL is using multiple structures and geometries, is to open the GUI, create two geomeetries each with its physics (why not the same physics it's simpler), and create two different sized blocks, one in each geometry.

Then I import it into matlab and analyses the "fem structure, how it's made-up, thereafter when I have doubts, I search through the doc, in particular mlinterface.pdf

Good luck
Ivar
H my way around to understand how COMSOL is using multiple structures and geometries, is to open the GUI, create two geomeetries each with its physics (why not the same physics it's simpler), and create two different sized blocks, one in each geometry. Then I import it into matlab and analyses the "fem structure, how it's made-up, thereafter when I have doubts, I search through the doc, in particular mlinterface.pdf 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.