1 //- write force displacement to file
2 if(historyPatchID != -1)
4 Info << "Writing disp-force to file for patch " << historyPatchName
7 vector disp = gAverage(U.boundaryField()[historyPatchID]);
9 //- for small strain or moving mesh
11 gSum(mesh.boundary()[historyPatchID].Sf() & sigma.boundaryField()[historyPatchID]);
13 //- for large strain total lagrangian
14 // tensorField F = I + gradU.boundaryField()[historyPatchID];
15 // vector force = gSum(mesh.Sf().boundaryField()[historyPatchID] & (sigma.boundaryField()[historyPatchID] & F));
17 // Info << "Writing strain-stress to file for patch " << historyPatchName
20 // average stress strain
21 //symmTensor stress = gAverage(sigma.boundaryField()[historyPatchID]);
22 //symmTensor strain = gAverage(epsilon.boundaryField()[historyPatchID]);
28 OFstream& forceDispFile = *forceFilePtr;
30 forceDispFile << disp.x() << " " << disp.y() << " " << disp.z();
31 forceDispFile.width(width);
32 forceDispFile << force.x() << " " << force.y() << " " << force.z()
35 // OFstream& stressStrainFile = *stressFilePtr;
36 // stressStrainFile << strain.xx() << " " << strain.xy() << " " << strain.xz() << " "
37 // << strain.yy() << " " << strain.yz() << " " << strain.zz();
38 // stressStrainFile.width(width);
39 // stressStrainFile << stress.xx() << " " << stress.xy() << " " << stress.xz() << " "
40 // << stress.yy() << " " << stress.yz() << " " << stress.zz()