Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 428

Export Mesh of selected domain via MATLAB

$
0
0
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



Viewing all articles
Browse latest Browse all 428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>