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.
mphglobal does not work when model has more than one solution/study?
Posted Dec 28, 2010, 4:13 a.m. EST RF & Microwave Engineering, Interfacing, Heat Transfer & Phase Change Version 4.1, Version 4.2 2 Replies
Please login with a confirmed email address before reporting spam
When I do a Mode Analysis (emw) in COMSOL with matlab I can extract the effective refractive index with
mphglobal(model, 'emw.neff'')
However, if I add another study like thermal stress (ts) to calculate the refractive index profile and then use that to find the modes, I can no longer extract emw.neff.
One would think that something like this should work:
mphglobal(model,'solname','sol2', 'emw.neff')
however mphglobal does not want to take 'solname' as an argument. But, as I was writing this I found that this helps:
[sz,ndofs,list,name,type]=mphgetp(model,'solname','sol2')
and then use "list" to calculate neff with
neff=real(1j*list/(2*pi/lambda0));
Done!
mphglobal(model, 'emw.neff'')
However, if I add another study like thermal stress (ts) to calculate the refractive index profile and then use that to find the modes, I can no longer extract emw.neff.
One would think that something like this should work:
mphglobal(model,'solname','sol2', 'emw.neff')
however mphglobal does not want to take 'solname' as an argument. But, as I was writing this I found that this helps:
[sz,ndofs,list,name,type]=mphgetp(model,'solname','sol2')
and then use "list" to calculate neff with
neff=real(1j*list/(2*pi/lambda0));
Done!
2 Replies Last Post Apr 1, 2012, 2:32 a.m. EDT