Triangular mesh conversion from MATLAB to NASTRAN (ASCII) format and vice versa
The zipped package includes four scripts used for triangular mesh conversion from MATLAB to NASTRAN (ASCII) format and vice versa. The NASTRAN format is importable to commercial FEM solvers such as ANSYS/Ansoft.
Content:
nastranmat.m
% Reads a triangular mesh in NASTRAN ASCII format and saves it as a *.mat file.
meshviewer.m
% Plots a triangular mesh: edges, curvature, outer normal vectors
matnastran.m
% Reads a MATLAB (*.mat file) triangular mesh and saves it in ASCII NASTRAN format as a *.nas file.
normalcheck.m
% Checks if the outer normal vectors of the triangular mesh follow the right-hand rule. If they do not, the script rearranges triangle vertices accordingly.
brain_low.nas
% Low-resolution brain model from the Visible Human Project (female) in NASTRAN (ASCII) format used as an example.
Unpack the package and run the scripts following the above sequence. More open-source mesh examples are available at http://www.nevaelectromagnetics.com/.
Cite As
Sergey Makarov (2024). Triangular mesh conversion from MATLAB to NASTRAN (ASCII) format and vice versa (https://www.mathworks.com/matlabcentral/fileexchange/39033-triangular-mesh-conversion-from-matlab-to-nastran-ascii-format-and-vice-versa), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.