/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
Application
lumpedPointMovement
Description
Thus utility can be used to produce VTK files to visualize the response
points/rotations and the corresponding movement of the building surfaces.
Uses the tabulated responses from the specified file.
Optionally, it can also be used to a dummy responder for the
externalFileCoupler logic, which makes it useful as a debugging facility
as well demonstrating how an external application could communicate
with the lumpedPointMovement point-patch boundary condition.
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "Time.H"
#include "timeSelector.H"
#include "OFstream.H"
#include "lumpedPointTools.H"
#include "lumpedPointIOMovement.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
argList::addNote
(
"Visualize lumpedPoint movements or provide a slave responder "
"for diagnostic purposes."
);
argList::noParallel();
argList::noFunctionObjects(); // Never use function objects
argList::addOption
(
"max",
"N",
"maximum number of outputs"
);
argList::addOption
(
"span",
"N",
"increment each input by factor N (default: 1)"
);
argList::addOption
(
"scale",
"factor",
"relaxation/scaling factor for movement (default: 1)"
);
argList::addBoolOption
(
"removeLock",
"remove lock-file on termination of slave"
);
argList::addBoolOption
(
"slave",
"invoke as a slave responder for testing"
);
argList::addArgument("responseFile");
#include "setRootCase.H"
const label maxOut =
Foam::max(0, args.lookupOrDefault