2013-10-11 13:31:14 +00:00
|
|
|
if (runTime.outputTime())
|
|
|
|
{
|
|
|
|
//C.write();
|
|
|
|
|
|
|
|
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;
|
2013-10-11 13:31:14 +00:00
|
|
|
|
|
|
|
// volVectorField traction
|
|
|
|
// (
|
|
|
|
// IOobject
|
|
|
|
// (
|
2015-05-17 15:11:30 +00:00
|
|
|
// "traction",
|
|
|
|
// 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(mesh.boundary(), patchi)
|
|
|
|
// {
|
2015-05-17 15:11:30 +00:00
|
|
|
// traction.boundaryField()[patchi] =
|
|
|
|
// n.boundaryField()[patchi] & sigma.boundaryField()[patchi];
|
2013-10-11 13:31:14 +00:00
|
|
|
// }
|
|
|
|
|
2014-06-01 18:12:52 +00:00
|
|
|
// //- patch forces
|
2013-10-11 13:31:14 +00:00
|
|
|
// forAll(mesh.boundary(), patchi)
|
|
|
|
// {
|
|
|
|
// Info << "Patch " << mesh.boundary()[patchi].name() << endl;
|
|
|
|
// vectorField totalForce = mesh.Sf().boundaryField()[patchi] & sigma.boundaryField()[patchi];
|
|
|
|
// vector force = sum( totalForce );
|
|
|
|
// Info << "\ttotal force is " << force << " N" << endl;
|
2015-05-17 15:11:30 +00:00
|
|
|
// tensorField F = I + gradDU.boundaryField()[patchi];
|
2013-10-11 13:31:14 +00:00
|
|
|
// tensorField Finv = inv(F);
|
|
|
|
// scalar normalForce = sum( n.boundaryField()[patchi] & totalForce );
|
|
|
|
// Info << "\tnormal force is " << normalForce << " N" << endl;
|
|
|
|
// scalar shearForce = mag(sum( (I - sqr(n.boundaryField()[patchi])) & totalForce ));
|
|
|
|
// Info << "\tshear force is " << shearForce << " N" << endl;
|
|
|
|
// }
|
|
|
|
|
|
|
|
runTime.write();
|
|
|
|
}
|