CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > COMSOL

Why COMSOL use FEM instead of FVM?

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

Like Tree38Likes
  • 7 Post By mprinkey
  • 8 Post By mprinkey
  • 3 Post By Jonas Holdeman
  • 2 Post By FMDenaro
  • 1 Post By mprinkey
  • 2 Post By praveen
  • 2 Post By praveen
  • 1 Post By arjun
  • 2 Post By Jonas Holdeman
  • 1 Post By jmaeng
  • 2 Post By praveen
  • 2 Post By selig5576
  • 2 Post By FMDenaro
  • 1 Post By arjun
  • 1 Post By arjun
  • 1 Post By andy_

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2018, 15:24
Default Why COMSOL use FEM instead of FVM?
  #1
New Member
 
Join Date: Jun 2016
Posts: 3
Rep Power: 9
FIRE is on a distinguished road
Hi,
Why COMSOL use FEM instead of FVM?
Is FEM has any advantageous over FVM?
Thx
FIRE is offline   Reply With Quote

Old   January 3, 2018, 21:33
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
COMSOL is a multiphysics code first and a cfd code second. Solid mechanics and most electromagnetics solvers are FEM-based. There are FEM-based CFD solvers (using, say, Streamwise-Upwind Petrov Galerkin for convection) that have been around since the 1990s, so that fluids capability is a known quantity. In fact, FIDAP was a commercial CFD code back in the 90s. Practically, a multi-physics code should use the same mesh and the same data location points for all of its fields so interphysics coupling can be done in a consistent way. That makes FEM treatments the obvious choice.

FVM approaches for solid mechanics, EM, etc. are, of course, possible in principle, but are not as widely used and haven't had the same years of accumulated experience. IMO, FEM is a poor choice for pure CFD versus FVM or Discontinuous Galerkin Method, but COMSOL isn't pure CFD.
FMDenaro, FIRE, ashokac7 and 4 others like this.
mprinkey is offline   Reply With Quote

Old   January 5, 2018, 17:52
Default
  #3
New Member
 
Join Date: Dec 2015
Posts: 27
Rep Power: 10
toodles is on a distinguished road
Quote:
Originally Posted by mprinkey View Post
COMSOL is a multiphysics code first and a cfd code second. Solid mechanics and most electromagnetics solvers are FEM-based. There are FEM-based CFD solvers (using, say, Streamwise-Upwind Petrov Galerkin for convection) that have been around since the 1990s, so that fluids capability is a known quantity. In fact, FIDAP was a commercial CFD code back in the 90s. Practically, a multi-physics code should use the same mesh and the same data location points for all of its fields so interphysics coupling can be done in a consistent way. That makes FEM treatments the obvious choice.

FVM approaches for solid mechanics, EM, etc. are, of course, possible in principle, but are not as widely used and haven't had the same years of accumulated experience. IMO, FEM is a poor choice for pure CFD versus FVM or Discontinuous Galerkin Method, but COMSOL isn't pure CFD.
Just out of curiosity, why do you think it is a poor choice?
toodles is offline   Reply With Quote

Old   January 5, 2018, 18:17
Default
  #4
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Quote:
Originally Posted by toodles View Post
Just out of curiosity, why do you think it is a poor choice?
FEM lacks a fundamental statement of conservation. FVM (and DG) are axiomatically conservative based on face flux integrals. FEM is defined as a minimization problem--find the solution that best reduces the Galerkin (or Least-Squares) residual of this system. For solid mechanics, that minimization statement makes a lot of sense--configuration of solid mechanical systems map nicely to variational formulations. Conservation equations, however, do not.

For simple flow physics, the difference is not really that important. FEM with linear shape functions *may* be a little more accurate than 2nd order FVM on a per-DOF basis. The FVM code will probably run a bit faster. But, the FVM code will *precisely* (to round-off error) conserve the mass entering and exiting a system. FEM will not be absolutely conservative, without some additional tweaking--using dark arts that I know not. This really becomes an issue with reacting flows, say, where trace concentrations of species can make significant differences. A one-part-in-ten-thousand mass imbalance is inconsequential in external aero or a lid driven cavity, but it could create a dramatic difference in flame shape or attachment points.

