Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/02/02 7:55 GMT-5                            
                        
                        
                                                    Hi,
I did not work with the RF module so far, but I already accessed solutions of models in Matlab.
In Matlab, you should add the path  /COMSOL_INSTALLATION_PATH/Comsol41/mli
Then execute: mphstart
You might have to do this as well:
import com.comsol.model.*
import com.comsol.model.util.* 
Finally, in Comsol: File -> Export Model to Server
In Matlab: model = ModelUtil.model('NAME');  where NAME is the name you assigned when exporting from Comsol.
Now you can access any variables of the solution of your model with:
model_data = mpheval(model, 'VARIABLE', 'edim',3, 't',1000,'Solnum',1,'refine',1); where VARIABLE is the variable you want to access.
(you should adjust this command to your needs).
Hope this helps,
Juergen
                                                
                                                
                            Hi,
I did not work with the RF module so far, but I already accessed solutions of models in Matlab.
In Matlab, you should add the path  /COMSOL_INSTALLATION_PATH/Comsol41/mli
Then execute: mphstart
You might have to do this as well:
import com.comsol.model.*
import com.comsol.model.util.* 
Finally, in Comsol: File -> Export Model to Server
In Matlab: model = ModelUtil.model('NAME');  where NAME is the name you assigned when exporting from Comsol.
Now you can access any variables of the solution of your model with:
model_data = mpheval(model, 'VARIABLE', 'edim',3, 't',1000,'Solnum',1,'refine',1); where VARIABLE is the variable you want to access.
(you should adjust this command to your needs).
Hope this helps,
Juergen
                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/02/02 8:28 GMT-5                            
                        
                        
                                                    I am using comsol 3.4 and not 4.x. I can't seem to find the folder called mli in the path you specified. 
                                                
                                                
                            I am using comsol 3.4 and not 4.x. I can't seem to find the folder called mli in the path you specified. 
                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/02/02 9:35 GMT-5                            
                        
                        
                                                    My last time working with v3.5 is a while ago and my old matlab scripts are on another computer.
If I remember correctly, you don't have to add a path in matlab then.
You can export the fem structure and it should appear in your matlab workspace then.
The command you might use to access the variables could be "postinterp" for example.
I don't remember the syntax, but maybe you find an explanation in the comsol documentation of the matlab interface.
Good luck,
Juergen                                                
                                                
                            My last time working with v3.5 is a while ago and my old matlab scripts are on another computer.
If I remember correctly, you don't have to add a path in matlab then.
You can export the fem structure and it should appear in your matlab workspace then.
The command you might use to access the variables could be "postinterp" for example.
I don't remember the syntax, but maybe you find an explanation in the comsol documentation of the matlab interface.
Good luck,
Juergen                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/02/03 12:02 GMT-5                            
                        
                        
                                                    Thanks for your help but I couldn't get it to work. I guess Comsol is quite difficult to use for photonics. Please let me know if there are any options.                                                 
                                                
                            Thanks for your help but I couldn't get it to work. I guess Comsol is quite difficult to use for photonics. Please let me know if there are any options.                         
                                                
                                                                                                            
                                             
                    
                    
                        
                            
                                                                                        
                                Ivar KJELBERG
                                                                                                                                                    COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/02/03 13:55 GMT-5                            
                        
                        
                                                    Hi
in v4.1 I find it rather easy and very instructuve to do RF/optics calculations, but I agree you need a very dense mesh, and a powerfull PC
--
Good luck
Ivar                                                
                                                
                            Hi
in v4.1 I find it rather easy and very instructuve to do RF/optics calculations, but I agree you need a very dense mesh, and a powerfull PC
--
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/02/04 10:21 GMT-5                            
                        
                        
                                                    Kindly help me out with parsing contents of the solution variable (effective index) in comsol to any variable in matlab. I think Comsol should be made easier like other softwares. We have invested a lot of money into comsol but cannot really make good use of it because of how difficult it is to do simple tasks. 
Any help in resolving this issue is welcomed. 
Thanks                                                
                                                
                            Kindly help me out with parsing contents of the solution variable (effective index) in comsol to any variable in matlab. I think Comsol should be made easier like other softwares. We have invested a lot of money into comsol but cannot really make good use of it because of how difficult it is to do simple tasks. 
Any help in resolving this issue is welcomed. 
Thanks                        
                                                
                                                                                                            
                                             
                    
                    
                        
                            
                                                                                        
                                Ivar KJELBERG
                                                                                                                                                    COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/02/04 13:34 GMT-5                            
                        
                        
                                                    Hi
And me, that is so pleased with COMSOL as it is so much easier to use, and more powerfull, not to say cheaper than the heavy but excellent, well known FEM programme I used before ! Obviously it all depends from where we come and what we are doing.
Unfortunately I connot really help much for your issue, as I have dropped 3.5 for more than a year now, and with V4 I do not need matlab any more (and the new way to interface Matlab requires time that I do not have had yet, to learn it all over again). I agree that this is annoying, but on the other side, COMSOL can do so many things that no other software can, that I know about, that it is just marlvellous to use (for me ;). each day I'm saying to myself: what if I had had something like that 30 years ago when I was studying physics !
So I believe you should go through the doc again, in V4 you have also the "table export" direct into a txt file or an Excel file
--
Good luck
Ivar                                                
                                                
                            Hi
And me, that is so pleased with COMSOL as it is so much easier to use, and more powerfull, not to say cheaper than the heavy but excellent, well known FEM programme I used before ! Obviously it all depends from where we come and what we are doing.
Unfortunately I connot really help much for your issue, as I have dropped 3.5 for more than a year now, and with V4 I do not need matlab any more (and the new way to interface Matlab requires time that I do not have had yet, to learn it all over again). I agree that this is annoying, but on the other side, COMSOL can do so many things that no other software can, that I know about, that it is just marlvellous to use (for me ;). each day I'm saying to myself: what if I had had something like that 30 years ago when I was studying physics !
So I believe you should go through the doc again, in V4 you have also the "table export" direct into a txt file or an Excel file
--
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/11/18 8:41 GMT-5                            
                        
                        
                                                    Hi,
I use comsol 3.5 and I don't know the command to extract n_eff from RF module but with fem structure, I think it is quite easy. Just extract sol from fem.sol.lambda for example and calculate n_eff via beta/k0. Anyway, you can access to all variables solution in fem.sol.
Regards                                                
                                                
                            Hi,
I use comsol 3.5 and I don't know the command to extract n_eff from RF module but with fem structure, I think it is quite easy. Just extract sol from fem.sol.lambda for example and calculate n_eff via beta/k0. Anyway, you can access to all variables solution in fem.sol.
Regards                        
                                                
                                                                                                            
                                             
                    
                    
    
                        
                            
                                                                                        
                                Ivar KJELBERG
                                                                                                                                                    COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                2011/11/18 10:19 GMT-5                            
                        
                        
                                                    Hi
all that is getting very old, I do remember there was something in one of the doc, or the model library examples exactly on n_eff. but I'm also almost sure we discussed this on the FORUM a couple of years ago. have you tried a search with n_eff ?
--
Good luck
Ivar                                                
                                                
                            Hi
all that is getting very old, I do remember there was something in one of the doc, or the model library examples exactly on n_eff. but I'm also almost sure we discussed this on the FORUM a couple of years ago. have you tried a search with n_eff ?
--
Good luck
Ivar