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                            
                            
                                14 févr. 2012, 14:54 UTC−5                            
                        
                        
                                                    Hi
normally you can call from the GUI an external matlab function check the Definition sub nodes. Then once solved you add a 3D plot for T and you select the appropriate time step when to plot for, in the main plot node (or have I muisunderstood something ? ;)
--
Good luck
Ivar                                                
                                                
                            Hi
normally you can call from the GUI an external matlab function check the Definition sub nodes. Then once solved you add a 3D plot for T and you select the appropriate time step when to plot for, in the main plot node (or have I muisunderstood something ? ;)
--
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                15 févr. 2012, 06:02 UTC−5                            
                        
                        
                                                    Hi Ivar,
thank you for your reply!
I think you misunderstood me - but that's my fault, I guess I should write less cryptically.. :-)
In hindsight I realize that my question is as simple as: How can I plot the heat source values (not the temperature)? 
What I've got so far: the heat source variable seems to be root.mod1.ht.Q. I can plot it, but then it shows all values as zero. So I suppose that the values of Q are not stored and that I need to specify somewhere that I would like them to be stored. Any idea how to do that?                                                
                                                
                            Hi Ivar,
thank you for your reply!
I think you misunderstood me - but that's my fault, I guess I should write less cryptically.. :-)
In hindsight I realize that my question is as simple as: How can I plot the heat source values (not the temperature)? 
What I've got so far: the heat source variable seems to be root.mod1.ht.Q. I can plot it, but then it shows all values as zero. So I suppose that the values of Q are not stored and that I need to specify somewhere that I would like them to be stored. Any idea how to do that?                        
                                                
                                                                                                            
                                             
                    
                    
                        
                            
                                                                                        
                                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                            
                            
                                15 févr. 2012, 07:19 UTC−5                            
                        
                        
                                                    Hi
Check the COMSOL variables available, there is more than "Q", you have specific ones for convective, heat source, normal, magnitude  etc. The best is to add the "preferences Equation View" and catch the variable name in the new (lowest level) subnode, then plot that. Or just plot your input function on the input BC 
--
Good luck
Ivar                                                
                                                
                            Hi
Check the COMSOL variables available, there is more than "Q", you have specific ones for convective, heat source, normal, magnitude  etc. The best is to add the "preferences Equation View" and catch the variable name in the new (lowest level) subnode, then plot that. Or just plot your input function on the input BC 
--
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                15 févr. 2012, 13:13 UTC−5                            
                        
                        
                                                    The equation view is a really good tip to explore all available variables. Thanks! 
Other than that, my problem is now: Whenever you try to plot a heat source that is defined by an external Matlab function, COMSOL reevaluates this function again. The heat source values are not stored in the solution set; COMSOL recomputes them when you create the plot. This is very unfortunate, because in my case the external function is *very* time-intensive.  Do you happen to know if there is any way to circumvent this behaviour( maybe by storing the heat source values in the solution set)?                                                
                                                
                            The equation view is a really good tip to explore all available variables. Thanks! 
Other than that, my problem is now: Whenever you try to plot a heat source that is defined by an external Matlab function, COMSOL reevaluates this function again. The heat source values are not stored in the solution set; COMSOL recomputes them when you create the plot. This is very unfortunate, because in my case the external function is *very* time-intensive.  Do you happen to know if there is any way to circumvent this behaviour( maybe by storing the heat source values in the solution set)?                        
                                                
                                                                                                            
                                             
                    
                    
    
                        
                            
                                                                                        
                                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                            
                            
                                15 févr. 2012, 15:11 UTC−5                            
                        
                        
                                                    Hi
Interesting remark, but it could be that COMSOL reevaluates the function at intermediate points to provide an interpolation, one way would be to generate a piecevise function once from the time steps of your function, and load it in once.
worth to try support, or to suggest a read once option. 
Now I havnt really played with external functions in malab, as with v4 I mostly manage to keep within the GUI, which is often faster, but there must be others out here that can come with better suggestions 
--
Good luck
Ivar                                                
                                                
                            Hi
Interesting remark, but it could be that COMSOL reevaluates the function at intermediate points to provide an interpolation, one way would be to generate a piecevise function once from the time steps of your function, and load it in once.
worth to try support, or to suggest a read once option. 
Now I havnt really played with external functions in malab, as with v4 I mostly manage to keep within the GUI, which is often faster, but there must be others out here that can come with better suggestions 
--
Good luck
Ivar