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/elasticContactIncrSolidFoam/printContactResults.H

56 lines
1.5 KiB
C
Raw Normal View History

2012-09-11 15:42:55 +00:00
if (runTime.outputTime())
{
// 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
2012-09-11 15:42:55 +00:00
(
IOobject
(
"pointContactGap",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
pMesh,
dimensionedScalar("scalar", dimLength, 0.0),
"calculated"
);
contact.contactGapPoints(cGapPoints);
cGapPoints.write();
2012-09-11 15:42:55 +00:00
//- This is the point distance for each contact vertex
pointVectorField cPointForce
2012-09-11 15:42:55 +00:00
(
IOobject
(
"pointContactForce",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
pMesh,
dimensionedVector("vector", dimForce, vector::zero),
"calculated"
);
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();
}