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

calculateStress.H

Go to the documentation of this file.
00001     if (runTime.outputTime())
00002     {
00003         volSymmTensorField sigma
00004         (
00005             IOobject
00006             (
00007                 "sigma",
00008                 runTime.timeName(),
00009                 mesh,
00010                 IOobject::NO_READ,
00011                 IOobject::AUTO_WRITE
00012             ),
00013             rho*sigmaD
00014         );
00015 
00016         if (thermalStress)
00017         {
00018             const volScalarField& T = Tptr();
00019             sigma = sigma - I*(rho*threeKalpha*T);
00020         }
00021 
00022         volScalarField sigmaEq
00023         (
00024             IOobject
00025             (
00026                 "sigmaEq",
00027                 runTime.timeName(),
00028                 mesh,
00029                 IOobject::NO_READ,
00030                 IOobject::AUTO_WRITE
00031             ),
00032             sqrt((3.0/2.0)*magSqr(dev(sigma)))
00033         );
00034 
00035         Info<< "Max sigmaEq = " << max(sigmaEq).value()
00036             << endl;
00037 
00038         runTime.write();
00039     }
00040 
00041 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines