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

27 lines
699 B
C
Raw Normal View History

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
)
);
}
}