Robert Koslover
                                                                                                                                                    Certified Consultant
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                2 years ago                            
                            
                                2023年7月30日 GMT+2 21:07                            
                        
                        
                                                    I've attached an example .mph file that shows one way  (among other possibilities) to solve your problem.  It's also rather nice to see it yields the correct answer.  :)
    -------------------
    Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara                                                 
                                                
                            I've attached an example .mph file that shows one way  (among other possibilities) to solve your problem.  It's also rather nice to see it yields the correct answer.  :)
                        
                                                
                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                2 years ago                            
                            
                                2023年7月31日 GMT+2 04:21                            
                        
                        Updated:
                            
                                2 years ago                            
                            
                                2023年7月31日 GMT+2 04:22                            
                        
                        
                                                    Thank you Robert. This works excellently. I guess the mistake I was making was that I was trying to define the derivative by substituting α=-1, instead of β=1.
However, I do have a couple of questions which I would appreciate, if you could find the time to answer.
- Why does substituting α=-1 (instead of β=1) in the coefficient form PDE not work? If u is a regular valued function, div(u)=du/dx in 1D right? 
- Why does putting a zero flux condition at x=1 not cause an error, or produce incorrect results. 
Thanks in advance,
AR
                                                 
                                                
                            Thank you Robert. This works excellently. I guess the mistake I was making was that I was trying to define the derivative by substituting α=-1, instead of β=1.
However, I do have a couple of questions which I would appreciate, if you could find the time to answer.
1. Why does substituting α=-1 (instead of β=1) in the coefficient form PDE not work? If u is a regular valued function, div(u)=du/dx in 1D right?
2. Why does putting a zero flux condition at x=1 not cause an error, or produce incorrect results.
Thanks in advance,
AR                        
                                                
                                                                                                            
                                             
                                            
                            
                                                                                        
                                Robert Koslover
                                                                                                                                                    Certified Consultant
                                                         
                            
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                2 years ago                            
                            
                                2023年8月2日 GMT+2 04:33                            
                        
                        
                                                    Let's talk about your seond item first:  The (default) zero flux condition (if you look at the equation for it) involves a relationship among linear operations on c, alpha, and gamma.  But all of those coefficients are zero, in the example that I posted, so in that case, the "zero flux" condition doesn't impose any constraint.
Now, regarding your first item, if I were to instead set alpha = -1, then I could no longer ignore  that default flux boundary condition (per the comment above).  There is probably a way to make that still work (since a variety of other boundary conditions are available), but in my approach, that issue simply never arises. I chose what seemed to me to be the simplest approach.
    -------------------
    Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara                                                 
                                                
                            Let's talk about your seond item first:  The (default) zero flux condition (if you look at the equation for it) involves a relationship among linear operations on c, alpha, and gamma.  But *all* of those coefficients are zero, in the example that I posted, so in that case, the "zero flux" condition doesn't impose any constraint.
Now, regarding your first item, if I were to instead set alpha = -1, then I could no longer ignore  that default flux boundary condition (per the comment above).  There is probably a way to make that still work (since a variety of other boundary conditions are available), but in my approach, that issue simply never arises. I chose what seemed to me to be the simplest approach.                        
                                                
                                                                                                            
                                             
                        
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                2 years ago                            
                            
                                2023年8月2日 GMT+2 06:58                            
                        
                        
                                                    Thanks Robert. Addresses my queries.
Regards, AR
                                                 
                                                
                            Thanks Robert. Addresses my queries.
Regards, AR