ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / stressAnalysis / solidEquilibriumDisplacementFoam / kineticEnergyLimiter.H
blob169c7f229f2ca2911aad4188e35391a3a97c2ecf
1 if (!(runTime.timeIndex() % 5))
3     volScalarField kineticEnergy(magSqr(Dcorr));
4     dimensionedScalar intKineticEnergy = fvc::domainIntegrate(kineticEnergy);
5     Info<< "kineticEnergy = " << intKineticEnergy.value() << endl;
7     volScalarField kineticPower((Dcorr - Dcorr.oldTime()) & Dcorr);
8     dimensionedScalar intKineticPower = fvc::domainIntegrate(kineticPower);
9     Info<< "kineticPower = " << intKineticPower.value() << endl;
11     scalar smi = intKineticPower.value()/(intKineticEnergy.value() + VSMALL);
12     Info<< "smi = " << smi << endl;
14     if (smi < -SMALL)
15     {
16         Info<< "Resetting Dcorr to 0" << endl;
17         Dcorr == dimensionedVector("0", Dcorr.dimensions(), vector::zero);
18     }