Another reason is that FVM solvers are highly optimized for solving flow problems, by basically cutting every corner possible. Segregated solution methods, projection methods, frozen field preconditioning for Newton Krylov...the list is very long. FEM doesn't have these and they do not automatically transfer. FEM tends to do a great job of handling inter-field coupling because it creates a large stiffness matrix using all of the d.o.f.s, solving the system in a coupled manner. And while that is perfect for enforcing solid mechanics constitutive laws, that coupled approach *tends* to be suboptimal from a pure convergence/performance standpoint. The details of these differences are difficult to cover without really getting into the weeds. Suffice to say, FEM methods have grown one way to serve primarily solid mechanics. FVM methods have grown another way (really TWO other ways, as density-based and pressure-based solvers are hugely different in their own right). These decades of accumulated differences has resulted in tool specialization that is hard to overcome.
mprinkey is offline   Reply With Quote

Old   January 6, 2018, 10:14
Default
  #5
Senior Member
 
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18
Jonas Holdeman is on a distinguished road
Quote:
Originally Posted by mprinkey View Post
. . . But, the FVM code will *precisely* (to round-off error) conserve the mass entering and exiting a system. FEM will not be absolutely conservative, without some additional tweaking--using dark arts that I know not. ...
There is an FE method that is absolutely/precisely mass-conservative for incompressible flow in a pointwise sense, not just flow "entering and exiting a system". Using primitive variables, the basis functions are the curl of a stream function or vector potential element. To see code examples, go to cfd-online -> wiki -> source code archive -> educational -> {2D ... & 3D...}. Straight finite elements, no tweaking or dark arts involved, only thinking outside the box.
mprinkey, Trailokya and aerosayan like this.
Jonas Holdeman is offline   Reply With Quote

Old   January 6, 2018, 10:54
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Just to add a note: FVM can be see as a special case of FEM when the equations is projected along step-wise shape functions
selig5576 and aerosayan like this.
FMDenaro is offline   Reply With Quote

Old   January 6, 2018, 15:23
Default
  #7
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Quote:
Originally Posted by Jonas Holdeman View Post
There is an FE method that is absolutely/precisely mass-conservative for incompressible flow in a pointwise sense, not just flow "entering and exiting a system". Using primitive variables, the basis functions are the curl of a stream function or vector potential element. To see code examples, go to cfd-online -> wiki -> source code archive -> educational -> {2D ... & 3D...}. Straight finite elements, no tweaking or dark arts involved, only thinking outside the box.
I remember that, now that you mention it. Is there a version for (weakly) compressible flow? That would need to involve some interesting basis functions. Conservation issues really come back to reacting flows and those are often variable density, subsonic flows--I'm thinking of natural gas burners, etc.
And of course, all of these problems go away with DG. So, why not just use DG.
selig5576 likes this.
mprinkey is offline   Reply With Quote

Old   January 6, 2018, 17:25
Default DG and FVM
  #8
Senior Member
 
Selig
Join Date: Jul 2016
Posts: 213
Rep Power: 10
selig5576 is on a distinguished road
Do you think DG will eventually replace FVM? DG combines the features of both FEM and FVM, but still seems to be a relatively new competitor in the scene.
selig5576 is offline   Reply With Quote

Old   January 6, 2018, 23:34
Default
  #9
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
DG allows to go beyond second order even upto to the boundary. But this requires high order meshes which is not so well developed. Efficient implicit solvers is another obstacle. For real applications using RANS, the major issue is turbulence modelling, and having a high order method may not gain you much. Where high order methods may be more useful is in LES and of course DNS.
mprinkey and aerosayan like this.
praveen is offline   Reply With Quote

Old   January 7, 2018, 04:49
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
At the best of my knowledge, owing to the dissipative character, DG is mainly used in ILES approach. See for example: P. Fernandez, N.C. Nguyen, J. Peraire,The hybridized Discontinuous Galerkin method for Implicit Large-Eddy Simulation of transitional turbulent flows. J. Comp. Phys., 336, Pages 308-329, 2017.

