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.

Accurate inflow/outflow calculation

Please login with a confirmed email address before reporting spam

Hi, I'm using the Free&Porous workflow, but the question is also applicable to Navier-Stokes.

I have an inlet and use NormalVelocity boundary condition which, it seems sets up a Lagrange multiplier to enforce u = u_0. No problem.

But when I do an integral over the inlet surface to check that total fluid-in matches the desired actual fluid in, then I have a big error (>20%). Yes, I could mesh more finely....

But I thought I remember a "trick" for accurate calculations of flow across a surface. Isn't this equal to a Lagrange multiplier or something? Maybe I am misremembering.

Does this ring a bell with anyone??

Thanks, John

2 Replies Last Post 20.11.2014, 12:03 GMT-5
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 17.11.2014, 09:05 GMT-5
Hi John,
Maybe this is the technique you remember: www.comsol.com/support/knowledgebase/973/
Best,
Jeff
Hi John, Maybe this is the technique you remember: http://www.comsol.com/support/knowledgebase/973/ Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 20.11.2014, 12:03 GMT-5
Thanks, yes, Jeff, this was what I had in mind. My problem is linear. If I use velocity constraint on u in the fp interface then [I think] this is established as Dirichlet u = u0.

To type in some exemplary values

computed surface integral of fp.U across inlet = 0.006 m^3/s
computed integral of fp.U0 = 0.007 m^3/s
computed inlet pressure is 500psi

So that raises the fun question of whether the infinitely converged answer for the pressure drop would be 500 * 0.007/0.006

If so, then I can simply do nothing! :-)

Alternatively, if I choose Dirichlet on p=500 then I get computed surface integral on fp.U of 0.006 m^3/s so I don't know that I've got anything wrong.

I'll try a weak constraint on u=u0 next

Thanks, John
Thanks, yes, Jeff, this was what I had in mind. My problem is linear. If I use velocity constraint on u in the fp interface then [I think] this is established as Dirichlet u = u0. To type in some exemplary values computed surface integral of fp.U across inlet = 0.006 m^3/s computed integral of fp.U0 = 0.007 m^3/s computed inlet pressure is 500psi So that raises the fun question of whether the infinitely converged answer for the pressure drop would be 500 * 0.007/0.006 If so, then I can simply do nothing! :-) Alternatively, if I choose Dirichlet on p=500 then I get computed surface integral on fp.U of 0.006 m^3/s so I don't know that I've got anything wrong. I'll try a weak constraint on u=u0 next Thanks, John

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.