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.

Hagen–Poiseuille flow

Please login with a confirmed email address before reporting spam

I would like to use Comsol for a microfluidics project I'm working on. As this is my first time working with Comsol I am trying to simulate a simple problem to compare the simulation with analytical results.
The Hagen-Poiseuille flow problem is a solution to a simple fluidic problem, the flow of a liquid through a circular tube. More infor here: en.wikipedia.org/wiki/Hagen%E2%80%93Poiseuille_equation

I've set up the simulation as follows:
The geometry is 2D axisymmetric (radius is 15, length is 800)
The material is water
The physics is laminar flow (spf)
I use incompressible flow as my physical model
And define the inlet and outlet
The inlet pressure is 100 Pa, the outlet pressure is 0 Pa
The mesh is 'physics controlled' and normal

I run the simulation and to obtain the flow rate I apply a surface integration spf.U with Dataset 'solution 1'.
The result for this particular simulation is: flow rate = 5.593e-11 M3/s

The problem is that the analytical result is different. I've put it in Matlab to make sure it isn't me. The result is a factor of 22 too high.

r = 15e-6; % radius
dP = 100; % Pressure
Nu = 0.001; % viscosity
L = 800e-6; % Length
Fr = (pi*r^4*dP)/(8*Nu*L) % Hagen-Poseiulle equation for flow rate

Fr = 2.4850e-012 M3/s

I've triple checked these results but I cannot find why they don't match up. A factor 22 indicates that something's wrong, either on the theory side, or on the simulation side. Because I've just started with Comsol I would like to ask anyone to look over this model and see if something is evidently wrong. If anyone can give me suggestions why the analytical model is not correct I would like to hear it as well.

Thanks in advance





20 Replies Last Post Feb 9, 2013, 4:42 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 9, 2012, 12:31 p.m. EST
I've run the simulation again using a different model.
This time it's a 3D model of a cilinder with the same dimensions and luckily I get a result that matches very good with the anlytical results.

I checked that the 2D axisymetric simulation and the 3d simulation were both correct by comparing the max velocity at the inlet. This was 0.00678 m/s in both cases.

So when calculating the flow-rate using the 2D axisymetric simulation. I am obviously doing something wrong. I think I'm not expressing the area for integration correctly.
Could anyone help me on how to obtain the flow rate from a 2D asi simulation?
I've run the simulation again using a different model. This time it's a 3D model of a cilinder with the same dimensions and luckily I get a result that matches very good with the anlytical results. I checked that the 2D axisymetric simulation and the 3d simulation were both correct by comparing the max velocity at the inlet. This was 0.00678 m/s in both cases. So when calculating the flow-rate using the 2D axisymetric simulation. I am obviously doing something wrong. I think I'm not expressing the area for integration correctly. Could anyone help me on how to obtain the flow rate from a 2D asi simulation?

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 9, 2012, 11:36 p.m. EST
You are calculating the integration over the wrong surface. You should do a line integration over the top or bottom line of U*2*pi*r. You can also integrate over the same line, just U and select “Compute surface integral” in the Integration settings. That way COMSOL internally adds the 2*pi*r term for you.

Nagi Elabbasi
Veryst Engineering
You are calculating the integration over the wrong surface. You should do a line integration over the top or bottom line of U*2*pi*r. You can also integrate over the same line, just U and select “Compute surface integral” in the Integration settings. That way COMSOL internally adds the 2*pi*r term for you. Nagi Elabbasi Veryst Engineering

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 10, 2012, 4:09 a.m. EST
Yes, that's it.
Thanks for your help.
Yes, that's it. Thanks for your help.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 15, 2012, 4:32 a.m. EST
May i know why you recommend to use U*2*pi*r? as in my opinion, U is only represent for the radial velocity, not the whole model velocity.

and by default, comsol give us spf.U which calculate 3D velocity.

I thought we should use spf.U rather U, as it represent the velocity in 3D domain.

