Why Comsol

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   27 Replies   Last post: April 18, 2012 10:09am UTC
Riani Ayu Lestari

Riani Ayu Lestari

April 28, 2010 11:46am UTC

Why Comsol

What is advantages and disadvantages for using Comsol for CFD application? What is the different between Comsol and Fluent for CFD application?

Thank you,
Riani

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Marc Jouan

Marc Jouan

April 28, 2010 12:43pm UTC in response to Riani Ayu Lestari

Re: Why Comsol

first of all,comsol is a finite elements software and fluent a finite volumes soft. we can say that nowaday with the developpement of finite elements method for CFD finite volumes has lost the monopoly on CFD so this difference on the method can be seen as a point versus or for the use of one of this software. But what you have to keep in mind is the fact that fluent is a solver and required a prepocesseur (mesher)(gambit for example ) whereas comsol integrate his own mesher. in the comsol case it is relatively easy to mesh in an unstructured or structured way with boundary layer for CFD problem. It is sometime a little bit more difficult with the gambit or icem CFD mesher (it depends on your training in these differents mesher as well). The real advantage of comsol is to enable multiphysic problem like fluid structure interactin to be carried out easily within it which is not the case for fluent requiring an other structural sover (ansys..) to deal with. The advantage of fluent is the number of turbulent model adapted to special case (combustion,swirl flow...)whereas comsol present only the standard k-epsilon and k-omega model for the moment. anyway ,riani what is the problem you want to solve ?

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

April 29, 2010 1:16pm UTC in response to Marc Jouan

Re: Why Comsol

The new CFD module will have many improvements in the CFD area for COMSOL. COMSOL provides better solution accuracy and consistency. For the time being, other commercial CFD codes will solve more efficiently in memory and cpu at the expense of less accuracy and consistency. COMSOL improvements are coming at a very fast rate, so I expect superior solver performance in the near future. COMSOL brings unsurpassed multi-physics capability simply not found in other codes.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Santhosh Kumar CT

Santhosh Kumar CT

January 25, 2012 5:06pm UTC in response to James Freels

Re: Why Comsol

I still dont get the difference in the equation that fluent and comsol uses ..

here is the link to the set of equations (for flow problems) that Fluent solves for :

hpce.iitm.ac.in/website/Manual...nt6.3/help/html/ug/node382.htm

while the set of equations that are defined in comsol are also same... !


So by FEM & FVM comparison .. do i mean that direct discretisation of PDEs are made in COMSOL (FEM) while in FLUENT (FVM) the equations are integrated and approximated by stokes theorem and then volme averaged and then discretised ... ?


Please let me understand the exact difference between FVM and FEM . please

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

January 25, 2012 10:12pm UTC in response to Santhosh Kumar CT

Re: Why Comsol

You are correct in realizing that the Navier Stokes equations are the same in COMSOL as they are in FLUENT or any other code or place where they are written down. Through this, the codes are the same in that they both approximate the same equation system to be solved. In addition, COMSOL will simultaneously solve any number of equations; indeed, any equation that can be written down whether correct or not.

The answer to your next question is essentially yes. Not precisely yes, but almost.

We don't have the time or space to get into an extensive discussion on the difference between FEM and FVM methods here.

In simplistic terms, the way I like to look at it is that a FVM method is zeroth order with a node in the centroid of a finite volume. If the finite volume and finite element are descretized with the exact same geometry, then the finite volume can be thought of as a finite element. A linear-basis finite element uses a linear interpolation between the node points on the finite element which are located at each corner instead of the FVM centroid. Thus you have eight nodes instead of one node in the equivalent finite element (volume).Thus the accuracy is that much more greater for the FEM method.

COMSOL, being a true finite element code, also includes quadratic, cubic, and greater basis functions. For example the quadratic basis in 3D includes nodes at the midpoints between the lines connecting the corner nodes so you have 27 nodes in the same finite element and a quadratic interpolation between all the nodes. The accuracy is even greater as you use the increased interpolation functions.

Back to the Navier Stokes equations. These equations are nonlinear. perhaps the most difficult to solve, and require high accuracy to solve precisely to the desired levels. Hence, the FEM is superior for doing so.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Nagi Elabbasi

Nagi Elabbasi
Certified Consultant
Veryst Engineering

January 29, 2012 7:31pm UTC in response to James Freels

Re: Why Comsol

