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

Check mass continuity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2006, 05:42
Default Hi! Is there an easy way to
  #1
Member
 
Andreas Hauffe
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 36
Rep Power: 17
andimb is on a distinguished road
Hi!

Is there an easy way to check the mass continuity (incompressible) at the Inlet compared to the Outlet? I never wrote something in C++, so it would be hard to write some code. I'm just used to FORTRAN and Java.

If there's now easy way I could use the liftDrag tool as example, right? This is quit near to this.

The mass continuity for an incompressible flow is defined as div U = 0. Could I use that for a check.

Andreas
andimb is offline   Reply With Quote

Old   March 22, 2006, 08:11
Default Hi! I found the button in p
  #2
Member
 
Andreas Hauffe
Join Date: Mar 2009
Location: Dresden, Germany
Posts: 36
Rep Power: 17
andimb is on a distinguished road
Hi!

I found the button in paraView to integrate over surfaces. So it is ok

Thanks
Andreas
andimb is offline   Reply With Quote

Old   March 23, 2006, 06:39
Default Write a little code and do a s
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Write a little code and do a sum of the fluxes, e.g.

sum(phi.boundaryField()[outletPatchIndex])

Remember, the flux going out is positive and the one going in is negative.

The local and global continuity data also gets reported during the run - have a look at your log file or the implementation. For incompressible flows src/cfdTools/incompressible/continuityErrs.H does the sum over all cells:


scalar sumLocalContErr = runTime.deltaT().value()*
mag(fvc::div(phi))().weightedAverage(mesh.V()).val ue();

scalar globalContErr = runTime.deltaT().value()*
fvc::div(phi)().weightedAverage(mesh.V()).value();
cumulativeContErr += globalContErr;

Info<< "time step continuity errors : sum local = " << sumLocalContErr
<< ", global = " << globalContErr
<< ", cumulative = " << cumulativeContErr
<< endl;


Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   April 13, 2006, 11:20
Default Hi, I have calculate a tuto
  #4
tak
New Member
 
taka
Join Date: Mar 2009
Location: Japan
Posts: 7
Rep Power: 17
tak is on a distinguished road
Hi,

I have calculate a tutorial case "pitzDaily" with transports of chmical species (H2,O2,N2....) by means of reactingFoam (no reaction).
Could you please teach me how to calculate the material balances of chemical species ?

Now, I can calculate mass flow rates at the inlet and outlet like this:
label inletPatchi = mesh.boundaryMesh().findPatchID("inlet");
scalar inFlux = sum(phi.boundaryField()[inletPatchi]);
But I can't calculate mass flow rates of chemical species at the inlet and outlet.

Thanking you in advance for your help,

taka
tak is offline   Reply With Quote

Old   April 14, 2006, 03:02
Default Sorry, it's so easy to calcula
  #5
tak
New Member
 
taka
Join Date: Mar 2009
Location: Japan
Posts: 7
Rep Power: 17
tak is on a distinguished road
Sorry, it's so easy to calculate mass flow rate of chemical specie Y[i] at an inlet.

scalar inFlux =
sum(phi.boundaryField()[inletPatchi]
* sum(rho.boundaryField()[inletPatchi]
* Y[i];

Thanks.
tak is offline   Reply With Quote

Old   June 4, 2008, 05:28
Default Hi all, i can see that phi(fl
  #6
Member
 
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 17
suredross is on a distinguished road
Hi all,
i can see that phi(flux)is calculated for each time step and has entries for each cell.now comes the question:how does one verify that mass continuity and or conservation is achieved?is it by looking at the entries in the phi file and making sure that they are the same,taking into account the + and - signs correspond to outlet and inlet values?or am i totally wrong?
thanks for the help.

cheers
davey
suredross 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
How to check Heat Balance in heat transfer like mass balance for flow mahendra OpenFOAM Post-Processing 15 February 8, 2012 10:19
How to check Y value sivakumar OpenFOAM Pre-Processing 3 October 6, 2008 14:59
Please check this UDF. Josh FLUENT 0 February 8, 2006 11:27
Check this UDF,please. Josh FLUENT 2 February 2, 2006 14:02
Cell check and Boundary check errors AB Siemens 4 October 28, 2004 13:04


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