2013-10-11 13:31:14 +00:00
|
|
|
if (runTime.outputTime())
|
|
|
|
{
|
|
|
|
volScalarField epsilonEq
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 15:11:30 +00:00
|
|
|
"epsilonEq",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
sqrt((2.0/3.0)*magSqr(dev(epsilon)))
|
|
|
|
);
|
|
|
|
|
|
|
|
Info<< "Max epsilonEq = " << max(epsilonEq).value()
|
2015-05-17 15:11:30 +00:00
|
|
|
<< endl;
|
2013-10-11 13:31:14 +00:00
|
|
|
|
|
|
|
volScalarField sigmaEq
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 15:11:30 +00:00
|
|
|
"sigmaEq",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
sqrt((3.0/2.0)*magSqr(dev(sigma)))
|
|
|
|
);
|
2014-06-01 18:12:52 +00:00
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
Info<< "Max sigmaEq = " << max(sigmaEq).value()
|
2015-05-17 15:11:30 +00:00
|
|
|
<< endl;
|
2014-06-01 18:12:52 +00:00
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
//- Calculate Cauchy stress
|
|
|
|
volTensorField F = I + gradU;
|
|
|
|
volScalarField J = det(F);
|
|
|
|
|
|
|
|
//- update density
|
|
|
|
rho = rho/J;
|
|
|
|
|
|
|
|
volSymmTensorField sigmaCauchy
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 15:11:30 +00:00
|
|
|
"sigmaCauchy",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
(1/J) * symm(F.T() & sigma & F)
|
|
|
|
);
|
|
|
|
|
|
|
|
//- Cauchy von Mises stress
|
|
|
|
volScalarField sigmaCauchyEq
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 15:11:30 +00:00
|
|
|
"sigmaCauchyEq",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
sqrt((3.0/2.0)*magSqr(dev(sigmaCauchy)))
|
|
|
|
);
|
2014-06-01 18:12:52 +00:00
|
|
|
|
2013-10-11 13:31:14 +00:00
|
|
|
Info<< "Max sigmaCauchyEq = " << max(sigmaCauchyEq).value()
|
2015-05-17 15:11:30 +00:00
|
|
|
<< endl;
|
2013-10-11 13:31:14 +00:00
|
|
|
|
|
|
|
volTensorField Finv = inv(F);
|
|
|
|
volSymmTensorField epsilonAlmansi
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 15:11:30 +00:00
|
|
|
"epsilonAlmansi",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
symm(Finv & epsilon & Finv.T())
|
|
|
|
);
|
|
|
|
|
|
|
|
//- boundary traction
|
|
|
|
volVectorField traction
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
2015-05-17 15:11:30 +00:00
|
|
|
"tractionCauchy",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2013-10-11 13:31:14 +00:00
|
|
|
mesh,
|
|
|
|
dimensionedVector("zero", dimForce/dimArea, vector::zero)
|
|
|
|
);
|
|
|
|
forAll(traction.boundaryField(), patchi)
|
|
|
|
{
|
2015-05-17 15:11:30 +00:00
|
|
|
tensorField Fpatch = I + gradU.boundaryField()[patchi];
|
2013-10-11 13:31:14 +00:00
|
|
|
|
2015-05-17 15:11:30 +00:00
|
|
|
traction.boundaryField()[patchi] =
|
|
|
|
n.boundaryField()[patchi] & (sigma.boundaryField()[patchi] & Fpatch);
|
2013-10-11 13:31:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
runTime.write();
|
|
|
|
}
|