Both finite element and finite volume methods have been developed to solve the equations of solid mechanics, fluid flow, heat transfer, mass transfer, and electromagnetics. There is no difference at the PDE level when using both techniques. However, the finite element method has been the more popular commercial and academic technique for all these physics fields except fluid flow. The two main reasons for the popularity of the FVM for fluid flow, in my opinion, are the faster solution time, and the non-suitability of higher order finite elements to fluid flow.

The faster solution time is not due to the finite volume method having fewer degrees of freedom, but being better suited for iterative (non-direct) solvers. It is common for example to use segregated solvers that solve for each flow direction separately for finite volumes but not for finite elements. Higher order elements (a big advantage of the FEM as James mentioned above) are not suitable for certain flow problems (such as turbulence or shock waves) due to the relatively sharp gradients in solution.

Finite element methods for fluid flows are catching up though and are now very competitive with finite volumes. The finite element method is also a more suitable choice for multiphysics problems, in my opinion, so that we don’t end up with one physics field discretized differently from the rest. The interface between fluids and solids will also be inconvenient if the fluid has cell-based finite volume degrees of freedom, and the solid has node-based finite element degrees of freedom (there are vertex/node based finite volume methods but they are less popular).

Nagi Elabbasi
Veryst Engineering

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

January 30, 2012 2:57am UTC in response to Nagi Elabbasi

Re: Why Comsol

As mentioned earlier, we won't have much time or space to settle the age-old battle between which is best between FVM and FEM methods.

However, I do argue against a couple of your points directly and right away. My own dissertation utilized a segregated sweeping in two dimensions as you mentioned, and the same technique is used in 3D by other researchers. However, it is not suitable for unstructured meshes. COMSOL does not have this algorithm but I think may have something similar for laminar Navier Stokes (have not checked in current version, but it did in an older version). Also, I would argue just the opposite, that is, higher order elements are indeed, much more accurate for flows, including shocks as well, since I also found this in my same dissertation. The price paid here though is a much more dense solution matrix and higher degrees of freedom. I have not tried the shock capturing capabilities in COMSOL, but it would be interesting to see how well it works using the higher-order bases.

cfdlab.utk.edu/html/thesis/thesis.htm

I agree that FVM can indeed be faster running, but at the price of being more diffusive and less consistent with the true answers, and can be misleading in interpreting results.

I think the decision comes down to the desire for accuracy.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Santhosh Kumar CT

Santhosh Kumar CT

January 30, 2012 4:43pm UTC in response to James Freels

Re: Why Comsol

Very clear and elaborate replies .!!
Thanks to " Nagi" and "James"

Finally i feel the difference .. !

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Nagi Elabbasi

Nagi Elabbasi
Certified Consultant
Veryst Engineering

January 30, 2012 5:30pm UTC in response to Santhosh Kumar CT

Re: Why Comsol

Glad to help Santhosh! It is an interesting topic for discussion as you can see even among those who agree that FEM is overall more suitable for fluid flow.

James, thanks for the feedback, and for your thesis reference. Like you, I agree that FEM is overall more accurate and versatile. However, for some complex 3D problems I set the mesh size based on the anticipated solution time. That results in a finer mesh for the faster solving FVM and it “gains” accuracy (and reduces numerical diffusion) that way. A faster solving FEM would be great and we’re heading that way.

I tried to see just now if COMSOL has a default segregated solver setting which separates the velocity directions and I could not find any. It can be manually set up of course but I never tried it. I would be interested to know how well it works, even if only for structured or predominantly structured meshes.

The default discretization for fluid flow in COMSOL is using linear elements except in creeping flow and I agree with that. I have not had that much luck with quadratic elements for turbulent flow, and I don’t have much experience with shock-type flows. If they work consistently (and converge) better than linear elements, as you show in your thesis, that would be great.

By the way, there is another reason, in my opinion, for the widespread use of FVM in fluid flow, and that is momentum, and I don’t mean the momentum equation! It’s the fact that FVM in fluid flow became widespread earlier than FEM, and it is hard even for superior methods to overcome that momentum. That being said however, FVM researchers in solid mechanics use the same argument to make their case for the FVM!

Nagi Elabbasi
Veryst Engineering

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

January 30, 2012 7:30pm UTC in response to Nagi Elabbasi

Re: Why Comsol

Great discussion, and hope we helped.

Nagi, I agree with you about the momentum effect ! We see a lot of that around here.
Also, I believe that the segregated solver that I had referred to is no longer present in the current version.