I recently revised a PhD thesis about this issue and I think DG still needs some analyses in terms of LES formulation
FMDenaro is offline   Reply With Quote

Old   January 7, 2018, 04:56
Default
  #11
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
High order schemes are an active area of research, see these workshops

1) http://dept.ku.edu/~cfdku/hiocfd.html
3) https://www.grc.nasa.gov/hiocfd/
4) https://how4.cenaero.be
5) https://how5.cenaero.be (in 2018)

The older ones have presentation slides and some status report also.
mprinkey and aerosayan like this.
praveen is offline   Reply With Quote

Old   January 7, 2018, 08:29
Default
  #12
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by praveen View Post
High order schemes are an active area of research, see these workshops

1) http://dept.ku.edu/~cfdku/hiocfd.html
3) https://www.grc.nasa.gov/hiocfd/
4) https://how4.cenaero.be
5) https://how5.cenaero.be (in 2018)

The older ones have presentation slides and some status report also.

What I find interesting is that most of these higher order methods are for Euler solvers with density based approach.

I have been very slowly working on third order version of Wildkatze solver with pressure based approach. (SIMPLE type). Thought the base version is ready it need verifications so i would see if the solver could be validated and released to others.
(Due to personal problems could not work for last 1.5 months but i will soon pick up).

Having said this, do you know someone (or some place) where they are working on higher order solver with pressure based approach?
aerosayan likes this.
arjun is offline   Reply With Quote

Old   January 7, 2018, 09:06
Default
  #13
Senior Member
 
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18
Jonas Holdeman is on a distinguished road
Quote:
Originally Posted by mprinkey View Post
I remember that, now that you mention it. Is there a version for (weakly) compressible flow? That would need to involve some interesting basis functions. Conservation issues really come back to reacting flows and those are often variable density, subsonic flows--I'm thinking of natural gas burners, etc.
I don't know what the core issues are in weakly compressible flow, except that a number of terms vanish in the limit in the asymptotic expansion of the NS equation in terms of Mach number, which can cause numerical problems. The divergence-free elements in primitive variables are necessarily of the Hermite type. One can write constant-divergence Lagrange elements for which the divergence vanishes pointwise when the net flow into an element is zero. These would seem to be useful in that they are pointwise divergence-free in a limit, but still allow for coarse compressibility. I have used these in an intermediate step in the derivation of "serendipity" classes of divergence-free elements.
mprinkey and aerosayan like this.
Jonas Holdeman is offline   Reply With Quote

Old   January 9, 2018, 14:03
Default
  #14
New Member
 
B.M.
Join Date: Jan 2018
Posts: 1
Rep Power: 0
jmaeng is on a distinguished road
Quote:
Originally Posted by arjun View Post
What I find interesting is that most of these higher order methods are for Euler solvers with density based approach.

I have been very slowly working on third order version of Wildkatze solver with pressure based approach. (SIMPLE type). Thought the base version is ready it need verifications so i would see if the solver could be validated and released to others.
(Due to personal problems could not work for last 1.5 months but i will soon pick up).

Having said this, do you know someone (or some place) where they are working on higher order solver with pressure based approach?
I'm not too familiar with pressure based approaches for high-order methods. Many high-order methods for compressible and high-speed flows, of interest for many researchers, are designed to solve conservation systems, for example, the Euler equations. That being said, the main focus of Euler solvers, or inviscid flux component of the N/S solvers, is to design "conservative" methods, which are invariably in terms of density and conservation of mass, momentum, and energy, resulting from the conservation laws.
aerosayan likes this.
jmaeng is offline   Reply With Quote

Old   January 10, 2018, 08:18
Default
  #15
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
A lot of the high order research is focused on aerospace applications which need compressible solvers.

But there are some highly regarded high order solvers for incompressible flows,

nek5000: https://nek5000.mcs.anl.gov

Nektar: https://www.nektar.info

