|
[Sponsors] |
November 8, 2016, 03:53 |
Time step continuity error unit
|
#1 |
New Member
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
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 :-) |
|
November 14, 2016, 08:18 |
|
#2 |
New Member
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
No one knows?
|
|
December 1, 2016, 08:01 |
|
#3 |
New Member
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
Anybody knows?
|
|
December 2, 2016, 14:55 |
|
#4 |
Member
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9 |
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 http://www.cfd-online.com/Forums/ope...tml#post201896 |
|
December 5, 2016, 08:33 |
|
#5 | |
New Member
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
Quote:
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? |
||
December 5, 2016, 21:20 |
|
#6 |
Member
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9 |
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. |
|
December 6, 2016, 10:12 |
|
#7 |
New Member
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
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? |
|
December 6, 2016, 15:21 |
|
#8 |
Member
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9 |
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))’ |
|
December 9, 2016, 09:58 |
|
#9 | |
New Member
Thomas A
Join Date: Mar 2016
Posts: 18
Rep Power: 10 |
Quote:
globalContErr/flux_inlet*100 ? |
||
|
|
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 |