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
|
|
|
// FAILS IN PARALLEL - FIX
|
|
|
|
// Info << "Print contact area" << endl;
|
|
|
|
//volScalarField ca = contact.contactArea();
|
|
|
|
//ca.write();
|
2013-07-18 01:02:34 +00:00
|
|
|
|
2012-09-11 15:42:55 +00:00
|
|
|
//-------------------------------------------------------------//
|
|
|
|
// I couldn't get tmp to return the pointScalarField correctly //
|
|
|
|
// so I had to make the pointScalarField here and pass it to //
|
|
|
|
// contactGapPoints and pointContactForce to populate //
|
|
|
|
//-------------------------------------------------------------//
|
|
|
|
//This is the point distance for each contact vertex
|
2013-07-18 01:02:34 +00:00
|
|
|
pointScalarField cGapPoints
|
2013-07-18 01:43:15 +00:00
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"pointContactGap",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
pMesh,
|
|
|
|
dimensionedScalar("scalar", dimLength, 0.0),
|
|
|
|
"calculated"
|
|
|
|
);
|
2012-09-11 15:42:55 +00:00
|
|
|
|
|
|
|
contact.contactGapPoints(cGapPoints);
|
|
|
|
cGapPoints.write();
|
2013-07-18 01:02:34 +00:00
|
|
|
|
|
|
|
|
2013-07-18 01:43:15 +00:00
|
|
|
//- This is the point distance for each contact vertex
|
|
|
|
pointVectorField cPointForce
|
|
|
|
(
|
|
|
|
IOobject
|
|
|
|
(
|
|
|
|
"pointContactForce",
|
|
|
|
runTime.timeName(),
|
|
|
|
mesh,
|
|
|
|
IOobject::NO_READ,
|
|
|
|
IOobject::AUTO_WRITE
|
|
|
|
),
|
|
|
|
pMesh,
|
|
|
|
dimensionedVector("vector", dimForce, vector::zero),
|
|
|
|
"calculated"
|
|
|
|
);
|
2012-09-11 15:42:55 +00:00
|
|
|
contact.contactPointForce(cPointForce);
|
|
|
|
cPointForce.write();
|
2013-07-18 01:02:34 +00:00
|
|
|
|
2012-09-11 15:42:55 +00:00
|
|
|
//- this is the actual (sigma&n)&n) on the contact patches
|
|
|
|
//- SHOULD THIS BE A REF TO A TMP...?
|
|
|
|
volScalarField cPressure = contact.contactPressure();
|
|
|
|
cPressure.write();
|
2013-07-18 01:43:15 +00:00
|
|
|
}
|