FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

kineticEnergyLimiter.H

Go to the documentation of this file.
00001 if (!(runTime.timeIndex() % 5))
00002 {
00003     volScalarField kineticEnergy = magSqr(Dcorr);
00004     dimensionedScalar intKineticEnergy = fvc::domainIntegrate(kineticEnergy);
00005     Info<< "kineticEnergy = " << intKineticEnergy.value() << endl;
00006 
00007     volScalarField kineticPower = (Dcorr - Dcorr.oldTime()) & Dcorr;
00008     dimensionedScalar intKineticPower = fvc::domainIntegrate(kineticPower);
00009     Info<< "kineticPower = " << intKineticPower.value() << endl;
00010 
00011     scalar smi = intKineticPower.value()/(intKineticEnergy.value() + VSMALL);
00012     Info<< "smi = " << smi << endl;
00013 
00014     if (smi < -SMALL)
00015     {
00016         Info<< "Resetting Dcorr to 0" << endl;
00017         Dcorr == dimensionedVector("0", Dcorr.dimensions(), vector::zero);
00018     }
00019 }
00020 
00021 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines