Author |
Message |
Steve Strand (srstrand)
Member Username: srstrand
Post Number: 4 Registered: 02-2006
| Posted on Tuesday, August 12, 2008 - 10:20 am: | |
I would like to model a filter. There will be two regions with laminar flow, and one region with porous media flow. I have set up a problem like this and it seems to work except that pressure oscillations cause instability. I am using the same pressure equation for both the laminar and porous regions. This method uses a penalty parameter to help stabilize convergence. Do you have any suggestions for a set of consistent equations for such a problem? Here is what I am using for this cylindrical problem. The regions are tagged with a scalar named is_fluid that is 1 in fluid, 0 in porous region. EQUATIONS { Radial Momentum equation } vr: is_fluid*(dens*[vr*dr(vr) + vz*dz(vr)] + dr(p) - visc*[div(grad(vr))-vr/r^2])+(1-is_fluid)*(vr+kperm/visc*dr(p))= 0 { Axial Momentum equation } vz: is_fluid*(dens*[vr*dr(vz) + vz*dz(vz)] + dz(p) - visc*[div(grad(vz))])+(1-is_fluid)*(vz+kperm/visc*dz(p))= 0 { Equation of state } p: is_fluid*(div(grad(p)) - penalty*div_v)+(1-is_fluid)*(div(kperm*grad(p))-penalty_porous*div_v) = 0
|
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 1155 Registered: 06-2003
| Posted on Tuesday, August 12, 2008 - 02:39 pm: | |
It would assist our analysis if you sent the whole script.
|
Steve Strand (srstrand)
Member Username: srstrand
Post Number: 5 Registered: 02-2006
| Posted on Tuesday, August 12, 2008 - 04:28 pm: | |
I've attached the whole script. This example works fairly well. When I make the filter longer, the pressure oscillates a great deal.
|
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 1157 Registered: 06-2003
| Posted on Tuesday, August 12, 2008 - 11:43 pm: | |
There are several inconsistencies in your equations, which can cause oscillation or poor convergence. 1) the term penalty*div_v is used in the pressure equation with Navier-Stokes equations to enforce incompressibility, div(velocity)=0. In the porous medium, this is not a valid equation. The fluid shares the space with the porous medium, and div(velocity) is not zero. In fact, using V=-(K/mu)*grad(P), div(V)=-div((K/mu)*grad(P)). So you don't want the penalty term in the porous medium. 2) You have applied the equation Vz=-(K/mu)*dz(P) in the porous medium, but demanded Vz=0 on the fluid/filter interface. These two are in conflict. Replace the BC on the interface with Value(Vz)=-(K/mu)*dz(P), for consistency with the interior equation. 3) The Galerkin finite element method forms nodal equations by integrating the PDEs over the mesh cells surrounding each node. The divergence theorem is applied to second-order divergence terms. This creates surface terms that represent the flow across each cell wall. FlexPDE assumes that these terms cancel at interior boundaries (equivalent to mass conservation). At the interface between the fluid and non-fluid regions, these terms do not cancel, as there are no such terms in the porous equation. The assumption of zero net surface terms means that at the interface -visc*dr(Vr)=0. This is not correct. You need to supply the actual fluid value to the integral by applying the BC Natural(Vr)=-visc*dr(Vr) at the bottom filter interface and Natural(Vr)=visc*dr(Vr) at the top filter interface. 4) The momentum terms (vr*dr(vr), etc) make the system nonlinear. Nonlinear systems use Newton's method for solution, and require a good starting estimate of the solution for efficient convergence. This can be provided by running the problem in two STAGEs. The first stage uses dens=0, so that the momentum terms are removed. The second stage turns on the nonlinear terms, using the solution of the linear system as a beginning estimate. 5) The penalty term is designed to enforce div(velocity)=0. But if the penalty term is too large, it can dominate the numerics and cause loss of convergence. In your problem, 1e2 is a more stable choice of multiplier than 1e3. After the system has converged to a reasonable solution, you can increase the penalty by use of STAGEs. We have applied these modifications in the attached script. With Length=40, this script converges in about 5 minutes, and the answers look reasonably smooth.
|
Steve Strand (srstrand)
Member Username: srstrand
Post Number: 6 Registered: 02-2006
| Posted on Thursday, August 21, 2008 - 03:00 pm: | |
Thank you very much for your excellent suggestions and your clear explanations. I was able to model a very long filter using this method with very reasonable computation times and smooth results that agree with expectations. |
|