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.

Merge two models.(One mesh, one geometry)

Please login with a confirmed email address before reporting spam

I have a mphtxt file which is a mesh file supported in COMSOL. I want to
simulate the electric field generate by electrodes. The geometry of the
electrodes are saved as a solidworks file, STL file, and as a parasolid
file.

I can import the mesh by right-clicking on mesh1 and clicking on
import.

To import the electrode geometry, I right-click on the file name at the
top of the model builder and add model. Then by right-clicking on model2,
I can import either the parasolid file or a bunch of stl files.

The problem is I do not know how to merge these two models together so I
can see the effect of electric field generated by the electrodes.
Any tips?

9 Replies Last Post 27 apr 2011, 15:18 GMT-4
COMSOL Moderator

Hello Sang Ha Shin

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 nov 2010, 16:25 GMT-4
Have you figured out how to use the mesh part?
Have you figured out how to use the mesh part?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12 apr 2011, 13:31 GMT-4
Hi,
I am also having the same problem , except that my solid geometry was buit in comsol and I am unable to jon the two. HAve you found the solution to your problem. It would be a great help to me as well.
Thanks
Hi, I am also having the same problem , except that my solid geometry was buit in comsol and I am unable to jon the two. HAve you found the solution to your problem. It would be a great help to me as well. Thanks

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 13 apr 2011, 01:51 GMT-4
Hi

I do not believe you can "join" an external mesh and a geometry. As COMSOL generates the mesh based on the geometry, and in that order. So why not mesh in COMSOL ?

For simple mesh shapes, if you have them in NASTRAN neutral file format, and you have v3.5 you might import it, and tempt a "create geometry from mesh" This will generate a COMSOL geometry onto which you can then apply your physics and BC, and then remesh (if required) and solve.

Another point: STL file format is no true 3D, its 2D or at most 2.5D and has some of the same issues as the regeneration of a "geometry" from it as you have with a mesh. Parasolid, step or other "higher order" 3D kernels formats are far better.

The points above is a major difference between COMSOL and "older" FEM programmes, and so long this is not correctly understood and accepted you will end up loosing your time and getting frustrated (as I did in the beginning) . But, once accepted you find new ways to do things and you will, I'm sure, find this approach far more powerful

--
Good luck
Ivar
Hi I do not believe you can "join" an external mesh and a geometry. As COMSOL generates the mesh based on the geometry, and in that order. So why not mesh in COMSOL ? For simple mesh shapes, if you have them in NASTRAN neutral file format, and you have v3.5 you might import it, and tempt a "create geometry from mesh" This will generate a COMSOL geometry onto which you can then apply your physics and BC, and then remesh (if required) and solve. Another point: STL file format is no true 3D, its 2D or at most 2.5D and has some of the same issues as the regeneration of a "geometry" from it as you have with a mesh. Parasolid, step or other "higher order" 3D kernels formats are far better. The points above is a major difference between COMSOL and "older" FEM programmes, and so long this is not correctly understood and accepted you will end up loosing your time and getting frustrated (as I did in the beginning) . But, once accepted you find new ways to do things and you will, I'm sure, find this approach far more powerful -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 apr 2011, 06:36 GMT-4
Hi Ivar,
Thank you very much for this information as it will greatly help me.
The mesh has been generated in simpleware of a MRI object wichh i need to do heat analysis using comsol with necessary geometry to assist the simulation to be buit in comsol.
I have read some of your discussions in the forum, I just wanted to ask is it possible for me to import mesh in geometry1 and design the compononent in geometry 2 of the same file and use the move operation to assemble the two geometries for me to carry out the simulation.
The other option that I could think of was to convert the mesh into a geometry but I was constantly given .
an error message while doing so : error 2211: face cannot be parametrized : face 1
Is there any other way to assemble the imported mesh of mri object and assemble it to system in comsol.
Please guide. Thanks again your information is very useful to me.
Isshaa
Hi Ivar, Thank you very much for this information as it will greatly help me. The mesh has been generated in simpleware of a MRI object wichh i need to do heat analysis using comsol with necessary geometry to assist the simulation to be buit in comsol. I have read some of your discussions in the forum, I just wanted to ask is it possible for me to import mesh in geometry1 and design the compononent in geometry 2 of the same file and use the move operation to assemble the two geometries for me to carry out the simulation. The other option that I could think of was to convert the mesh into a geometry but I was constantly given . an error message while doing so : error 2211: face cannot be parametrized : face 1 Is there any other way to assemble the imported mesh of mri object and assemble it to system in comsol. Please guide. Thanks again your information is very useful to me. Isshaa

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 13 apr 2011, 07:03 GMT-4
Hi

If it's a free "meshed" geometry (i.e. of MRI type) then there are some third party vendors that have the appropriate software to translate that, see the main web page of COMSOL. Certainly there must be some free-ware too but I do not know about that.

I do not believe its possible to join them as such, or then with some heavy Matlab fiddling perhaps (I gave up importing even ANSYS codes, would have been nice too).

As I said I had some success with COMSOL 3.5a and the command "create analysed geometry from mesh", but that implies loading in the mesh in NASTRAN Neutral file format. For some of my models it managed to regroup the lower level mesh to generate higher order objects, but not always. I'm not sure this feature is present in v4 even

