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

Matlab script for effective modal mass extraction

$
0
0
Hi everbody,

as posted frequently in this forum, COMSOL does not provide effective modal masses in eigenfrequency analysis for structural analysis. But since effective masses are a very convenient way to determine critical modes from less critical ones, and since this information is often required for documentation, I wrote a Matlab script that extracts the effective masses from an eigenfrequency solution and exports them to an Excel file.

This is how it works:
1. Copy the attached matlab script to your disk (preferably to a directory that is already in the Matlab include path, e.g. C:\Users\...\Documents\MATLAB on windows).
2. Run COMSOL and do the eigenfrequency analysis there.
3. Save your COMSOL eigenfrequency analysis to an .mph file of your choice.
4. Connect COMSOL to Matlab (you don't need to export the fem object to Matlab though).
5. In Matlab, execute the attached effective_mass_analysis.m script (open/run or if located in the Matlab workspace simply type 'effective_mass_analysis' in the command window).
6. The script asks you which .mph file to open, calculates the effective masses and saves them to a Microsoft Excel spreadsheet (you will be prompted where to save it).

In the Excel file there are four different sheets: 'Total Masses', 'Effective Masses', 'Mass Fraction' and 'Cumulative Mass Fraction'. These results resemble the standard output of other FEM software, such as Ansys that provide effective mass output by default.

Unfortunately, this script does not work for large models since the matrix size that Matlab can handle is limited and it may also fail when more than one application mode is used. I have cross-checked the results with only one reference case from Ansys, so there is no guarantee that the script works correctly with all models. Any comments and suggestions are greatly appreciated.

Cheers,
Lars

Viewing all articles
Browse latest Browse all 107

Trending Articles



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