Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Finite Elements for Fluids P1+P1 P2+P1
Posted Apr 18, 2013, 2:10 p.m. EDT Fluid & Heat, Computational Fluid Dynamics (CFD) Version 4.3, Version 4.3a 15 Replies
Please login with a confirmed email address before reporting spam
Comsol sets P1+P1 elements as default for laminar flow described by Navier-Stokes equations. As far as I know, theoretically, these elements are not good for such equations. Instead, P2+P1, or P2IsoP1 should be used. But Comsol uses those for creeping (Stokes) flow.
Is the comsol's P1+P1 choice stabilized in some way such that it can be used for Navier-Stokes?
I appreciate any hint.
Thank you
Please login with a confirmed email address before reporting spam
I do agree that P2+P1 is a better choice, because it gives you a quadratic basis for all variables except pressure (good reasons for leaving pressure at linear basis) which is much more accurate. However, the price you pay is a significant jump in degrees of freedom, hence, computer resources in order to solve.
So, COMSOL has provided a good default to get you started. With a click of the mouse, you can switch over to higher accuracy. I typically might do this after a converged P1+P1 to see if it changes my results. If it does not change, then I can keep using P1+P1 for my problem.
You can also go beyond P2+P1, and also use higher mesh density to increase accuracy as well.
All good choices !
Please login with a confirmed email address before reporting spam
Thank's a lot for your answer.
I agree with your comments about the degrees of freedom and the associated precision, but I don't understand why do you consider P1-P1 good for Navier Stokes.
As far as I understood, such elements can lead to multiple pressure solutions. This phenomena is known as the spurious pressure. Some references include this in the spurious mode topic. Usually stabilization techniques are required if we want to keep the linear elements also for the velocity. Does Comsol include such a stabilization method by default when dealing with Navier Stokes?
Please login with a confirmed email address before reporting spam
check the stabilisation tub in the CFD physics (you might need to turn ON the options preferences show all or advanced or ...)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
you have an interesting question!
Comsol uses two different well-known stabilization techniques: streamline and crosswind. You can see and eventually deactivate them. If you ever had the chance to work with Livelink, you could easily inspect that Comsol adds in the coefficient matrices the terms due to stabilization.
P1+P1 elements are far from being good elements; thought, they are chosen as default, probably just because are a "good compromise" or simply are the cheapest element (of course in terms of DOFs). Anyway, the elements we can choose are only Lagrange elements, even P2+P1 conceptually won't really make big differences... I don't really know much on spurious pressure, but mind that these "combinations" of Lagrange elements allow you to have continuous pressure (but discontinuous gradient) between the elements. What spurious pressure phenomena are due to?
To conclude, if you look for stabilized solution Comsol does provide them. You'll pay in terms of computational cost adding some nonlinearity and some offdiagonal terms in the coefficient matrices, but these are necessary also due to the nature of the PDE's ( Navier-Stokes) that you're solving.
Hope it helps,
Mattia
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
P1+P1 are "good" elements, because you can obtain a solution for the least cost (DOFs).
..Points of view ;)
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
My question can now be resumed to:
Do the stabilization techniques, crosswind and streamline, implemented in comsol, which are meant to deal with with advection-diffusion equations, also deal with the fact that P1+P1 elements do not verify the Babuska-Brezzi inf-sup condition?
If not, I can not be sure that the pressure is correct (if I don't know how the solution behaves) .
I didn't identify any spurious effects yet, but my simulations are prediction oriented, so I would like to trust on the convergence of the method implemented by comsol. Of course I can compare the solutions obtained with P2+P1 with the ones obtained by P1+P1, but it would be much easier to trust in comsol concerning this.
Thank you in advance.
Jorge
Please login with a confirmed email address before reporting spam
I think this would be an excellent question for the COMSOL tech support to enter into the conversation. I don't know the answer to this specific question, but I could recommend some tests that might help.
If you have a simple problem that will reveal this issue, you could set this up in COMSOL.
Then you can completely disable all the stabilization that is enabled by default; i.e., turn off the consistent stabilization, and the in-consistent stabilization is not enabled by default.
The default discretization is P1+P1.
Run the problem and verify that you have the B-B I-S condition are not verified in your results.
Next you could either enable consistent stabilization, and/or, P2+P1 discretization, etc. , re-run and find the combination that corrects the problem.
So far, I have not seen a problem in COMSOL that is solved inconsistently because the finite-element method used in the code will always be consistent with the equations you define. As long as the governing equations are defined correctly, the consistent stabilization method used in COMSOL should prevent inconsistent results. If you find out otherwise, please let us know in this forum.
Please login with a confirmed email address before reporting spam
I appreciate the discussion, and I'm interested to know the outcome too,
And I do agree too, that some help from the COMSOL CFD Godfathers could help us to get there quicker
--
Having fun COSMOLing
Ivar
Please login with a confirmed email address before reporting spam
it is correct that P1+P1 elements do not fulfill the Babuska-Brezzi condition, unless proper streamline stabilization is applied. The streamline stabilization that is active per default in COMSOL is such a stabilization. Crosswind diffusion does not help in circumventing the Babuska-Brezzi condition, neither does isotropic diffusion. Hence, if you select to disable the streamline diffusion, then you need to increase the element order.
The mathematical derivation to how streamline stabilization circumvents the Babuska-Brezzi condition can be found in the following reference:
T.J.R. Hughes, L.P. Franca and M. Balestra, "A new finite element formulation for computational fluid dynamics: V. Circumventing the Babuska-Brezzi condition: A stable Petrov-Galerkin formulation of the Stokes problem accommodating equal-order interpolations", Computer Methods in Applied Mechanics and Engineering, Vol 59, pp. 85-99, 1986.
COMSOL uses P1+P1 elements per default since it is a more robust choice than higher order elements. P2+P1 elements provide a formally higher order accuracy, but can in practice "over-interpolate" the solution (c.f. Runge's phenomenon). This over-interpolation can lead to oscillations that in turn can cause divergence. Changing to higher order elements is a computationally effective alternative to mesh refinement only if the model is well enough resolved. This regime can be very expensive to reach, specially for 3D models. Stokes flow is of course always well resolved since it lacks convective terms and P2+P1 elements is therefore the default element order for Stokes flow.
I hope this sheds some light on the topic.
Best regards
Christian Wollblad
COMSOL
Please login with a confirmed email address before reporting spam
Thanks, gives me more to read ...
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
My question can now be resumed to:
Do the stabilization techniques, crosswind and streamline, implemented in comsol, which are meant to deal with with advection-diffusion equations, also deal with the fact that P1+P1 elements do not verify the Babuska-Brezzi inf-sup condition?
If not, I can not be sure that the pressure is correct (if I don't know how the solution behaves) .
Hi,
I might be wrong but what I know is that simply solving general advection-diffusion PDE with FEM(or FDM..) you will see oscillations in the solution. I'm not talking yet of Navier-Stokes, so forget about the pressure for a moment. To avoid these oscillations you implement stabilization techniques, which add some nonlinearity to your problem, entries in coefficient matrices etc.... You have to do this either with linear or quadratic elements.
The matter with incompressible Navier Stokes flows is the continuity equation and the pressure gradient (not the pressure itself!). The BB condition can be satisfied by P2P1 elements (any maaaaany others not implemented in Comsol!) or circumvented with CBS algorithm.
Again, I might be wrong, and I have no clue on how Comsol solves Navies Stokes. However, when you spy the damping and stiffness matrices of Comsol you clearly see that theirs rank isn't maximum. But there's a big difference in computational time using full-coupled or segregated solvers.... and this leads a question, is CBS (or similar algorithms) implemented?
Since I don't know how Comsol solves the equations, I would use P2P1 elements: the pressure will be numerically correct up to a constant and the velocity field (leading variable for incompressible flows) approximated with a decent order.
Still, good question. Jorge, did you ever compare pressure fields solved with P1P1 and P2P1? Or do you know something about the algorithm used by Comsol to solve NavierStokes eqs?
Mattia
Please login with a confirmed email address before reporting spam
Also thanks Jorge for your excellent question that prompted this discussion.
As a spinoff to this question, I would like to ask about the companion linear-algebra problem. Particularly, 3D Navier-Stokes, the problem gets too large to solve directly and fully-coupled, so it becomes difficult to distinguish between instabilities due to the discretization as per this original question, and instabilities caused by the approximation to the linear algebra problem.
I would love to hear from more users about what settings they have had success and failures with in solving large, complex, 3D NS problems.
Please login with a confirmed email address before reporting spam
I am yet to decide between P1+ P1 and P2+P1..
I simulated a axi-symmetric jet using these two combinations.
I have attached the images of the results obtained. While P2+P1 provides significantly better resolution, the trajectory shows a unnatural deviation for P2+P1. The BC's for the two are exactly similar.
Any pointers on why this could be happening?
I am more inclined towards using P2+P1 and hoping there is a fix for anomalies such as these.
Also is the CBS algorithm incorporated in COMSOL?
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.