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

Exporting matrices using Comsol Livelink to matlab

$
0
0
Hi,

I am working with a wave propagation problem in weak form( as given in the attached file). I have implemented the weak form in COMSOL and I solved the problem. That is perfectly fine.

I want to export the associated matrices to MATLAB for further use.
I read the section "Working with Matrices" in the LiveLink for MATLAB User's guide and I am using the "mphmatrix" function to extract matrices.
I thought, according to the documentation, the command
MA = mphmatrix(model,'sol1','out',{'K','E'}); gives me stiffness matrix MA.K and mass matrix MA.E ( cooresponding to the first and second integral, respectively, in equation (2) of the attached file).

BUT I AM NOT SURE IF THAT IS TRUE. Because mass matrix MA.E is a zero matrix of size(MA.K) and the stiffness matrix is not symmetric.

Moreover, I am looking to export boundary matrices corresponding to the integral over inlet-outlet boundary $\Gamma_{\textrm{io}} $ and interface boundary $\Gamma_{I} $.

I am looking for an idea how to export matrices cooresponding to each integral.

Thank you in advance,
Esu

Viewing all articles
Browse latest Browse all 428

Trending Articles



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