There was a solver in an earlier version of the v4 series (was not in v3.5a) whereby a laminar flow could be solved for u, v, and w separately much like the FVM solvers. This method did not extend to turbulent or even non-isothermal flows, but only worked for isothermal, laminar, NS. One could save a lot of memory and cpu time if he did not have to load the entire u-p matrix !

It would be interesting to find out why this solver was removed and if they are planning to add it back at a later time with more versatility (non-isothermal, turbulent, etc.).

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

January 30, 2012 7:56pm UTC in response to James Freels

Re: Why Comsol

Hi

Perhaps its worth sending the question to support ;)
We all might get an interesting answer

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Santhosh Kumar CT

Santhosh Kumar CT

January 31, 2012 6:27am UTC in response to Ivar Kjelberg

Re: Why Comsol

Done :)



Hi

Perhaps its worth sending the question to support ;)
We all might get an interesting answer

--
Good luck
Ivar


Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Bertil Nistad

Bertil Nistad
COMSOL Employee
Norway

February 2, 2012 7:00pm UTC in response to James Freels

Re: Why Comsol

>It would be interesting to find out why this solver was removed and if they are planning to add it back at a later time >with more versatility (non-isothermal, turbulent, etc.).

It is still there. See page 620 in COMSOL Multiphysics Users Guide. You can activate it by setting the equation to Projection method and selecting a time discrete solver. This wil set up a segregated solver which is more memory efficient.

Best regards
Bertil

Reply  |  Reply with Quote  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

February 2, 2012 9:03pm UTC in response to Bertil Nistad

Re: Why Comsol

Hi Bertil

Thanks for the precision (one should always re-read the doc, but 2x per year with 5000+ multiphysics pages is tought to catch everything in there ;)
Will try it one of these days

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

February 2, 2012 9:26pm UTC in response to Bertil Nistad

Re: Why Comsol

Hello Bertil !

Yes ! This is the method I was thinking of. I just could not find it in the v4.2a interface. Indeed, it looks like lots of improvements have been made here. I wonder why we didn't hear about this in the release notes ? It looks like turbulence has been added for k-e. Do you know the following:

1) will non-isothermal interface with this projection method ?

2) will Low-Reynolds k-e solve with projection method ?

3) if 1) and 2) are no, do you know if there are plans to add these to this method ?

4) do you know if an iterative SS method (using multigrid or Vanka preconditioner) is more or less efficient than this projection method ? I guess it depends on the memory limitations since this projection method certainly uses much less memory

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

February 2, 2012 9:28pm UTC in response to Nagi Elabbasi

Re: Why Comsol

Dear Nagi,

It would be interesting to hear if this projection method is similar to the methods you remember about FVM methods ? I faintly remember seeing CFX and FLUENT iterate in a similar manner as COMSOL is doing with this projection method. I suspect the type of performance you were discussing is what is in this method.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Nagi Elabbasi

Nagi Elabbasi
Certified Consultant
Veryst Engineering

February 3, 2012 5:17am UTC in response to James Freels

Re: Why Comsol

Yes James, this projection method is what I was hoping to find. It seems to be very similar to the “pressure-based solvers” used in FVM CFD codes. I am curious to try it out and see how it performs in stationary, time dependent, laminar, and turbulent flow problems. Also curious to get responses (from COMSOL?) to the 4 questions you posted above, related to this solver.

Nagi Elabbasi
Veryst Engineering

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Santhosh Kumar CT

Santhosh Kumar CT

February 3, 2012 6:17am UTC in response to Bertil Nistad

Re: Why Comsol


>It would be interesting to find out why this solver was removed and if they are planning to add it back at a later time >with more versatility (non-isothermal, turbulent, etc.).

It is still there. See page 620 in COMSOL Multiphysics Users Guide. You can activate it by setting the equation to Projection method and selecting a time discrete solver. This wil set up a segregated solver which is more memory efficient.

Best regards
Bertil


Thanks a lot :)

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Santhosh Kumar CT

Santhosh Kumar CT

February 3, 2012 6:32am UTC in response to Santhosh Kumar CT

Re: Why Comsol

Hi ,

i tried the time discrete solver ... it did nt solve even for a single case .. ? did i commit any blunder ? not did the usual "time - dependent" worked .. should i go for even more finer time size ??

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

February 3, 2012 3:15pm UTC in response to Santhosh Kumar CT

Re: Why Comsol

Santhosh,