sorry, i am just curious, and hope you can evaluate more.
May i know why you recommend to use U*2*pi*r? as in my opinion, U is only represent for the radial velocity, not the whole model velocity. and by default, comsol give us spf.U which calculate 3D velocity. I thought we should use spf.U rather U, as it represent the velocity in 3D domain. sorry, i am just curious, and hope you can evaluate more.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 15, 2012, 7:34 a.m. EST
Hi

I'm not sure the comment was ment on the U or spf.U but rather on the 2*pi*r multiplier that one should not forget (or ask COMSOL to include) as 2D-axi is a cut representation of 3D with a domain 2D-axi representing a domain 2D volume via the 2*pi*r multiplier, and a 2D-axi boundary (line) representing a surface in 3D via the same 2*pi*r. I usually call the 2*pi* r multiplier the "loop length", in analyogy with a coil loop often represented in 2Daxi

--
Good luck
Ivar
Hi I'm not sure the comment was ment on the U or spf.U but rather on the 2*pi*r multiplier that one should not forget (or ask COMSOL to include) as 2D-axi is a cut representation of 3D with a domain 2D-axi representing a domain 2D volume via the 2*pi*r multiplier, and a 2D-axi boundary (line) representing a surface in 3D via the same 2*pi*r. I usually call the 2*pi* r multiplier the "loop length", in analyogy with a coil loop often represented in 2Daxi -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 23, 2012, 6:40 p.m. EDT
Jaap,

I was actually attempting the exact same experiment as you for the same reasons. Do you mind me asking what the specific inlet and outlet boundary conditions you used are? My problem is the velocity profile is flat at the beginning and has to correct itself into a parabolic formation as it progresses through the tube, almost as if it was pulling fluid from a reservoir I am running version 4.1 so I was unable to view your mph file. Any advice on this would be greatly appreciated.

Thanks,

Josh
Jaap, I was actually attempting the exact same experiment as you for the same reasons. Do you mind me asking what the specific inlet and outlet boundary conditions you used are? My problem is the velocity profile is flat at the beginning and has to correct itself into a parabolic formation as it progresses through the tube, almost as if it was pulling fluid from a reservoir I am running version 4.1 so I was unable to view your mph file. Any advice on this would be greatly appreciated. Thanks, Josh

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 24, 2012, 4:31 a.m. EDT
Hello Josh,

This is actually something I can answer.
When using the velocity BC you have to make it parabolic as function of the distance from the walls.
Most people on Comsol seem to use the following notation: Vy*4*s*(1-s)
s is a variable across the edge of your 2D BC that goes from 0 to 1.
Where Vy is the max speed (m/s) of the flow.
If your design goes from left to right you put this in y velocity field, and leave x at 0. There is no flow parallel to the BC edge. You'll have to change it again for axisymmetric notations.

You will see this notation for velocity field more and more, it's one of those unwritten rules of Comsol.

Cheers,
Jaap
Hello Josh, This is actually something I can answer. When using the velocity BC you have to make it parabolic as function of the distance from the walls. Most people on Comsol seem to use the following notation: Vy*4*s*(1-s) s is a variable across the edge of your 2D BC that goes from 0 to 1. Where Vy is the max speed (m/s) of the flow. If your design goes from left to right you put this in y velocity field, and leave x at 0. There is no flow parallel to the BC edge. You'll have to change it again for axisymmetric notations. You will see this notation for velocity field more and more, it's one of those unwritten rules of Comsol. Cheers, Jaap

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 25, 2012, 12:49 a.m. EDT
Hi

