Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                2 decades ago                            
                            
                                2009/07/23 19:49 GMT-4                            
                        
                        
                                                    An update: I exported my model as an M-file, and found out where the conductivity was set (equ.sigma). I tried to very it in a for loop, but got inconsistent results. Then I include more of the M-file in the for loop and still got inconsistent results. Finally I went back to the first versioono without a loop and manually changed the conductivity in one subdomain - still inconsistent!. ANy ideas?
                                                
                                                
                            An update: I exported my model as an M-file, and found out where the conductivity was set (equ.sigma). I tried to very it in a for loop, but got inconsistent results. Then I include more of the M-file in the for loop and still got inconsistent results. Finally I went back to the first versioono without a loop and manually changed the conductivity in one subdomain - still inconsistent!. ANy ideas?
                        
                                                
                        
                                                
                                                                                                            
                                             
                                            
                            
                                                                                        
                                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:
                            
                                2 decades ago                            
                            
                                2009/07/24 12:47 GMT-4                            
                        
                        
                                                    Hi
I cannot open your model because you have most probably done a "reset model", then COMSOL (for "complex" geometry but this definition is internal to COMSOL) mostly saves the geometry separately, see your line:
flbinaryfile='circ3_1inc.mphm';
so pls add this file (perhaps there are others too), else it is tough for us others to understand, I'm still no that fluent in COMSOl internals with out any geoemtry ;)
To start with matlab/script and COMSOL, really do simple task, run a few (4-5) examples from the doc so you get used to the approach, dont give up, I remember I was very frustatrated in the beginning, but once you got the trick you'll love it.
Good luck
Ivar                                                
                                                
                            Hi
I cannot open your model because you have most probably done a "reset model", then COMSOL (for "complex" geometry but this definition is internal to COMSOL) mostly saves the geometry separately, see your line:
flbinaryfile='circ3_1inc.mphm';
so pls add this file (perhaps there are others too), else it is tough for us others to understand, I'm still no that fluent in COMSOl internals with out any geoemtry ;)
To start with matlab/script and COMSOL, really do simple task, run a few (4-5) examples from the doc so you get used to the approach, dont give up, I remember I was very frustatrated in the beginning, but once you got the trick you'll love it.
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                        
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                2 decades ago                            
                            
                                2009/07/27 11:49 GMT-4                            
                        
                        
                                                    Place the for loop in the beginning of your m-file. Put your variable inside the equ.sigma definition.
Example:
conduct = [0.001 0.01 0.1 1 10 100 1000];
for o = 1:length(conduct)
cond = conduct(o)
<- beginning of COMSOl m-file ->
...
clear equ
equ.sigma = {1.11,cond,3.33,4.44};
equ.ind = [1,2,3,4];
appl.equ = equ;
...
<- end of COMSOl m-file ->
end
That worked for me.
Greetz,
Maarten.                                                
                                                
                            Place the for loop in the beginning of your m-file. Put your variable inside the equ.sigma definition.
Example:
conduct = [0.001 0.01 0.1 1 10 100 1000];
for o = 1:length(conduct)
cond = conduct(o)
...
clear equ
equ.sigma = {1.11,cond,3.33,4.44};
equ.ind = [1,2,3,4];
appl.equ = equ;
...
end
That worked for me.
Greetz,
Maarten.