Algorithm for coupled pde with all flux boundary conditions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 22, 2010, 14:37 Algorithm for coupled pde with all flux boundary conditions #1 Senior Member   Ben K Join Date: Feb 2010 Location: Ottawa, Canada Posts: 140 Rep Power: 13 Hi, I've been trying to figure this out for some time now. I have experience using Comsol and also OpenFOAM. Comsol seems to be able to solve the following type of 1D coupled problem on a domain x=[0:1] quite easily: PDE #1: div( D1 * grad(c1) ) = -(c2-c1) Boundary conditions: at x=0 D1*d(c1)/dx = -1 (flux boundary condition) at x=1 d(c1)/dx = 0 (zero gradient) PDE #2: div( D2 * grad(c2) ) = (c2-c1) Boundary conditions: at x=0 d(c2)/dx = 0 (zero gradient) at x=1 c2 = 0 (fixed value) (these are the parameter values that I used: D1=1000, D2=1e-2) At first glance this might seem simple enough (perhaps it is), but PDE #1 has two flux boundary conditions and so its solution could basically lie anywhere as long as the boundary conditions are met. Yet, when solving this in comsol, I get a solution that seems to make sense. Note that when solving PDE #1 without any coupling (ie. setting the source term to a constant value), the solution is very different. So my question is: How does Comsol (or any other pde solver) figure out what a proper reference value for c1 should be in this case? I'm not providing any reference value yet there is a solution to the above hypothetical model. Are there any good reference material that I can read concerning the solution of coupled pde's?

 December 23, 2010, 06:14 #2 Senior Member   Rami Ben-Zvi Join Date: Mar 2009 Posts: 152 Rep Power: 10 Hi Benk, If your PDEs are decoupled (e.g., use RHS=0 for the first, as you suggested) then the solution of PDE1 is indeed "floating" (i.e., determined only up to a constant) because of the two derivative BCs. However, since the PDEs are coupled, and since PDE2 has a Dirichlet BC, it fixes the solution for both. I am not familiar with COMSOL, so I can only guess that it gives you just one of the infinite soultions for the uncoupled PDE1, which probably is correct. If there is a way to fix one point within the domain in this case, the solution should be unique. Merry Chrismas and a Happy New Year, Rami

 December 27, 2010, 13:35 #3 Senior Member   Ben K Join Date: Feb 2010 Location: Ottawa, Canada Posts: 140 Rep Power: 13 Thanks for your reply. I'm wondering how this is actually implement in other codes. For example, in OpenFOAM, we can set a reference point for a floating solution. So I suppose a first estimate of this reference point for PDE 1 would be 0 (the fixed value of pde 2). Does this make sense? But then, setting the reference point to 0 won't give a converged solution, you'll have to essentially search for a better reference point by moving the reference point up or down until you find a converged solution. Are there any established "searching algorithms" for this sort of thing?

 December 28, 2010, 06:09 #4 Senior Member   Rami Ben-Zvi Join Date: Mar 2009 Posts: 152 Rep Power: 10 Hello Ben, I can't tell you how other codes are solving, so I'll stay on the principle level. Assuming your problem is well-defined (see my former reply), it can be solved directly (if linear) or iteratively. For the direct solution, there is no need for an initial guess (or reference value). For the iterative solution, you usually prescribe an initial guess (so the algorithm does not need to supply one for you) and then the iteration is taking care of updating the solution until convergence. If the algorithm is robust and the problem is well-behaved, it will not be much affected by your initial guess, except for doing more iterations for a poor guess. Otherwise, it is your responsibility to try to find a good initial fields. To this end, you may linearize the equations, use degenerate forms or use your gained experience. I hope I answered your question, Rami

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Saturn CFX 57 February 6, 2018 06:09 Anindya Main CFD Forum 25 February 27, 2016 13:58 Pascal_doran OpenFOAM Programming & Development 16 August 25, 2015 05:35 lost.identity Main CFD Forum 9 October 25, 2010 18:27 vaina74 Open Source Meshers: Gmsh, Netgen, CGNS, ... 2 May 27, 2010 09:38

All times are GMT -4. The time now is 22:11.