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.
Export Mesh of selected domain via MATLAB
Posted Aug 16, 2016, 5:06 p.m. EDT Interfacing, Mesh Version 5.2, Version 5.2a 2 Replies
Please login with a confirmed email address before reporting spam
Dear all,
I'm currently working on a simulation approach which requires to export the COMSOL-mesh to a Abaqus Inputfile (.inp). Fortunately I already have some code lines that allows me to do so, since I have zero programming experience.
The problem with the exisiting code is, that it only writes out ~3000 nodes of the COMSOL-mesh regardless of the mesh settings (e.g. if I set the mesh to "very fine" it exports the same number of nodes as with "fine").
I think that this is caused by the function mpheval which is used. I tried to use mphmeshstats instead but couldn't get it to work.
What I need is quite simple. After some information lines the code should write out the node numbers of a selected domain (via domain numbers) and the corresponding coordinates x,y,z separated by a decimal comma. This is followed by another text line: *Elements, type=C3D10, elset=set1
After that the element numbers and information gets written. Finally some material definitions are set (not important).
I attached the existing code as MATLAB and Document to make sure that you can open it. Additionally I upload a example of how the Inputfile should look like at the end.
Anyone knows how to export the mesh properly? The export function which is implemented in COMSOL doesn't help, because you can't export a Abaqus Inputfile.
Thank you very much for your help!!
Best regards,
Maximilian
I'm currently working on a simulation approach which requires to export the COMSOL-mesh to a Abaqus Inputfile (.inp). Fortunately I already have some code lines that allows me to do so, since I have zero programming experience.
The problem with the exisiting code is, that it only writes out ~3000 nodes of the COMSOL-mesh regardless of the mesh settings (e.g. if I set the mesh to "very fine" it exports the same number of nodes as with "fine").
I think that this is caused by the function mpheval which is used. I tried to use mphmeshstats instead but couldn't get it to work.
What I need is quite simple. After some information lines the code should write out the node numbers of a selected domain (via domain numbers) and the corresponding coordinates x,y,z separated by a decimal comma. This is followed by another text line: *Elements, type=C3D10, elset=set1
After that the element numbers and information gets written. Finally some material definitions are set (not important).
I attached the existing code as MATLAB and Document to make sure that you can open it. Additionally I upload a example of how the Inputfile should look like at the end.
Anyone knows how to export the mesh properly? The export function which is implemented in COMSOL doesn't help, because you can't export a Abaqus Inputfile.
Thank you very much for your help!!
Best regards,
Maximilian
Attachments:
2 Replies Last Post Aug 30, 2016, 3:35 a.m. EDT