Finite Volume in FEniCS

Asked by Luis M. de la Cruz

Hello every one,
I'm fan of Finite Volume Method (FVM) because its conservative properties, and its easiness.
However I'm very impressed with FEniCS, it provides a very powerful set of tools , so I'm starting
to solve very complicated fluid dynamics problems.

Now I wonder if it is possible to do something like "conservative" version of Finite Element Method (FEM)
with the tools of FEniCS?. In fact, many people says that FVM is a particular version of FEM, you just have
to use test functions equal to one. What do you think?.

Best regards,

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Anders Logg
Solved:
Last query:
Last reply:
Revision history for this message
Neilen Marais (neilenmarais) said :
#1

Hi Luis,

I don't actually know much about fluid dynamics, (I'm an electromagnetics guy) but if by conservative you mean lossless (i.e. energy is conserved) in the case of lossless materials, then I think it is down to using the correct time integration scheme. For many problems you need to use a symplectic integrator: http://en.wikipedia.org/wiki/Symplectic_integrator, or depending of the FEM forumlation you start with, something like the Newmark-Beta method http://en.wikipedia.org/wiki/Newmark-beta_method.

As for FEM/FVM equivalencies, again, I am not an expert in the particular field, but in general there are many methods that can be shown to be equivalen to the FEM given the correct test, trial and matrix integration schemes. In my field, it is quite easy to show equivalence between time-domain FEM methods and the finite difference time domain (FDTD) method.

Revision history for this message
Best Anders Logg (logg) said :
#2

On Mon, May 23, 2011 at 02:11:06PM -0000, Luis M. de la Cruz wrote:
> New question #158693 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/158693
>
> Hello every one,
> I'm fan of Finite Volume Method (FVM) because its conservative properties, and its easiness.
> However I'm very impressed with FEniCS, it provides a very powerful set of tools , so I'm starting
> to solve very complicated fluid dynamics problems.
>
> Now I wonder if it is possible to do something like "conservative" version of Finite Element Method (FEM)
> with the tools of FEniCS?. In fact, many people says that FVM is a particular version of FEM, you just have
> to use test functions equal to one. What do you think?.
>
> Best regards,

DG (discontinuous Galerkin) is fully supported in FEniCS (and are
closely related to FVM). Do a Google search for conservative DG and
you might find what you need.

--
Anders

Revision history for this message
David Ham (david-ham) said :
#3

FEniCS also supports the Raviart-Thomas 0 element which is very closely related to Arakawa C-grid finite volume schemes.

Revision history for this message
B. Emek Abali (bilenemek) said :
#4

as fas as I know the "conservative"ness of the FVM is the divergence free solution. In fluid dynamics the solution is the velocity field and from the balance of mass (under the assumption of constant in time and constant in space mass density) divergence of velocities is zero can be found. This (widely known as incompressibility) condition is added into variational formulation in fem and already implemented into the fvm (as constant volume). Therefore any element type in fem with constant velocity (constant form functions) is the fvm formulation (at least to me as an engineer :)

But do not forget two assumptions in the formulations, one is the Gauss theorem is used, so risky but we assumed the continuity of the solution. Against that ALSO the evaluation on the boundaries (of each element) are popular (discontinuous galerkin) and FEniCS perfectly allow all these studies. Another tiny (but actually a big headache) assumption is the mass density is constant in time assumption. This is done also in somehow other ways in fem (in the formulation) in fvm (not even mentioned).

Revision history for this message
Luis M. de la Cruz (luiggix) said :
#5

Thanks Anders Logg, that solved my question.

Revision history for this message
Johan Hake (johan-hake) said :
#6

On Wednesday June 8 2011 08:15:59 Luis M. de la Cruz wrote:
> Question #158693 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/158693
>
> Status: Answered => Solved
>
> Luis M. de la Cruz confirmed that the question is solved:
> Thanks Anders Logg, that solved my question.

If you are able to create a simple reaction diffusion problem using
FiniteVolume with FEniCS it would be cool to include that as a demo.

Johan