1 //- write force displacement to file
2 if(historyPatchID != -1)
4 Info << "Writing disp-force to file for patch " << historyPatchName
7 //- for small strain or moving mesh
10 // (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));
16 vector disp = gAverage(U.boundaryField()[historyPatchID]);
19 Info << "Writing strain-stress to file for patch " << historyPatchName
22 // avaerage stress strain
23 symmTensor stress = gAverage(sigma.boundaryField()[historyPatchID]);
24 symmTensor strain = gAverage(epsilon.boundaryField()[historyPatchID]);
30 OFstream& forceDispFile = *forceFilePtr;
32 forceDispFile << disp.x() << " " << disp.y() << " " << disp.z();
33 forceDispFile.width(width);
34 forceDispFile << force.x() << " " << force.y() << " " << force.z()
37 OFstream& stressStrainFile = *stressFilePtr;
38 stressStrainFile << strain.xx() << " " << strain.xy() << " " << strain.xz() << " "
39 << strain.yy() << " " << strain.yz() << " " << strain.zz();
40 stressStrainFile.width(width);
41 stressStrainFile << stress.xx() << " " << stress.xy() << " " << stress.xz() << " "
42 << stress.yy() << " " << stress.yz() << " " << stress.zz()