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

Time step continuity error unit

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2016, 03:53
Default Time step continuity error unit
  #1
New Member
 
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10
tdog is on a distinguished road
Hello
I am trying to figure out the unit of the global time step continuity error. Is it in percent, in decimal percent, or something else entirely?

I hope someone can help :-)
tdog is offline   Reply With Quote

Old   November 14, 2016, 08:18
Default
  #2
New Member
 
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10
tdog is on a distinguished road
No one knows?
tdog is offline   Reply With Quote

Old   December 1, 2016, 08:01
Default
  #3
New Member
 
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10
tdog is on a distinguished road
Anybody knows?
tdog is offline   Reply With Quote

Old   December 2, 2016, 14:55
Default
  #4
Member
 
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9
decah is on a distinguished road
Hi Thomas

It's a scalar field representing the sum of all the deviations in the continuity equation (grad.u=0) over all cells. Therefore it is representing flux, not percentages!

Take a look a the continuityErrs.H file in
Code:
src/finiteVolume/cfdTools/incompressible/continuityErrs.H
and also this post:
http://www.cfd-online.com/Forums/ope...tml#post201896
decah is offline   Reply With Quote

Old   December 5, 2016, 08:33
Default
  #5
New Member
 
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10
tdog is on a distinguished road
Quote:
Originally Posted by decah View Post
Hi Thomas

It's a scalar field representing the sum of all the deviations in the continuity equation (grad.u=0) over all cells. Therefore it is representing flux, not percentages!

Take a look a the continuityErrs.H file in
Code:
src/finiteVolume/cfdTools/incompressible/continuityErrs.H
and also this post:
http://www.cfd-online.com/Forums/ope...tml#post201896
Hi, thanks for replying :-)
Ok, so flux, but in what unit? I saw that in the post linked it was for incompressible flow, I'm running rhoSimplecFoam, which is for compressible flows, so the the continuity error file looks like this instead:

{
dimensionedScalar totalMass = fvc::domainIntegrate(rho);

scalar sumLocalContErr =
(fvc::domainIntegrate(mag(rho - thermo.rho()))/totalMass).value();

scalar globalContErr =
(fvc::domainIntegrate(rho - thermo.rho())/totalMass).value();

cumulativeContErr += globalContErr;

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

If using SI units, the difference between rho and thermo.rho must be in kg/m^3, right? And the total mass is a volume integral over rho, so that must be in kg? I am unsure what value value() takes, but according to the thread it's usually 1, but in what unit?

So that means the unit of globalContErr is 1/m^3 is that correct? How do I then normalise this so I can get it in percentage?
tdog is offline   Reply With Quote

Old   December 5, 2016, 21:20
Default
  #6
Member
 
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9
decah is on a distinguished road
I don't work with compressible flows myself, but after running an incompressible simulation I can go to any one of the time directories in the case folder and look at the phi file. Near the top I find: dimensions [0 3 -1 0 0 0 0]; which tells me the units of phi (and therefore units of the time step continuity error in my case) is m3/s (i.e. volume flux).

So you can double check your rho files for the units but it looks to me like your units are rho/mass = (kg/m3)/(kg) = m-3.
decah is offline   Reply With Quote

Old   December 6, 2016, 10:12
Default
  #7
New Member
 
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10
tdog is on a distinguished road
Hey decah, thanks for replying.

Ok, from that it seems like my flux is mass flow with units kg/s. Do I need to compute the mass flux at the inlets in order to normalise the continuity errors?
tdog is offline   Reply With Quote

Old   December 6, 2016, 15:21
Default
  #8
Member
 
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9
decah is on a distinguished road
I'm not sure what you mean by 'normalise' the errors, but if you want to compute mass flux at inlet you can run

Code:
postProcess -funcs '(flowRatePatch(name=inlet))’
decah is offline   Reply With Quote

Old   December 9, 2016, 09:58
Default
  #9
New Member
 
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10
tdog is on a distinguished road
Quote:
Originally Posted by decah View Post
I'm not sure what you mean by 'normalise' the errors, but if you want to compute mass flux at inlet you can run

Code:
postProcess -funcs '(flowRatePatch(name=inlet))’
Okay, so if the continuity error is a deviation between what comes into the system and what comes out, then by calculating the flux of the inlet, I should be able to find the global error in percentage by the following formula:

globalContErr/flux_inlet*100

?
tdog 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
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 20:14.