Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
Problem with Livelink for Matlab
Posted 27.04.2015, 17:09 GMT-4 Interfacing, Structural Mechanics Version 4.4 0 Replies
Please login with a confirmed email address before reporting spam
I have been working with Livelink for Matlab to perform Monte Carlo simulations of a vibrating string. I built the model in COMSOL and defined elastic supports for the cable using the Spring Foundation available. I saved the model both as .mph and .m file. I considered the spring's constants (K) as random variables. I generated 600 values of K by mean of a Probability Density Function (PDF) Gamma in Livelink for Matlab. After that, I used the generated values to run the COMSOL model using the m-file in a loop, for each value of K. I stored in Matlab the resulting first three eigenfrequencies.
Everything worked fine for the first two frequencies but I had some trouble with the third one. The thing is that for some values of K, the magnitude of the calculated third frequency is higher than the one corresponding to a cable fixed at its ends (K=infinity). To illustrate this I attach PDFs of F1, F2 and F3 constructed with the data obtained. Note that in the graphs corresponding to the first and second frequency, the vertical line is never exceeded, whereas in the plot correponding to the third is.
I tried some things and I got curious results. I list them below:
1. Those values of K that generate wrong values of F3, produce correct values of F1 and F2. By correct I mean lower than the ones corresponding to a cable fixed at its ends.
2. I selected the problematic values of K, introduced them one by one in the COMSOL GUI and run the model. The magnitude of the third frequency (F3) obtained was correct and lower than the one corresponding to a cable fixed at its ends.
3. I selected the problematic values of K and generated a new vector with only those particular values. I run the COMSOL model form Matlab, using that new vector of problematic Ks. In that case, I got correct values: the same values of F3 that I got when I introduced them one by one in the COMSOL GUI (Item 2).
Can someone figure out what is causing this problem here?
Thanks in advance;
Bruno Rango.
Hello Bruno Rango
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.