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/elasticSolidFoam/createHistory.H

23 lines
727 B
C
Raw Normal View History

OFstream * filePtr(NULL);
word historyPatchName(mesh.solutionDict().subDict("stressedFoam").lookup("historyPatch"));
label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
if(historyPatchID == -1)
{
Warning << "history patch " << historyPatchName
<< " not found. Force-displacement will not be written"
<< endl;
}
else if(Pstream::master())
{
Info << "Force-displacement for patch " << historyPatchName
<< " will be written to forceDisp.dat"
<< endl;
mkDir("history");
filePtr = new OFstream("history/forceDisp.dat");
OFstream& forceDispFile = *filePtr;
forceDispFile << "#Disp(mm)\tForce(N)" << endl;
}
// clip gauge
//clipGauge clipG("clipGauge1", U);