calculateStress.H
Go to the documentation of this file.
1  if (runTime.outputTime())
2  {
4  (
5  IOobject
6  (
7  "sigma",
8  runTime.timeName(),
9  mesh,
10  IOobject::NO_READ,
11  IOobject::AUTO_WRITE
12  ),
13  rho*sigmaD
14  );
15 
16  if (thermalStress)
17  {
18  const volScalarField& T = Tptr();
19  sigma = sigma - I*(rho*threeKalpha*T);
20  }
21 
22  volScalarField sigmaEq
23  (
24  IOobject
25  (
26  "sigmaEq",
27  runTime.timeName(),
28  mesh,
29  IOobject::NO_READ,
30  IOobject::AUTO_WRITE
31  ),
32  sqrt((3.0/2.0)*magSqr(dev(sigma)))
33  );
34 
35  Info<< "Max sigmaEq = " << max(sigmaEq).value()
36  << endl;
37 
38  runTime.write();
39  }
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:261
Foam::volSymmTensorField
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Definition: volFieldsFwd.H:58
Foam::Ostream::write
virtual Ostream & write(const token &)=0
Write next token to stream.
Foam::Info
messageStream Info
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Foam::I
static const sphericalTensor I(1)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
rho
rho
Definition: pEqn.H:3
Foam::max
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
T
const volScalarField & T
Definition: createFields.H:25
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:142
Foam::constant::physicoChemical::sigma
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Tptr
Info<< "Reading field D\n"<< endl;volVectorField D(IOobject("D", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);autoPtr< volScalarField > Tptr(NULL)
Foam::magSqr
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Foam::dev
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:104