Sergei Yushanov
                                                                                                                                                    Certified Consultant
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                28 lug 2014, 07:58 GMT-4                            
                        
                        
                                                
                            Nikita,
Have you seen this blog?
http://www.comsol.com/blogs/join-solutions-comsol-multiphysics/
Regards,
Sergei                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                6 ago 2014, 10:56 GMT-4                            
                        
                        
                                                    Sergei,
Thanks for your reply. Unfortunately this new feature looks like having a lot of bugs, making it useless for me:
    with() operator doesn't work with data2
    intop(data2(u)) gives out an error
The worst is that you can't join two data sets of eigenvalue problem solutions (probably any data sets with more than one solution):
     if you try to join both with all solutions it just gives out an error
     if you join first dataset with "all" and the second one with "one", you can't get to other solutions from second dataset
     if you join first dataset with "one" and the second one with "all", Comsol gives out errors while making tables
The problem is that it also can not join more then two datasets. Well, you can join a data set with join, but again you will loose access to some eigenfunctions and probably get a lot of errors.
Meanwhile, I need to calculate something like intop(u*v*h), where u, v, h are solutions of three different eigenvalue problems, for all combinations of eigenfunctions.
                                                
                                                
                            Sergei,
Thanks for your reply. Unfortunately this new feature looks like having a lot of bugs, making it useless for me:
    with() operator doesn't work with data2
    intop(data2(u)) gives out an error
The worst is that you can't join two data sets of eigenvalue problem solutions (probably any data sets with more than one solution):
     if you try to join both with all solutions it just gives out an error
     if you join first dataset with "all" and the second one with "one", you can't get to other solutions from second dataset
     if you join first dataset with "one" and the second one with "all", Comsol gives out errors while making tables
The problem is that it also can not join more then two datasets. Well, you can join a data set with join, but again you will loose access to some eigenfunctions and probably get a lot of errors.
Meanwhile, I need to calculate something like intop(u*v*h), where u, v, h are solutions of three different eigenvalue problems, for all combinations of eigenfunctions.
                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                1 ott 2014, 13:09 GMT-4                            
                        
                        
                                                    You can use one study with two solvers. In the first solver, you'd solve for one physics, in the second solver you'd solve for the second physics. In the second solver, however, under the "Values of Dependent Variables", go to "Variables not solved for" and change the method to Solution. This way the second solver will save the solution of the first solver and you will have access to both solutions at the same time.                                                
                                                
                            You can use one study with two solvers. In the first solver, you'd solve for one physics, in the second solver you'd solve for the second physics. In the second solver, however, under the "Values of Dependent Variables", go to "Variables not solved for" and change the method to Solution. This way the second solver will save the solution of the first solver and you will have access to both solutions at the same time.                        
                                                
                                                                                                            
                                             
                    
                    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                24 lug 2015, 16:01 GMT-4                            
                        
                        
                                                    Hossein,
yes, probably it should work like that. But unfortunately in this case you also loose access to the eigenvalues of the first solution. There is an option ``All'' in the menu for eigenfrequencies under variables not solved for, but it doesn't work (the effect is as you choose ``first''). Probably it's a bug.                                                
                                                
                            Hossein,
yes, probably it should work like that. But unfortunately in this case you also loose access to the eigenvalues of the first solution. There is an option ``All'' in the menu for eigenfrequencies under variables not solved for, but it doesn't work (the effect is as you choose ``first''). Probably it's a bug.                        
                                                
                                                                                                            
                                             
                    
                    
                        
                            
                                                                                        
                                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                            
                            
                                26 lug 2015, 15:21 GMT-4                            
                        
                        
                                                    Hi
You have the built-in operators (see Help) :
"with(index_into_current_solution,variable)"        and 
"at(time_step_of_urrent_solution,variable) 
but also the new v5 operator (not sure it's in v4) :
"withsol('solution_tag',variable)" 
to index into a given (of many) Data Sets.
Else you are probably better off using the link to Matlab to perform such operations.
You can have different eigenfrequency Solver Nodes under the same Study, but I do not see what that would help, i.e. a combination stationary+eigenfrequncy is typically what COMSOL uses for a pre-stressed loaded eigenfrequency study, in which case it adds a "Store Solution" sub-node between the two solver sequences to force COMSOL to store the first solver results to the file, and to be able to reuse these results as initial values, but this is not what I understand you are doing here. You might always add y Store solution manually in the solver sequence, if COMSOL does not add it by itself. One caveat: COMSOL notes that you are messing with the default solver settings, therefore if you later update the physics, COMSOL will not update the solver settings automatically, since once you edit them COMSOL considers you will continue to edit them at best ! Then its better to make a new solver sequence, or to reset the solver sequence.
--
Good luck
Ivar                                                
                                                
                            Hi
You have the built-in operators (see Help) :
"with(index_into_current_solution,variable)"        and 
"at(time_step_of_urrent_solution,variable) 
but also the new v5 operator (not sure it's in v4) :
"withsol('solution_tag',variable)" 
to index into a given (of many) Data Sets.
Else you are probably better off using the link to Matlab to perform such operations.
You can have different eigenfrequency Solver Nodes under the same Study, but I do not see what that would help, i.e. a combination stationary+eigenfrequncy is typically what COMSOL uses for a pre-stressed loaded eigenfrequency study, in which case it adds a "Store Solution" sub-node between the two solver sequences to force COMSOL to store the first solver results to the file, and to be able to reuse these results as initial values, but this is not what I understand you are doing here. You might always add y Store solution manually in the solver sequence, if COMSOL does not add it by itself. One caveat: COMSOL notes that you are messing with the default solver settings, therefore if you later update the physics, COMSOL will not update the solver settings automatically, since once you edit them COMSOL considers you will continue to edit them at best ! Then its better to make a new solver sequence, or to reset the solver sequence.
--
Good luck
Ivar                        
                                                
                                                                                                            
                                             
                    
                    
    
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                27 lug 2015, 03:56 GMT-4                            
                        
                        
                                                    Ivar, thanks for your answer.
The "with" and "at" operators have been already discussed and showed no use in this situation as they work only inside given solution (or data set).
Till now I have been using MatLab for the problem, but it was not efficient as involved data export.
However, the new "withsol" function is exactly what I need. So finally they made it in version 5, good news :- )
Thank you for the precise answer again.                                                
                                                
                            Ivar, thanks for your answer.
The "with" and "at" operators have been already discussed and showed no use in this situation as they work only inside given solution (or data set).
Till now I have been using MatLab for the problem, but it was not efficient as involved data export.
However, the new "withsol" function is exactly what I need. So finally they made it in version 5, good news :- )
Thank you for the precise answer again.