--
Good luck
Ivar
Hi If it's a free "meshed" geometry (i.e. of MRI type) then there are some third party vendors that have the appropriate software to translate that, see the main web page of COMSOL. Certainly there must be some free-ware too but I do not know about that. I do not believe its possible to join them as such, or then with some heavy Matlab fiddling perhaps (I gave up importing even ANSYS codes, would have been nice too). As I said I had some success with COMSOL 3.5a and the command "create analysed geometry from mesh", but that implies loading in the mesh in NASTRAN Neutral file format. For some of my models it managed to regroup the lower level mesh to generate higher order objects, but not always. I'm not sure this feature is present in v4 even -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 apr 2011, 11:43 GMT-4
Hi,

In version 4.1 you can base a geometry on an imported NASTRAN or STL file for 3D models. Right-click the Mesh node and select Import to import a mesh.

It is not possible to combine solid modeling with a geometry based on a mesh in the same model, but you might be able to use two models (one mesh-based geometry and one based on solid geometry modeling) and connect the two using a coupling operator.

Best regards,
Magnus Ringh, COMSOL
Hi, In version 4.1 you can base a geometry on an imported NASTRAN or STL file for 3D models. Right-click the Mesh node and select Import to import a mesh. It is not possible to combine solid modeling with a geometry based on a mesh in the same model, but you might be able to use two models (one mesh-based geometry and one based on solid geometry modeling) and connect the two using a coupling operator. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 apr 2011, 12:27 GMT-4
HI Ivar,
Thanks for the help, I have managed to join the two assemblies as sugested by you by importing my mri object as a geometry , but when I have to mesh the two assemblies together I receive an error 2100: internal error in geometry decomposition, or sometimes error 4100, failure to generate mesh for subdomain: subdomain 1 internal error in boundary respecting
what would that mean, do i have to repair the imported mesh .
also when i try to mesh the two assemblies when they are not joined together, in the same geometry, i receive error
2052: faces are two close in 3D domain.
What exactly accounts as face in comsol and how can I control them if they are designed separately in two softwares.
Please guide .
Thanking You, and sorry for the trouble.
Isshaa
HI Ivar, Thanks for the help, I have managed to join the two assemblies as sugested by you by importing my mri object as a geometry , but when I have to mesh the two assemblies together I receive an error 2100: internal error in geometry decomposition, or sometimes error 4100, failure to generate mesh for subdomain: subdomain 1 internal error in boundary respecting what would that mean, do i have to repair the imported mesh . also when i try to mesh the two assemblies when they are not joined together, in the same geometry, i receive error 2052: faces are two close in 3D domain. What exactly accounts as face in comsol and how can I control them if they are designed separately in two softwares. Please guide . Thanking You, and sorry for the trouble. Isshaa

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 13 apr 2011, 12:39 GMT-4
HI Magnus R,
Many Thanks for the information great help, but I am using 3.4 version so I mangaged to import the mri model as geometry, with suggestion of Ivar, (it was useful) but is now finding difficult to mesh this geometry with the comsol geometry design, receiving errors pertaing to sub-domains, faces and small dimension, will have to find a way through this as I cannot control the mri object dimensions always .
Also I believe you are a COmsol employee, on comsol website there is a news article, stating comsol and simpleware partnership for being able to export MRI objects to comsol so that they can be meshed and be simulated in comsol, I have done this defintely works but only if the MRI object is a mesh imported to comsol, if imported as geometry I get above mentioned details. I just wanted to know if there is any pdf resource to this importing of mri meshes to comsol, I wonder if this can guide me as well.
Thanks a lot for your help, will defintely keep this in mind for further analysis.
Isshaa
HI Magnus R, Many Thanks for the information great help, but I am using 3.4 version so I mangaged to import the mri model as geometry, with suggestion of Ivar, (it was useful) but is now finding difficult to mesh this geometry with the comsol geometry design, receiving errors pertaing to sub-domains, faces and small dimension, will have to find a way through this as I cannot control the mri object dimensions always . Also I believe you are a COmsol employee, on comsol website there is a news article, stating comsol and simpleware partnership for being able to export MRI objects to comsol so that they can be meshed and be simulated in comsol, I have done this defintely works but only if the MRI object is a mesh imported to comsol, if imported as geometry I get above mentioned details. I just wanted to know if there is any pdf resource to this importing of mri meshes to comsol, I wonder if this can guide me as well. Thanks a lot for your help, will defintely keep this in mind for further analysis. Isshaa

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 apr 2011, 15:18 GMT-4
Hi Magnus,
It seems to work the way you have mentioned, I have been able to join my two geometeries (one is mesh based geometry from an stl file ) using merge component option. The thing is when i merge the two geometries i can select the physics condition to merge with either of the geometeries, but it does not allow me to merge more than one physics condition, and when simulated is not considering the physic condition for the secong geometry.
You had mentioned about coupling operators ; i saw through it and it seems that the coupling operators also need expression to be set, but i am not able to understand how a coupling operator actually operates as in what is it flow direction, because my geometries are dependent on the same variables temperature ; i cannot seem to connect them together.
Also can I connect two geometries by creating identity pairs.
Please guide it will be of great help.
Thanks and take care.
Hi Magnus, It seems to work the way you have mentioned, I have been able to join my two geometeries (one is mesh based geometry from an stl file ) using merge component option. The thing is when i merge the two geometries i can select the physics condition to merge with either of the geometeries, but it does not allow me to merge more than one physics condition, and when simulated is not considering the physic condition for the secong geometry. You had mentioned about coupling operators ; i saw through it and it seems that the coupling operators also need expression to be set, but i am not able to understand how a coupling operator actually operates as in what is it flow direction, because my geometries are dependent on the same variables temperature ; i cannot seem to connect them together. Also can I connect two geometries by creating identity pairs. Please guide it will be of great help. Thanks and take care.

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.