Time step continuity error unit
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 :-) |
No one knows?
|
Anybody knows?
|
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 |
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? |
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. |
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? |
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))’ |
Quote:
globalContErr/flux_inlet*100 ? |
All times are GMT -4. The time now is 06:31. |