Edgar J. Kaiser
                                                                                                                                                    Certified Consultant
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                6 years ago                            
                            
                                2019年10月4日 GMT+8 18:11                            
                        
                        
                                                    Stefanie,
you may consider to run two time dependent study steps in a sequence with adapted time stepping settings. The second step taking the result of the first step as the initial condition.
Cheers
Edgar
    -------------------
    Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com                                                 
                                                
                            Stefanie,
you may consider to run two time dependent study steps in a sequence with adapted time stepping settings. The second step taking the result of the first step as the initial condition. 
Cheers
Edgar                        
                                                
                                                                                                            
                                             
                                            
                            
                                                                                        
                                Henrik Sönnerlind
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                6 years ago                            
                            
                                2019年10月4日 GMT+8 21:27                            
                        
                        Updated:
                            
                                6 years ago                            
                            
                                2019年10月4日 GMT+8 21:32                            
                        
                        
                                                    Hi,
Maybe you can use Maximum step constraint = Expression and Times to store = Steps taken by solver
As expression you use something related to the expression that triggers the event. A potential problem is that if the solver takes very small time steps somewhere for numerical reasons, you can get a lot of solutions stored.
If the amount of data you generate is a problem, take a look at Store time derivatives, Store reaction forces, and maybe even not storing results for the whole model (Store fields in ouput)
Regards,
Henrik
    -------------------
    Henrik Sönnerlind
COMSOL                                                
 
                                                
                            Hi,
Maybe you can use **Maximum step constraint** = **Expression** and **Times to store** = **Steps taken by solver**
As *expression* you use something related to the expression that triggers the event. A potential problem is that if the solver takes very small time steps somewhere for numerical reasons, you can get a lot of solutions stored.
If the amount of data you generate is a problem, take a look at **Store time derivatives**, **Store reaction forces**, and maybe even not storing results for the whole model (**Store fields in ouput**)
Regards,  
Henrik                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                6 years ago                            
                            
                                2019年10月7日 GMT+8 14:45                            
                        
                        
                                                    Thank you both,
to separate the simulation in multiple steps was not possible, because the time steps respectively the end time do not change during the step.
To use an expression as an maximum step has speeded up the simulation by a factor of 2.5. But the stored time steps is almost the same due to very small time steps when switching between the processes. My main problem here is not the memory space (the models are about 2GB large), but that the evaluation with derived values. This takes more than half an hour due to several integrations over the entire model.
Would it be possible to keep the  "Steps taken by solver" setting, but to define a minimum time step to be stored?
Regards 
Stefanie
                                                 
                                                
                            Thank you both,
to separate the simulation in multiple steps was not possible, because the time steps respectively the end time do not change during the step.
To use an expression as an maximum step has speeded up the simulation by a factor of 2.5. But the stored time steps is almost the same due to very small time steps when switching between the processes. My main problem here is not the memory space (the models are about 2GB large), but that the evaluation with derived values. This takes more than half an hour due to several integrations over the entire model.
Would it be possible to keep the  "Steps taken by solver" setting, but to define a minimum time step to be stored? 
Regards 
Stefanie                        
                                                
                                                                                                            
                                             
                        
                        
                            
                                                                                        
                                Henrik Sönnerlind
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                6 years ago                            
                            
                                2019年10月8日 GMT+8 02:57                            
                        
                        
                                                    Hi Stefanie,
If you have a reasonable idea about when the event is triggered, you can use Times to store = Specified values and then use two range expressions for the time step, like
range(0, long_step, it_will_soon_happen) range(it_will_soon_happen + short_step, short_step, end_time)
Regards,
Henrik
    -------------------
    Henrik Sönnerlind
COMSOL                                                
 
                                                
                            Hi Stefanie,
If you have a reasonable idea about when the event is triggered, you can use **Times to store** = **Specified values** and then use two range expressions for the time step, like
range(0, long_step, it_will_soon_happen) range(it_will_soon_happen + short_step, short_step, end_time)
Regards,  
Henrik