CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Scaling outlet massflow for incompressible flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2016, 08:06
Default Scaling outlet massflow for incompressible flow
  #1
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
For incompressible flow, I have to scale the outlet massflow to achieve global mass bilance every iteration. Do I have to scale the massflow only for the pressure-correction equation or also for the momentum equations?

And please tell me, if you're sure about our answer.
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 11:43
Default
  #2
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Pressure correction equations requires mass imbalance. So the outlet flux is corrected just before it and pressure correction source is built from corrected flux.

Flux correction after pressure correction is solved is set to 0 or flux is not corrected after continuity solve.

This way both pressure and momentum equation see this flux correction.



Quote:
Originally Posted by Jan Smedseng View Post
For incompressible flow, I have to scale the outlet massflow to achieve global mass bilance every iteration. Do I have to scale the massflow only for the pressure-correction equation or also for the momentum equations?

And please tell me, if you're sure about our answer.
arjun is offline   Reply With Quote

Old   July 17, 2016, 14:21
Default
  #3
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Ok, thank you. But I got one more question. After the first iteration solving the momentum equation, I got a massflow of 0 kg/s on every outlet face, because the flow has not reached the outlet after the first iteration. So i cannot scale the massflow relativ to it's uncorrected value. I have to scale it relativ to the face area or something similar.

How can I ever get a full developed flow profile at the outlet?
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 14:40
Default
  #4
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Jan Smedseng View Post
Ok, thank you. But I got one more question. After the first iteration solving the momentum equation, I got a massflow of 0 kg/s on every outlet face, because the flow has not reached the outlet after the first iteration. So i cannot scale the massflow relativ to it's uncorrected value. I have to scale it relativ to the face area or something similar.

How can I ever get a full developed flow profile at the outlet?

The correction that is made is additive. If there was total inflow of Min and if your outflow total was Mout = 0, then correction added to outflow is (Mout - Min), and the scheme by which you chose to distribute is dependent on you. For example if there are Nout control volume faces in outflow, you may chose to add (Mout - Min)/Nout to each face or you may want to have weighted correction by their Areas. Choice is yours.
arjun is offline   Reply With Quote

Old   July 17, 2016, 14:41
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Jan Smedseng View Post
Ok, thank you. But I got one more question. After the first iteration solving the momentum equation, I got a massflow of 0 kg/s on every outlet face, because the flow has not reached the outlet after the first iteration. So i cannot scale the massflow relativ to it's uncorrected value. I have to scale it relativ to the face area or something similar.

How can I ever get a full developed flow profile at the outlet?
what do you mean exactly? the mass imbalance is the residual of the continuity equation to be driven to zero... of course, in the incompressible case the pressure propagation of the gradient is immediate (Mach=0).
What about the initial condition you use? if you set an inflow but a rest condition you prescribed an initial condition with a wrong non divergence-free condition
FMDenaro is offline   Reply With Quote

Old   July 17, 2016, 15:10
Default
  #6
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
What about the initial condition you use? if you set an inflow but a rest condition you prescribed an initial condition with a wrong non divergence-free condition
I'm initializing with zero - so the initial flow field with the boundary conditions leads to a non divergence-free flow. In the first iteration, the pressure is zero everywhere. So the Massflow on the outlet faces is zero everywhere. I wanted to know, how to scale the massflow on the outlet faces, if I cannot take the current massflow to scale it relative to.
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 15:23
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
from a mathematical point of view for incompressible flows (div v = 0 everywhere and at any time) while setting at t=0 an inflow velocity profile you cannot set the rest as initial condition. You did that but this is just an arbitrary numerical condition that must be corrected at t=0. Therefore you cannot normalize with the zero mass at the outlet.
FMDenaro is offline   Reply With Quote

Old   July 17, 2016, 15:50
Default
  #8
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
from a mathematical point of view for incompressible flows (div v = 0 everywhere and at any time) while setting at t=0 an inflow velocity profile you cannot set the rest as initial condition. You did that but this is just an arbitrary numerical condition that must be corrected at t=0. Therefore you cannot normalize with the zero mass at the outlet.
Sure, it is not correct - but I have to define something for the first iteration. But at the inlet, my solver is working I think. At the outlet, I get very high and unphysical results after some iterations.

I thought, the pressure correction equation cannot be solved if global mass bilance is not zero. The mass-divergence inside of the domain should be corrected by pressure, velocity and massflow-correction I'm doing after solving the pressure correction euqation.

I uploaded a video showing my problem:
https://youtu.be/Ba8XKHg6l0s

All the large boundaries are walls - you can see the velocity displayed on the wall, because I'm displaying the conservative values.

Sorry, but my program is not displaying the minimum and maximum values at the legende yet. You have to look in the left bottom area to find this values.
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 15:55
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
why don't you start with an initial pressure field that satisfies the pressure equation

Div Grad p = source

where source takes into account you numerical initial velocity field ?
FMDenaro is offline   Reply With Quote

Old   July 17, 2016, 15:56
Default
  #10
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
why don't you start with an initial pressure field that satisfies the pressure equation

Div Grad p = source

where source takes into account you numerical initial velocity field ?
But that can become very wrong, if I use unstructural grids with large volume rations, doesn't it?
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 16:00
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Jan Smedseng View Post
But that can become very wrong, if I use unstructural grids with large volume rations, doesn't it?