And both are open source :-)
selig5576 and aerosayan like this.
praveen is offline   Reply With Quote

Old   January 11, 2018, 10:32
Default Spectral Element
  #16
Senior Member
 
Selig
Join Date: Jul 2016
Posts: 213
Rep Power: 10
selig5576 is on a distinguished road
Do spectral elements suffer from the same types of issues as spectral methods, i.e. shock waves? Something I dislike about spectral methods is the need for smoothness u \in C^{\infty}. I think the spectral element is attractive due to spectral convergence, but how would it compare to a discontinuous galerkin method?
arjun and aerosayan like this.
selig5576 is offline   Reply With Quote

Old   January 11, 2018, 10:42
Default
  #17
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,763
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by selig5576 View Post
Do spectral elements suffer from the same types of issues as spectral methods, i.e. shock waves? Something I dislike about spectral methods is the need for smoothness u \in C^{\infty}. I think the spectral element is attractive due to spectral convergence, but how would it compare to a discontinuous galerkin method?
not an expert about spectral elements methods but I think that for solution with singularity you cannot use that without to separate the spectral reconstruction in the regions of regular solutions...
I could immagine a spectral reconstruction on average values that are regularized but it would be useful to check in the literature
selig5576 and aerosayan like this.
FMDenaro is offline   Reply With Quote

Old   January 11, 2018, 21:50
Default
  #18
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by jmaeng View Post
I'm not too familiar with pressure based approaches for high-order methods. Many high-order methods for compressible and high-speed flows, of interest for many researchers, are designed to solve conservation systems, for example, the Euler equations. That being said, the main focus of Euler solvers, or inviscid flux component of the N/S solvers, is to design "conservative" methods, which are invariably in terms of density and conservation of mass, momentum, and energy, resulting from the conservation laws.

pressure based approach is also FV approach and shall be conservative.
aerosayan likes this.
arjun is offline   Reply With Quote

Old   January 11, 2018, 21:53
Default
  #19
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by praveen View Post
A lot of the high order research is focused on aerospace applications which need compressible solvers.

But there are some highly regarded high order solvers for incompressible flows,

nek5000: https://nek5000.mcs.anl.gov

Nektar: https://www.nektar.info

And both are open source :-)

Both are finite element too. These are indeed incompressible flow solvers.

Still though pressure based finite volume is missing. So far I am not able to find someone who is working on pressure based third order or higher.
aerosayan likes this.
arjun is offline   Reply With Quote

Old   January 13, 2018, 08:57
Default
  #20
Senior Member
 
andy
Join Date: May 2009
Posts: 268
Rep Power: 17
andy_ is on a distinguished road
Quote:
Originally Posted by FIRE View Post
Hi,
Why COMSOL use FEM instead of FVM?
Is FEM has any advantageous over FVM?
COMSOL uses FEM because of how it evolved from the structural side where FEM has been the practical solution since the 60s. The fluid side is expressed in FEM speak/data structures to aid the multiphysics but if the implementations are efficient they will have a lot in common with FVM/FD codes. FEM is a general mathematical approach and as someone mentioned above one can express FVM/FD methods with it. Back in the 80s the company I worked for employed a university maths group to analyse the scheme of one of their internal FVM CFD codes that appeared to work well but unusually used upwinded control volumes which tended to sow a bit of doubt. The first thing the group did was express it as an equivalent FEM scheme because the FEM analysis tools were better developed.
aerosayan likes this.
andy_ is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forces from FVM to FEM conversion (fluid/structure interaction) Abderahmane Main CFD Forum 4 February 24, 2017 09:45
3D interpolation: From FVM to FEM nodes and back vasilis Main CFD Forum 2 October 15, 2008 03:33
FVM vs FEM elwolv Main CFD Forum 8 June 5, 2007 13:23
comments on FDM, FEM, FVM, SM, SEM, DSEM, BEM kenn Main CFD Forum 2 July 18, 2004 18:28
FEM or FVM for CFD Astrid Main CFD Forum 18 December 15, 2000 00:02


All times are GMT -4. The time now is 01:51.