1 //- write force displacement to file
2 if(historyPatchID != -1)
4 Info << "Found patch "<<historyPatchName<<", writing y force and displacement to file"
7 //- for small strain or moving mesh
8 vector force = gSum(mesh.boundary()[historyPatchID].Sf() & sigma.boundaryField()[historyPatchID]);
10 vector avDisp = gAverage(U.boundaryField()[historyPatchID]);
15 OFstream& forceDispFile = *filePtr;
16 forceDispFile << avDisp.x() << " " << avDisp.y() << " " << avDisp.z() << " "
17 << force.x() << " " << force.y() << " " << force.z() << endl;