1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Calculates and writes the wall shear stress, for the specified times.
31 \*---------------------------------------------------------------------------*/
34 #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 int main(int argc, char *argv[])
41 timeSelector::addOptions();
42 #include "setRootCase.H"
43 #include "createTime.H"
44 instantList timeDirs = timeSelector::select0(runTime, args);
45 #include "createMesh.H"
47 forAll(timeDirs, timeI)
49 runTime.setTime(timeDirs[timeI], timeI);
50 Info<< "Time = " << runTime.timeName() << endl;
53 #include "createFields.H"
55 volSymmTensorField Reff(RASModel->devReff());
57 volVectorField wallShearStress
76 forAll(wallShearStress.boundaryField(), patchi)
78 wallShearStress.boundaryField()[patchi] =
80 -mesh.Sf().boundaryField()[patchi]
81 /mesh.magSf().boundaryField()[patchi]
82 ) & Reff.boundaryField()[patchi];
85 wallShearStress.write();
94 // ************************************************************************* //