why? it is a linear equation you can solve on unstructured grid by using the integral form
FMDenaro is offline   Reply With Quote

Old   July 17, 2016, 16:02
Default
  #12
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
why? it is a linear equation you can solve on unstructured grid by using the integral form
Because this initial source is based on the massflow on the inlet - and on the inlet, the massflow is defined by the area of the face and the inlet velocity. If a cell inside the domain is much larger or much smaller than my inlet cell, the massflow source is not correct. Maybe, I misunderstood you.
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 16:05
Default
  #13
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Jan Smedseng View Post
Because this initial source is based on the massflow on the inlet - and on the inlet, the massflow is defined by the area of the face and the inlet velocity. If a cell inside the domain is much larger or much smaller than my inlet cell, the massflow source is not correct. Maybe, I misunderstood you.

sorry but I don't understand you point ...for each face the mass flow is given by the averaged inflow velocity on the face area multiplied by the area, so what is the problem?
FMDenaro is offline   Reply With Quote

Old   July 17, 2016, 16:11
Default
  #14
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
sorry but I don't understand you point ...for each face the mass flow is given by the averaged inflow velocity on the face area multiplied by the area, so what is the problem?
Yes, you're right. I'll try that and write later.

But shouldn't the solver be able, to converge with zero initialisation? Because, if I have a U-pipe, this initialisation will be very wrong again, because the velocity vector is wrong directed after the turning of the flow.
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 16:16
Default
  #15
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Jan Smedseng View Post
Yes, you're right. I'll try that and write later.

But shouldn't the solver be able, to converge with zero initialisation? Because, if I have a U-pipe, this initialisation will be very wrong again, because the velocity vector is wrong directed after the turning of the flow.

you should get the pressure field (its gradients) in such a way that the mass imbalance is corrected... be careful to the boundary condition for the pressure gradient.
Are you simulating a steady flow?
FMDenaro is offline   Reply With Quote

Old   July 17, 2016, 16:18
Default
  #16
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Jan Smedseng View Post
Yes, you're right. I'll try that and write later.

But shouldn't the solver be able, to converge with zero initialisation? Because, if I have a U-pipe, this initialisation will be very wrong again, because the velocity vector is wrong directed after the turning of the flow.

It does all the time, you can use starccm or fluent to verify that.

BTW: They add the correction just as I mention.
arjun is offline   Reply With Quote

Old   July 17, 2016, 16:42
Default
  #17
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
you should get the pressure field (its gradients) in such a way that the mass imbalance is corrected... be careful to the boundary condition for the pressure gradient.
Are you simulating a steady flow?
I'm simulating a steady state flow without transient terms. What do you mean with being careful with the boundary conditions for the pressure gradient? For the gradient calculation, I use:
- Zero for the outlet calculating the pressure correction gradient
- Specified static pressure for calculating the pressure gradient.

On the outlet, I'm adding the massflow to the right hand vector and the diffusive flux coefficients to the current matrix element.

Should the pressure correction correct the massflow in a way, that the flow is divergence free also after the first second? Because I'm calculating the mass bilance for every element before and after the massflow correction. Doesn't look so well:


The imbalance is increasing with the correction as you can see :-(
https://youtu.be/gVi1vg4Vk78
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 16:43
Default
  #18
Member
 
Jan
Join Date: Jul 2013
Location: Berlin - Germany
Posts: 36
Rep Power: 12
Jan Smedseng is on a distinguished road
Quote:
Originally Posted by arjun View Post
It does all the time, you can use starccm or fluent to verify that.

BTW: They add the correction just as I mention.
Thanks. I do not have starccm but I got fluent. There, I cannot have a look on the corrections. In fluent, the flow looks great after the first iteration, also using simple algorithm.
Jan Smedseng is offline   Reply With Quote

Old   July 17, 2016, 23:44
Default
  #19
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Jan Smedseng View Post
Thanks. I do not have starccm but I got fluent. There, I cannot have a look on the corrections. In fluent, the flow looks great after the first iteration, also using simple algorithm.

You can not look at corrections in fluent but you know what the corrections are in fluent. I said Min + Mout + Nfaces x Correction = 0;
(Min is negative in sign as V dot Area is negative here)

Mout = 0

so
Correction = -Min/Nfaces. (actually it is weighted by area in case of fluent so large agea face gets proportional correction)

This is added to all the outlet faces. This is done just before pressure correction is build.

For ccm the result will be similar (depending on level of convergence in pressure correction solver).


The problem i think is word 'scaling' which implies some sort of multiplication factor. But then you get into problem of multiplication by 0. This is why in practice correction is 'added'.

Here is another thing to note is that velocities are not touched on outlet. They are extrapolated from inside and when on convergence they would be fine.

Another thing to note is that you can leave the 'scaling' and only do velocities extrapolation and still everything shall be fine as pressure correction shall take care of inlet = outlet mass flow issue. The scaling only expedites the convergence.
arjun is offline   Reply With Quote

Reply


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
Reverse flow at Outlet ARUN K RAJ Main CFD Forum 4 March 18, 2015 09:43
open channel flow BC pressure outlet Ema40 Fluent Multiphase 0 January 17, 2015 07:21
VOF Outlet boundary condition in cfd - ace JM Main CFD Forum 0 December 15, 2006 08:07
Outlet BC for subsonic flow in pipe andrea panizza FLUENT 6 May 10, 2003 07:44
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44


All times are GMT -4. The time now is 19:03.