I would not call this an "unwritten rule of COMSOL" for me the parabolic profile is a properties of laminar fluid flow in a tuble or between two plates. The viscosity of a fluid shlows down the flow to about "0" at any fixed surface (at least in "low velocity" laminar case. The rule I would say is to rather propose an initial condition close to the reality, therefore a parabolic profile is closer than a flat field. The proof, the flat field develops to a parabolic one.

now if you want to study the velocity profile at the tube inlet, when coming froma larger reservoir, then you need to model at least part of the reservoir, and the inlet tube shape will influence the velocity distribution strongly

--
Good luck
Ivar
Hi I would not call this an "unwritten rule of COMSOL" for me the parabolic profile is a properties of laminar fluid flow in a tuble or between two plates. The viscosity of a fluid shlows down the flow to about "0" at any fixed surface (at least in "low velocity" laminar case. The rule I would say is to rather propose an initial condition close to the reality, therefore a parabolic profile is closer than a flat field. The proof, the flat field develops to a parabolic one. now if you want to study the velocity profile at the tube inlet, when coming froma larger reservoir, then you need to model at least part of the reservoir, and the inlet tube shape will influence the velocity distribution strongly -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 25, 2012, 3:58 a.m. EDT
It's not that a parabolic velocity profile is an unwritten rule, that's physics.
I meant that to write it as 's(1-s)'. Everyone seems to notate it that way without exception.
It's not that a parabolic velocity profile is an unwritten rule, that's physics. I meant that to write it as 's(1-s)'. Everyone seems to notate it that way without exception.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 25, 2012, 4:20 p.m. EDT
Hi

I agree but "s" being the arc length variable, normalised to "1" for all edges (at least in 2D), so the logic is there, and it's documented, but agree there are so many pages ;)

But the search function is working on the COMSOL help files too, so give it a try

--
Good luck
Ivar
Hi I agree but "s" being the arc length variable, normalised to "1" for all edges (at least in 2D), so the logic is there, and it's documented, but agree there are so many pages ;) But the search function is working on the COMSOL help files too, so give it a try -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 26, 2012, 1:20 p.m. EDT
Thank you both for your informative and prompt responses. I'll give this a shot and see what I come up with. The more I learn about COMSOL the more I appreciate what its capable of. These tips are extremely helpful. Thanks again!

Josh
Thank you both for your informative and prompt responses. I'll give this a shot and see what I come up with. The more I learn about COMSOL the more I appreciate what its capable of. These tips are extremely helpful. Thanks again! Josh

Saeid Norouzi Apourvari

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 3, 2013, 2:21 a.m. EST
Dear Jaap,

I tried to reproduce what you did to get an idea of how COMSOL calculates flow rate. However, I am also getting two different flow rates from analytical and simulation (nearly 22 unit difference). I went through the recommendations but still could not figure it out where the problem is. Would you please have a look at the snapshot of my model attached and advise me on that?
Analytical flow rate (Poiseuille flow): 0.32 m^3/s
Numerical (COMSOL) : 0.0144 m^3/s -------> using surface integration

I am using v42 and could not find the "compute surface integral" under the Integral setting as Nagi recommended for 2D.

Best regards,
Dear Jaap, I tried to reproduce what you did to get an idea of how COMSOL calculates flow rate. However, I am also getting two different flow rates from analytical and simulation (nearly 22 unit difference). I went through the recommendations but still could not figure it out where the problem is. Would you please have a look at the snapshot of my model attached and advise me on that? Analytical flow rate (Poiseuille flow): 0.32 m^3/s Numerical (COMSOL) : 0.0144 m^3/s -------> using surface integration I am using v42 and could not find the "compute surface integral" under the Integral setting as Nagi recommended for 2D. Best regards,


Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 3, 2013, 4:57 a.m. EST
Hi

I do not see why it should not give as the anlyitcal results, for me it has always matched, within 10-20%often far better depending on meshing and on model

the 2*pi*r multiplier applies onlyy to 2D-Axi, the option is in one of the Definition Model coupling Integration node sub-tab, closed by default. But you can also easily add the 2*pi*r by hand, so long you do not both, you see the error in case in the units

In 3D a direct integration over the bondary should work, provided the mesh is fine enough to correctly resolve the velocity along the tue axis, and the parabolic profile across the boundary

--
Good luck
Ivar
Hi I do not see why it should not give as the anlyitcal results, for me it has always matched, within 10-20%often far better depending on meshing and on model the 2*pi*r multiplier applies onlyy to 2D-Axi, the option is in one of the Definition Model coupling Integration node sub-tab, closed by default. But you can also easily add the 2*pi*r by hand, so long you do not both, you see the error in case in the units In 3D a direct integration over the bondary should work, provided the mesh is fine enough to correctly resolve the velocity along the tue axis, and the parabolic profile across the boundary -- Good luck Ivar

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 8:58 a.m. EST
It is not uncommon when you have a coarse mesh through the cross-section to get a flow rate that is much smaller than the correct value.

Nagi Elabbasi
Veryst Engineering
It is not uncommon when you have a coarse mesh through the cross-section to get a flow rate that is much smaller than the correct value. Nagi Elabbasi Veryst Engineering

Saeid Norouzi Apourvari

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 7:28 p.m. EST
Dear Ivar and Nagi,

Thank you so much for your help,
That's right, my mesh is quite coarse on the boundary where I compute the surface integration.
I was thinking that I should get better result (for the same mesh quality) when I am using volume intergration or volume averaging instead of surface integration but still not that much difference!

Regards,
saeid
Dear Ivar and Nagi, Thank you so much for your help, That's right, my mesh is quite coarse on the boundary where I compute the surface integration. I was thinking that I should get better result (for the same mesh quality) when I am using volume intergration or volume averaging instead of surface integration but still not that much difference! Regards, saeid

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 6, 2013, 12:52 a.m. EST
Hi

Check the KB (knowledge Base of COMSOL) about flux derivations

--
Good luck
Ivar
Hi Check the KB (knowledge Base of COMSOL) about flux derivations -- Good luck Ivar

Saeid Norouzi Apourvari

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 6, 2013, 5:18 p.m. EST
I will go for it,

Thanks again Ivar,

Regards,
I will go for it, Thanks again Ivar, Regards,

Saeid Norouzi Apourvari

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 7, 2013, 8:16 a.m. EST
Wow, what a mistake! my mesh was soooo big.

Multiplying the radius and the length by 10^-6 gives the same result as analytical method.

Thanks Nagi,

Regards,
saeid
Wow, what a mistake! my mesh was soooo big. Multiplying the radius and the length by 10^-6 gives the same result as analytical method. Thanks Nagi, Regards, saeid

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 8, 2013, 12:30 p.m. EST
Hi

Yes use the units they help ;) But I have asking COMSOL to pls add the units by the triedre x,y,z, for the graphics too, as when we see a graph we have no indications of the units, putting a small (m) or (mm) or (um), would not take a big effort, but that one they have not managed yet ;)
So perhaps if we are several to send a demand to support it will come.

My demand:, all graphs shall (mandatory) have clear indications where, what, when, whom, ... so also UNITS, specially as everaything else (almost) has units in COMSOL, that is one of their best V&V features so far, very handy, and even better if fully systematic

--
Good luck
Ivar
Hi Yes use the units they help ;) But I have asking COMSOL to pls add the units by the triedre x,y,z, for the graphics too, as when we see a graph we have no indications of the units, putting a small (m) or (mm) or (um), would not take a big effort, but that one they have not managed yet ;) So perhaps if we are several to send a demand to support it will come. My demand:, all graphs shall (mandatory) have clear indications where, what, when, whom, ... so also UNITS, specially as everaything else (almost) has units in COMSOL, that is one of their best V&V features so far, very handy, and even better if fully systematic -- Good luck Ivar

Saeid Norouzi Apourvari

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 9, 2013, 4:42 a.m. EST
Hi Ivar,

You are exactly right. Sometimes small things are not really small and could help too much.
I also kindly request COMSOL to add units to the graphs as well.

Regards,
Saeid
Hi Ivar, You are exactly right. Sometimes small things are not really small and could help too much. I also kindly request COMSOL to add units to the graphs as well. Regards, Saeid

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.