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/deprecatedSolvers/contactStressFoam/calculatePatchTraction.H

26 lines
699 B
C++

Info << "Calculating patch traction" << endl;
PtrList<vectorField> traction(mesh.boundary().size());
{
const surfaceVectorField::GeometricBoundaryField& Apatches =
mesh.Sf().boundaryField();
const surfaceScalarField::GeometricBoundaryField& magApatches =
mesh.magSf().boundaryField();
forAll(traction, patchI)
{
vectorField n = Apatches[patchI]/magApatches[patchI];
traction.set
(
patchI,
new vectorField
(
patchTraction[patchI]
- patchPressure[patchI]*n
)
);
}
}