kineticEnergyLimiter.H
Go to the documentation of this file.
1 if (!(runTime.timeIndex() % 5))
2 {
3  volScalarField kineticEnergy(magSqr(Dcorr));
4  dimensionedScalar intKineticEnergy = fvc::domainIntegrate(kineticEnergy);
5  Info<< "kineticEnergy = " << intKineticEnergy.value() << endl;
6 
7  volScalarField kineticPower((Dcorr - Dcorr.oldTime()) & Dcorr);
8  dimensionedScalar intKineticPower = fvc::domainIntegrate(kineticPower);
9  Info<< "kineticPower = " << intKineticPower.value() << endl;
10 
11  scalar smi = intKineticPower.value()/(intKineticEnergy.value() + vSmall);
12  Info<< "smi = " << smi << endl;
13 
14  if (smi < -small)
15  {
16  Info<< "Resetting Dcorr to 0" << endl;
17  Dcorr == dimensionedVector(Dcorr.dimensions(), Zero);
18  }
19 }
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
static const zero Zero
Definition: zero.H:97
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info