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 2016年8月16日 GMT-4 17:06 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 2016年8月30日 GMT-4 03:35