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                            
                            
                                Nov 30, 2011, 11:12 a.m. EST                            
                        
                        
                                                    Hi
I'm not sure this is the reply, but it could be thatphi is already used by COMSOL, have you tried a more "personal" name such as "phi_" or "phi0" ?
COMSOl does allow to change internal variables, and does not always flag it as an error, as sometimes it's "on purpouse" that a user redefines them, but you better know what you are doing then ...
--
Good luck
Ivar                                                
                                                
                            Hi
I'm not sure this is the reply, but it could be thatphi is already used by COMSOL, have you tried a more "personal" name such as "phi_" or "phi0" ?
COMSOl does allow to change internal variables, and does not always flag it as an error, as sometimes it's "on purpouse" that a user redefines them, but you better know what you are doing then ...
--
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                Nov 30, 2011, 1:35 p.m. EST                            
                        
                        
                                                    Hi Ivar,
Thanks for the response, but I have this problem whatever I use as a variable name. 
It seems to me that this isn't a complecated request, changing something's position with time, or changing the value of a BC with time or something like that. 
What seems odd is that when I type the expression "360*t" (for example) into the variables tab it recognises "t" as the time variable fine, and asigns it the correct unit (seconds). So everything seems fine there, but when you try to enter it in a field for say, voltage, or whatever you get this "unknown model parameter" error. 
[EDIT - Actually, it works fine for a voltage, but not anything in a geometry node. Perhaps COMSOL won't allow time-varying geometries as such, having to do with remeshing each time-point or something??]
Confusing. Anyone got any ideas?
Dom.                                                
                                                
                            Hi Ivar,
Thanks for the response, but I have this problem whatever I use as a variable name. 
It seems to me that this isn't a complecated request, changing something's position with time, or changing the value of a BC with time or something like that. 
What seems odd is that when I type the expression "360*t" (for example) into the variables tab it recognises "t" as the time variable fine, and asigns it the correct unit (seconds). So everything seems fine there, but when you try to enter it in a field for say, voltage, or whatever you get this "unknown model parameter" error. 
[EDIT - Actually, it works fine for a voltage, but not anything in a geometry node. Perhaps COMSOL won't allow time-varying geometries as such, having to do with remeshing each time-point or something??]
Confusing. Anyone got any ideas?
Dom.                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                Nov 30, 2011, 1:40 p.m. EST                            
                        
                        
                                                    Ivar,
I seem to remember one of your responses mentioning that time (t) is not available to COMSOL as a variable until you call the time-dependant solver. Could this be related? If so, how would you get round that, given that I can't start my solver without resolving the unknown model parameter error?
I'm getting pretty good at getting round roadblocks with Comsol these days, but this one has stumped me.                                                
                                                
                            Ivar,
I seem to remember one of your responses mentioning that time (t) is not available to COMSOL as a variable until you call the time-dependant solver. Could this be related? If so, how would you get round that, given that I can't start my solver without resolving the unknown model parameter error?
I'm getting pretty good at getting round roadblocks with Comsol these days, but this one has stumped me.                        
                                                
                                                                                                            
                                             
                        
                        
                            
                                                                                        
                                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                            
                            
                                Nov 30, 2011, 2:27 p.m. EST                            
                        
                        
                                                    Hi
I was just following your idea there, while readingyour question. Indeed, if you add a stationary solver and ten a time dependent one, there is no "t" defined in the first stationary solver run, so for that add a Definition Parameter t=0[s] and off you go
Pls do not forget that time dependent BC work best when the functions are smooth (or derivable, do you say that in English, it's probably a poor French half translation). COMSOl estimtes the derivatives of the solution for next through in the solving process, so if you use boolean conditions or abs(), max() or other non-continuous operators, the solver might have problems and will not converge, or only with difficulties, hence you loose time.
Another point, if you use Parameters for solver "continuation" then these should be without units, and in the BC you just multiply them by a unit dimension
--
Good luck
Ivar                                                
                                                
                            Hi
I was just following your idea there, while readingyour question. Indeed, if you add a stationary solver and ten a time dependent one, there is no "t" defined in the first stationary solver run, so for that add a Definition Parameter t=0[s] and off you go
Pls do not forget that time dependent BC work best when the functions are smooth (or derivable, do you say that in English, it's probably a poor French half translation). COMSOl estimtes the derivatives of the solution for next through in the solving process, so if you use boolean conditions or abs(), max() or other non-continuous operators, the solver might have problems and will not converge, or only with difficulties, hence you loose time.
Another point, if you use Parameters for solver "continuation" then these should be without units, and in the BC you just multiply them by a unit dimension
--
Good luck
Ivar