This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/elasticContactNonLinULSolidFoam/printContactResults.H

56 lines
1.6 KiB
C
Raw Normal View History

2012-09-11 15:42:55 +00:00
if (runTime.outputTime())
{
2012-09-11 15:42:55 +00:00
// FAILS IN PARALLEL - FIX
// Info << "Print contact area" << endl;
//volScalarField ca = contact.contactArea();
//ca.write();
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
pointScalarField cGapPoints
(
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();
//- 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();
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();
}