I also tried it for a simple 3D pipe, laminar flow, isothermal. It worked quite well, and used very little memory. It is certainly slower than a direct solver, but not sure how it might compare to an iterative solver. this problem simply uses the transient solver to arrive at a steady state. The first few iterations are fairly "interesting", to say the least, on how the algorithm iterates. Then, as the solution approaches a steady state, it is very fast and only iterates one time per time step. I used the default solver settings. Please find the model file attached with solution, mesh, and history cleared.

Attachments:   laminar_isothermal.mph  

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Santhosh Kumar CT

Santhosh Kumar CT

February 4, 2012 7:35am UTC in response to James Freels

Re: Why Comsol

hey the file u attached doesnt show any result to me ??? i am nt getting any result displayed .. and my rendering is "software" only .. whil other problems display anwers .. yours' show geometry and mesh but it doesnt depict any result .. i dont knw why . can u just show me the result as jpg file for two to time intervals ?

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

February 4, 2012 9:39am UTC in response to Santhosh Kumar CT

Re: Why Comsol

Hi

cantyou run it and solve it ? Normally we clear the solution and the mesh when we upload, in V4 its then just to run the simulation ;)

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Santhosh Kumar CT

Santhosh Kumar CT

February 4, 2012 9:41am UTC in response to Ivar Kjelberg

Re: Why Comsol


Hi

cantyou run it and solve it ? Normally we clear the solution and the mesh when we upload, in V4 its then just to run the simulation ;)

--
Good luck
Ivar


the problem its been running for almost 2 hrs and still its just half solved ... i thought i need nt wait for a simple laminar flow problem this long ... :D !!

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

February 4, 2012 5:54pm UTC in response to Santhosh Kumar CT

Re: Why Comsol

Santhosh, what kind of computer are you running COMSOL on ?

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Kenneth Bodin

Kenneth Bodin

February 17, 2012 1:20pm UTC in response to James Freels

Re: Why Comsol

Interesting discussion. Where would you place meshfree methods like in XFLOW in relation to this?

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

James  Freels

James Freels

February 18, 2012 4:21am UTC in response to Kenneth Bodin

Re: Why Comsol

I had never heard of XFLOW until your question. I took a quick look at their web site and it is quite impressive. My guess is that the new COMSOL particle tracing module uses similar technology. I have not tried the particle tracing module to solve a flow problem, but I understand it can be done.

Another impressive and emerging technology is Lattice Boltzman Transport modeling. It requires dense regular meshing, but utilizes distributed parallel processing very efficiently. I think the beginnings of this technology are showing up in the COMSOL microfluidics module. There are lots of u-tube videos of LBT examples.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Nagi Elabbasi

Nagi Elabbasi
Certified Consultant
Veryst Engineering

February 19, 2012 10:09pm UTC in response to James Freels

Re: Why Comsol

Indeed their website has impressive examples. The main difference between the approach used by XFLOW and the Finite Element or Finite Volume CFD methods is not the fact that it is meshfree but that it solves the Lattice Boltzmann method (LBM) instead of the Navier-Stokes equations. There is only one other commercial software that I know of that also uses the LBM (PowerFlow). It would be interesting to know if COMSOL intends to develop something similar as an extension of its particle tracing module.

The LBM solves the discrete Boltzmann equations that govern the dynamics of particle distributions. Is it based on the more fundamental Boltzmann transport equation. Its main drawback is that it can only solve the transient problem, so no steady state solution. I also think they are not suitable for incompressible flow as well since the pressure is obtained from the density distribution. As far as I know, the method is also still insufficiently validated. Their main advantage is good parallel scalability, multiphase flow, and less sensitivity to geometric complexity. The examples shown on the web seem to focus on these areas of strength.

The Lattice Boltzmann method in general uses a simple grid mesh, so describing XFLOW as “meshfree” seems to me to be more for marketing purposes. Many other meshfree methods exist for solid mechanics and Navier-Stokes fluid mechanics (where a simple grid mesh is not the norm) but they are not yet available in widely used commercial codes, and have their own advantages and disadvantages.

Nagi Elabbasi
Veryst Engineering

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

STS

STS
COMSOL Employee
France

April 18, 2012 10:09am UTC in response to Nagi Elabbasi

Re: Why Comsol

It's already there!

Please check out the Microfluidics Module User's Guide > Theory for the Transitional Flow Interface > Overview of the Lattice Boltzmann Method

Reply  |  Reply with Quote  |  Report Abuse


Rules and guidelines