2012-09-11 15:42:55 +00:00
|
|
|
if (runTime.outputTime())
|
2013-07-18 01:43:15 +00:00
|
|
|
{
|
2012-09-11 15:42:55 +00:00
|
|
|
volScalarField epsilonEq
|
2013-07-18 01:43:15 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"epsilonEq",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
sqrt((2.0/3.0)*magSqr(dev(epsilon)))
|
|
|
|
);
|
2012-09-11 15:42:55 +00:00
|
|
|
|
|
|
|
Info<< "Max epsilonEq = " << max(epsilonEq).value()
|
2013-07-18 01:43:15 +00:00
|
|
|
<< endl;
|
2012-09-11 15:42:55 +00:00
|
|
|
|
|
|
|
volScalarField sigmaEq
|
2013-07-18 01:43:15 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"sigmaEq",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
sqrt((3.0/2.0)*magSqr(dev(sigma)))
|
|
|
|
);
|
2013-07-18 01:02:34 +00:00
|
|
|
|
2012-09-11 15:42:55 +00:00
|
|
|
Info<< "Max sigmaEq = " << max(sigmaEq).value()
|
2013-07-18 01:43:15 +00:00
|
|
|
<< endl;
|
2012-09-11 15:42:55 +00:00
|
|
|
|
|
|
|
volScalarField pressure
|
2013-07-18 01:43:15 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"pressure",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
2012-09-11 15:42:55 +00:00
|
|
|
),
|
2013-07-18 01:43:15 +00:00
|
|
|
tr(sigma)/3.0
|
|
|
|
);
|
|
|
|
|
2012-09-11 15:42:55 +00:00
|
|
|
//- boundary surface pressure
|
|
|
|
forAll(pressure.boundaryField(), patchi)
|
2013-07-18 01:43:15 +00:00
|
|
|
{
|
2012-09-11 15:42:55 +00:00
|
|
|
const vectorField& nb = n.boundaryField()[patchi];
|
|
|
|
pressure.boundaryField()[patchi] =
|
|
|
|
-(nb & ( nb & sigma.boundaryField()[patchi] ));
|
2013-07-18 01:43:15 +00:00
|
|
|
}
|
2012-09-11 15:42:55 +00:00
|
|
|
|
|
|
|
//- contact slave penetration
|
|
|
|
# include "moveSolidMesh.H"
|
|
|
|
pointMesh pMesh(mesh);
|
|
|
|
pointScalarField cGapPoints
|
2013-07-18 01:43:15 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"pointContactGap",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
2012-09-11 15:42:55 +00:00
|
|
|
pMesh,
|
|
|
|
dimensionedScalar("scalar", dimLength, 0.0),
|
|
|
|
"calculated"
|
2013-07-18 01:43:15 +00:00
|
|
|
);
|
2012-09-11 15:42:55 +00:00
|
|
|
contact.contactGapPoints(cGapPoints);
|
|
|
|
cGapPoints.write();
|
2013-07-18 01:02:34 +00:00
|
|
|
mesh.movePoints(oldMeshPoints);
|
2012-09-11 15:42:55 +00:00
|
|
|
|
|
|
|
runTime.write();
|
2013-07-18 01:43:15 +00:00
|
|
|
}
|