From 2eac40eac6cf1e80a0ead9f50032cfbaec38a6e2 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 1 Dec 2016 15:57:15 +0000 Subject: [PATCH] dynamicMotionSolverListFvMesh: New mesh-motion solver supporting multiple moving regions e.g. the motion of two counter-rotating AMI regions could be defined: dynamicFvMesh dynamicMotionSolverListFvMesh; solvers ( rotor1 { solver solidBody; cellZone rotor1; solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega 6.2832; // rad/s } } rotor2 { solver solidBody; cellZone rotor2; solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega -6.2832; // rad/s } } ); Any combination of motion solvers may be selected but there is no special handling of motion interaction; the motions are applied sequentially and potentially cumulatively. To support this new general framework the solidBodyMotionFvMesh and multiSolidBodyMotionFvMesh dynamicFvMeshes have been converted into the corresponding motionSolvers solidBody and multiSolidBody and the tutorials updated to reflect this change e.g. the motion in the mixerVesselAMI2D tutorial is now defined thus: dynamicFvMesh dynamicMotionSolverFvMesh; solver solidBody; solidBodyCoeffs { cellZone rotor; solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega 6.2832; // rad/s } } --- .../DictionaryBase/DictionaryBaseIO.C | 4 +- src/dynamicFvMesh/Make/files | 16 +- .../dynamicMotionSolverListFvMesh.C | 97 ++++++++++++ .../dynamicMotionSolverListFvMesh.H | 100 ++++++++++++ src/dynamicMesh/Make/files | 30 +++- .../componentDisplacementMotionSolver.C | 0 .../componentDisplacementMotionSolver.H | 0 .../componentVelocityMotionSolver.C | 2 +- .../componentVelocityMotionSolver.H | 0 .../displacement/displacementMotionSolver.C | 67 +++++++++ .../displacement/displacementMotionSolver.H | 37 +---- .../displacementInterpolationMotionSolver.C | 2 - .../displacementInterpolationMotionSolver.H | 4 +- .../displacementLayeredMotionMotionSolver.C | 0 .../displacementLayeredMotionMotionSolver.H | 0 .../layeredSolver/pointEdgeStructuredWalk.C | 2 +- .../layeredSolver/pointEdgeStructuredWalk.H | 0 .../layeredSolver/pointEdgeStructuredWalkI.H | 0 .../points0/points0MotionSolver.C} | 35 ++--- .../points0/points0MotionSolver.H | 130 ++++++++++++++++ .../solidBody/multiSolidBodyMotionSolver.C} | 137 ++++++----------- .../solidBody/multiSolidBodyMotionSolver.H} | 50 +++--- ...yMotionDisplacementPointPatchVectorField.C | 0 ...yMotionDisplacementPointPatchVectorField.H | 0 .../solidBodyMotionFunctions/SDA/SDA.C | 0 .../solidBodyMotionFunctions/SDA/SDA.H | 0 .../axisRotationMotion/axisRotationMotion.C | 0 .../axisRotationMotion/axisRotationMotion.H | 2 +- .../linearMotion/linearMotion.C | 0 .../linearMotion/linearMotion.H | 2 +- .../multiMotion/multiMotion.C | 0 .../multiMotion/multiMotion.H | 2 +- .../oscillatingLinearMotion.C | 0 .../oscillatingLinearMotion.H | 2 +- .../oscillatingRotatingMotion.C | 0 .../oscillatingRotatingMotion.H | 2 +- .../rotatingMotion/rotatingMotion.C | 0 .../rotatingMotion/rotatingMotion.H | 0 .../solidBodyMotionFunction.C | 0 .../solidBodyMotionFunction.H | 2 +- .../solidBodyMotionFunctionNew.C | 2 +- .../tabulated6DoFMotion/tabulated6DoFMotion.C | 0 .../tabulated6DoFMotion/tabulated6DoFMotion.H | 2 +- .../solidBody/solidBodyMotionSolver.C} | 142 ++++++------------ .../solidBody/solidBodyMotionSolver.H} | 53 +++---- .../motionSolver/motionSolver.C | 39 ++++- .../motionSolver/motionSolver.H | 27 +++- .../velocity/velocityMotionSolver.C | 2 +- .../velocity/velocityMotionSolver.H | 2 +- src/fvMotionSolver/Make/files | 5 +- ...lacementComponentLaplacianFvMotionSolver.C | 2 +- ...lacementComponentLaplacianFvMotionSolver.H | 6 +- ...velocityComponentLaplacianFvMotionSolver.C | 2 +- ...velocityComponentLaplacianFvMotionSolver.H | 7 +- .../displacementSBRStressFvMotionSolver.C | 2 +- .../displacementSBRStressFvMotionSolver.H | 6 +- .../displacementLaplacianFvMotionSolver.C | 2 +- .../displacementLaplacianFvMotionSolver.H | 6 +- .../fvMotionSolver.C} | 8 +- .../fvMotionSolver.H} | 14 +- .../fvMotionSolverTemplates.C} | 4 +- .../velocityLaplacianFvMotionSolver.C | 2 +- .../velocityLaplacianFvMotionSolver.H | 6 +- .../constant/dynamicMeshDict | 6 +- .../mixerVesselAMI2D/constant/dynamicMeshDict | 7 +- .../constant/dynamicMeshDict | 6 +- .../propeller/constant/dynamicMeshDict | 6 +- .../mixerVessel/constant/dynamicMeshDict | 6 +- .../sloshingTank2D/constant/dynamicMeshDict | 6 +- .../mixerVesselAMI/constant/dynamicMeshDict | 6 +- .../sloshingTank2D/constant/dynamicMeshDict | 6 +- .../constant/dynamicMeshDict | 6 +- .../sloshingTank3D/constant/dynamicMeshDict | 6 +- .../constant/dynamicMeshDict | 6 +- .../constant/dynamicMeshDict | 6 +- .../testTubeMixer/constant/dynamicMeshDict | 6 +- .../propeller/constant/dynamicMeshDict | 6 +- .../mixerVesselAMI2D/constant/dynamicMeshDict | 6 +- 78 files changed, 739 insertions(+), 418 deletions(-) create mode 100644 src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.C create mode 100644 src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.H rename src/dynamicMesh/{motionSolver => motionSolvers}/componentDisplacement/componentDisplacementMotionSolver.C (100%) rename src/dynamicMesh/{motionSolver => motionSolvers}/componentDisplacement/componentDisplacementMotionSolver.H (100%) rename src/dynamicMesh/{motionSolver => motionSolvers}/componentVelocity/componentVelocityMotionSolver.C (97%) rename src/dynamicMesh/{motionSolver => motionSolvers}/componentVelocity/componentVelocityMotionSolver.H (100%) create mode 100644 src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C rename src/dynamicMesh/{motionSolver => motionSolvers/displacement}/displacement/displacementMotionSolver.H (78%) rename src/{fvMotionSolver/fvMotionSolvers => dynamicMesh/motionSolvers}/displacement/interpolation/displacementInterpolationMotionSolver.C (99%) rename src/{fvMotionSolver/fvMotionSolvers => dynamicMesh/motionSolvers}/displacement/interpolation/displacementInterpolationMotionSolver.H (97%) rename src/{fvMotionSolver/fvMotionSolvers => dynamicMesh/motionSolvers}/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C (100%) rename src/{fvMotionSolver/fvMotionSolvers => dynamicMesh/motionSolvers}/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H (100%) rename src/{fvMotionSolver/fvMotionSolvers => dynamicMesh/motionSolvers}/displacement/layeredSolver/pointEdgeStructuredWalk.C (95%) rename src/{fvMotionSolver/fvMotionSolvers => dynamicMesh/motionSolvers}/displacement/layeredSolver/pointEdgeStructuredWalk.H (100%) rename src/{fvMotionSolver/fvMotionSolvers => dynamicMesh/motionSolvers}/displacement/layeredSolver/pointEdgeStructuredWalkI.H (100%) rename src/dynamicMesh/{motionSolver/displacement/displacementMotionSolver.C => motionSolvers/displacement/points0/points0MotionSolver.C} (87%) create mode 100644 src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.H rename src/{dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C => dynamicMesh/motionSolvers/displacement/solidBody/multiSolidBodyMotionSolver.C} (50%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.H => dynamicMesh/motionSolvers/displacement/solidBody/multiSolidBodyMotionSolver.H} (69%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.H (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/SDA/SDA.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/SDA/SDA.H (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/axisRotationMotion/axisRotationMotion.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/axisRotationMotion/axisRotationMotion.H (98%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/linearMotion/linearMotion.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/linearMotion/linearMotion.H (98%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/multiMotion/multiMotion.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/multiMotion/multiMotion.H (98%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/oscillatingLinearMotion/oscillatingLinearMotion.H (98%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/oscillatingRotatingMotion/oscillatingRotatingMotion.H (98%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/rotatingMotion/rotatingMotion.H (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.H (98%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C (97%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C (100%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh => dynamicMesh/motionSolvers/displacement/solidBody}/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.H (98%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C => dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionSolver.C} (51%) rename src/{dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.H => dynamicMesh/motionSolvers/displacement/solidBody/solidBodyMotionSolver.H} (69%) rename src/dynamicMesh/{motionSolver => motionSolvers}/motionSolver/motionSolver.C (87%) rename src/dynamicMesh/{motionSolver => motionSolvers}/motionSolver/motionSolver.H (89%) rename src/dynamicMesh/{motionSolver => motionSolvers}/velocity/velocityMotionSolver.C (96%) rename src/dynamicMesh/{motionSolver => motionSolvers}/velocity/velocityMotionSolver.H (97%) rename src/fvMotionSolver/fvMotionSolvers/{fvMotionSolverCore/fvMotionSolverCore.C => fvMotionSolver/fvMotionSolver.C} (86%) rename src/fvMotionSolver/fvMotionSolvers/{fvMotionSolverCore/fvMotionSolverCore.H => fvMotionSolver/fvMotionSolver.H} (92%) rename src/fvMotionSolver/fvMotionSolvers/{fvMotionSolverCore/fvMotionSolverCoreTemplates.C => fvMotionSolver/fvMotionSolverTemplates.C} (95%) diff --git a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBaseIO.C b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBaseIO.C index 24027496c..1970653b5 100644 --- a/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBaseIO.C +++ b/src/OpenFOAM/containers/Dictionaries/DictionaryBase/DictionaryBaseIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,6 +62,4 @@ Foam::Ostream& Foam::operator<< } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // ************************************************************************* // diff --git a/src/dynamicFvMesh/Make/files b/src/dynamicFvMesh/Make/files index 0403ea42e..9f5609fdd 100644 --- a/src/dynamicFvMesh/Make/files +++ b/src/dynamicFvMesh/Make/files @@ -4,20 +4,6 @@ staticFvMesh/staticFvMesh.C dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C dynamicInkJetFvMesh/dynamicInkJetFvMesh.C dynamicRefineFvMesh/dynamicRefineFvMesh.C - -solidBodyMotionFvMesh/solidBodyMotionFvMesh.C -solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C -solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions -$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C -$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunctionNew.C -$(solidBodyMotionFunctions)/SDA/SDA.C -$(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C -$(solidBodyMotionFunctions)/linearMotion/linearMotion.C -$(solidBodyMotionFunctions)/rotatingMotion/rotatingMotion.C -$(solidBodyMotionFunctions)/axisRotationMotion/axisRotationMotion.C -$(solidBodyMotionFunctions)/multiMotion/multiMotion.C -$(solidBodyMotionFunctions)/oscillatingLinearMotion/oscillatingLinearMotion.C -$(solidBodyMotionFunctions)/oscillatingRotatingMotion/oscillatingRotatingMotion.C -solidBodyMotionFvMesh/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C +dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.C LIB = $(FOAM_LIBBIN)/libdynamicFvMesh diff --git a/src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.C b/src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.C new file mode 100644 index 000000000..2814638b3 --- /dev/null +++ b/src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.C @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ 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 . + +\*---------------------------------------------------------------------------*/ + +#include "dynamicMotionSolverListFvMesh.H" +#include "addToRunTimeSelectionTable.H" +#include "motionSolver.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(dynamicMotionSolverListFvMesh, 0); + addToRunTimeSelectionTable + ( + dynamicFvMesh, + dynamicMotionSolverListFvMesh, + IOobject + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dynamicMotionSolverListFvMesh::dynamicMotionSolverListFvMesh +( + const IOobject& io +) +: + dynamicFvMesh(io), + motionSolvers_ + ( + IOdictionary + ( + IOobject + ( + "dynamicMeshDict", + time().constant(), + *this, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::AUTO_WRITE + ) + ).lookup("solvers"), + motionSolver::iNew(*this) + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dynamicMotionSolverListFvMesh::~dynamicMotionSolverListFvMesh() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::dynamicMotionSolverListFvMesh::update() +{ + forAll(motionSolvers_, i) + { + fvMesh::movePoints(motionSolvers_[i].newPoints()); + } + + if (foundObject("U")) + { + volVectorField& U = + const_cast(lookupObject("U")); + U.correctBoundaryConditions(); + } + + return true; +} + + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.H b/src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.H new file mode 100644 index 000000000..e638bf63b --- /dev/null +++ b/src/dynamicFvMesh/dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ 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 . + +Class + Foam::dynamicMotionSolverListFvMesh + +Description + Foam::dynamicMotionSolverListFvMesh + +SourceFiles + dynamicMotionSolverListFvMesh.C + +\*---------------------------------------------------------------------------*/ + +#ifndef dynamicMotionSolverListFvMesh_H +#define dynamicMotionSolverListFvMesh_H + +#include "dynamicFvMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class motionSolver; + +/*---------------------------------------------------------------------------*\ + Class dynamicMotionSolverListFvMesh Declaration +\*---------------------------------------------------------------------------*/ + +class dynamicMotionSolverListFvMesh +: + public dynamicFvMesh +{ + // Private data + + PtrList motionSolvers_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + dynamicMotionSolverListFvMesh(const dynamicMotionSolverListFvMesh&); + + //- Disallow default bitwise assignment + void operator=(const dynamicMotionSolverListFvMesh&); + + +public: + + //- Runtime type information + TypeName("dynamicMotionSolverListFvMesh"); + + + // Constructors + + //- Construct from IOobject + dynamicMotionSolverListFvMesh(const IOobject& io); + + + //- Destructor + ~dynamicMotionSolverListFvMesh(); + + + // Member Functions + + //- Dummy update function which does not change the mesh + virtual bool update(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/dynamicMesh/Make/files b/src/dynamicMesh/Make/files index a96b93bdf..1bec6fedf 100644 --- a/src/dynamicMesh/Make/files +++ b/src/dynamicMesh/Make/files @@ -98,11 +98,31 @@ motionSmoother/polyMeshGeometry/polyMeshGeometry.C motionSmoother/badQualityToCell/badQualityToCell.C motionSmoother/badQualityToFace/badQualityToFace.C -motionSolver/motionSolver/motionSolver.C -motionSolver/displacement/displacementMotionSolver.C -motionSolver/componentDisplacement/componentDisplacementMotionSolver.C -motionSolver/velocity/velocityMotionSolver.C -motionSolver/componentVelocity/componentVelocityMotionSolver.C +motionSolvers/motionSolver/motionSolver.C +motionSolvers/displacement/points0/points0MotionSolver.C +motionSolvers/displacement/displacement/displacementMotionSolver.C +motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C +motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C +motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C +motionSolvers/componentDisplacement/componentDisplacementMotionSolver.C +motionSolvers/velocity/velocityMotionSolver.C +motionSolvers/componentVelocity/componentVelocityMotionSolver.C +motionSolvers/displacement/solidBody/solidBodyMotionSolver.C +motionSolvers/displacement/solidBody/multiSolidBodyMotionSolver.C + +solidBodyMotionFunctions = motionSolvers/displacement/solidBody/solidBodyMotionFunctions +$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C +$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunctionNew.C +$(solidBodyMotionFunctions)/SDA/SDA.C +$(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C +$(solidBodyMotionFunctions)/linearMotion/linearMotion.C +$(solidBodyMotionFunctions)/rotatingMotion/rotatingMotion.C +$(solidBodyMotionFunctions)/axisRotationMotion/axisRotationMotion.C +$(solidBodyMotionFunctions)/multiMotion/multiMotion.C +$(solidBodyMotionFunctions)/oscillatingLinearMotion/oscillatingLinearMotion.C +$(solidBodyMotionFunctions)/oscillatingRotatingMotion/oscillatingRotatingMotion.C + +motionSolvers/displacement/solidBody/pointPatchFields/derived/solidBodyMotionDisplacement/solidBodyMotionDisplacementPointPatchVectorField.C createShellMesh/createShellMesh.C diff --git a/src/dynamicMesh/motionSolver/componentDisplacement/componentDisplacementMotionSolver.C b/src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.C similarity index 100% rename from src/dynamicMesh/motionSolver/componentDisplacement/componentDisplacementMotionSolver.C rename to src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.C diff --git a/src/dynamicMesh/motionSolver/componentDisplacement/componentDisplacementMotionSolver.H b/src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.H similarity index 100% rename from src/dynamicMesh/motionSolver/componentDisplacement/componentDisplacementMotionSolver.H rename to src/dynamicMesh/motionSolvers/componentDisplacement/componentDisplacementMotionSolver.H diff --git a/src/dynamicMesh/motionSolver/componentVelocity/componentVelocityMotionSolver.C b/src/dynamicMesh/motionSolvers/componentVelocity/componentVelocityMotionSolver.C similarity index 97% rename from src/dynamicMesh/motionSolver/componentVelocity/componentVelocityMotionSolver.C rename to src/dynamicMesh/motionSolvers/componentVelocity/componentVelocityMotionSolver.C index 7d38bcfa5..04afe7576 100644 --- a/src/dynamicMesh/motionSolver/componentVelocity/componentVelocityMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/componentVelocity/componentVelocityMotionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/dynamicMesh/motionSolver/componentVelocity/componentVelocityMotionSolver.H b/src/dynamicMesh/motionSolvers/componentVelocity/componentVelocityMotionSolver.H similarity index 100% rename from src/dynamicMesh/motionSolver/componentVelocity/componentVelocityMotionSolver.H rename to src/dynamicMesh/motionSolvers/componentVelocity/componentVelocityMotionSolver.H diff --git a/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C new file mode 100644 index 000000000..3a76a91b3 --- /dev/null +++ b/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\/ 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 . + +\*---------------------------------------------------------------------------*/ + +#include "displacementMotionSolver.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(displacementMotionSolver, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::displacementMotionSolver::displacementMotionSolver +( + const polyMesh& mesh, + const IOdictionary& dict, + const word& type +) +: + points0MotionSolver(mesh, dict, type), + pointDisplacement_ + ( + IOobject + ( + "pointDisplacement", + time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + pointMesh::New(mesh) + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::displacementMotionSolver::~displacementMotionSolver() +{} + + +// ************************************************************************* // diff --git a/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.H b/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.H similarity index 78% rename from src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.H rename to src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.H index 810aae068..df69f731c 100644 --- a/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.H +++ b/src/dynamicMesh/motionSolvers/displacement/displacement/displacementMotionSolver.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,24 +38,20 @@ SourceFiles #ifndef displacementMotionSolver_H #define displacementMotionSolver_H -#include "motionSolver.H" -#include "pointFields.H" -#include "pointIOField.H" +#include "points0MotionSolver.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -class mapPolyMesh; - /*---------------------------------------------------------------------------*\ Class displacementMotionSolver Declaration \*---------------------------------------------------------------------------*/ class displacementMotionSolver : - public motionSolver + public points0MotionSolver { protected: @@ -64,18 +60,9 @@ protected: //- Point motion field mutable pointVectorField pointDisplacement_; - //- Starting points - pointIOField points0_; - - - // Protected Member Functions - - //- Return IO object for points0 - IOobject points0IO(const polyMesh& mesh) const; private: - // Private Member Functions //- Disallow default bitwise copy construct @@ -107,18 +94,6 @@ public: // Member Functions - //- Return reference to the reference field - pointField& points0() - { - return points0_; - } - - //- Return reference to the reference field - const pointField& points0() const - { - return points0_; - } - //- Return reference to the point motion displacement field pointVectorField& pointDisplacement() { @@ -130,12 +105,6 @@ public: { return pointDisplacement_; } - - //- Update local data for geometry changes - virtual void movePoints(const pointField&); - - //- Update local data for topology changes - virtual void updateMesh(const mapPolyMesh&); }; diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C similarity index 99% rename from src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C rename to src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C index 9acd5302a..d423153c5 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C @@ -49,8 +49,6 @@ namespace Foam } -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::displacementInterpolationMotionSolver:: diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H b/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H similarity index 97% rename from src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H rename to src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H index b5da0b5b3..0cacf8914 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H +++ b/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Class Foam::displacementInterpolationMotionSolver Description - Mesh motion solver for an fvMesh. + Mesh motion solver for a polyMesh. Scales inbetween motion prescribed on faceZones. Works out per point the distance between the bounding face zones (in all three directions) diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C similarity index 100% rename from src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C rename to src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H similarity index 100% rename from src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H rename to src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C similarity index 95% rename from src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C rename to src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C index a2ab64d1d..5bb626935 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C +++ b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H similarity index 100% rename from src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H rename to src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.H diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H similarity index 100% rename from src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H rename to src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H diff --git a/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.C similarity index 87% rename from src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.C rename to src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.C index b86fb855d..29966de36 100644 --- a/src/dynamicMesh/motionSolver/displacement/displacementMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,20 +23,20 @@ License \*---------------------------------------------------------------------------*/ -#include "displacementMotionSolver.H" +#include "points0MotionSolver.H" #include "mapPolyMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(displacementMotionSolver, 0); + defineTypeNameAndDebug(points0MotionSolver, 0); } // * * * * * * * * * * * * * Protected Data Members * * * * * * * * * * * * * // -Foam::IOobject Foam::displacementMotionSolver::points0IO +Foam::IOobject Foam::points0MotionSolver::points0IO ( const polyMesh& mesh ) const @@ -106,7 +106,7 @@ Foam::IOobject Foam::displacementMotionSolver::points0IO // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::displacementMotionSolver::displacementMotionSolver +Foam::points0MotionSolver::points0MotionSolver ( const polyMesh& mesh, const IOdictionary& dict, @@ -114,18 +114,6 @@ Foam::displacementMotionSolver::displacementMotionSolver ) : motionSolver(mesh, dict, type), - pointDisplacement_ - ( - IOobject - ( - "pointDisplacement", - time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - pointMesh::New(mesh) - ), points0_(pointIOField(points0IO(mesh))) { if (points0_.size() != mesh.nPoints()) @@ -134,8 +122,7 @@ Foam::displacementMotionSolver::displacementMotionSolver << "Number of points in mesh " << mesh.nPoints() << " differs from number of points " << points0_.size() << " read from file " - << - IOobject + << IOobject ( "points", time().constant(), @@ -152,19 +139,17 @@ Foam::displacementMotionSolver::displacementMotionSolver // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::displacementMotionSolver::~displacementMotionSolver() +Foam::points0MotionSolver::~points0MotionSolver() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::displacementMotionSolver::movePoints(const pointField&) -{ - // No local data to update -} +void Foam::points0MotionSolver::movePoints(const pointField&) +{} -void Foam::displacementMotionSolver::updateMesh(const mapPolyMesh& mpm) +void Foam::points0MotionSolver::updateMesh(const mapPolyMesh& mpm) { // pointMesh already updates pointFields diff --git a/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.H b/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.H new file mode 100644 index 000000000..ed240ee91 --- /dev/null +++ b/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.H @@ -0,0 +1,130 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\/ 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 . + +Class + Foam::points0MotionSolver + +Description + Virtual base class for displacement motion solvers. + +SourceFiles + points0MotionSolver.C + +\*---------------------------------------------------------------------------*/ + +#ifndef points0MotionSolver_H +#define points0MotionSolver_H + +#include "motionSolver.H" +#include "pointFields.H" +#include "pointIOField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class points0MotionSolver Declaration +\*---------------------------------------------------------------------------*/ + +class points0MotionSolver +: + public motionSolver +{ +protected: + + // Protected data + + //- Starting points + pointIOField points0_; + + // Protected Member Functions + + //- Return IO object for points0 + IOobject points0IO(const polyMesh& mesh) const; + +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + points0MotionSolver(const points0MotionSolver&); + + //- Disallow default bitwise assignment + void operator=(const points0MotionSolver&); + +public: + + //- Runtime type information + TypeName("points0MotionSolver"); + + + // Constructors + + //- Construct from mesh and dictionary + points0MotionSolver + ( + const polyMesh&, + const IOdictionary&, + const word& type + ); + + + //- Destructor + virtual ~points0MotionSolver(); + + + // Member Functions + + //- Return reference to the reference field + pointField& points0() + { + return points0_; + } + + //- Return reference to the reference field + const pointField& points0() const + { + return points0_; + } + + //- Update local data for geometry changes + virtual void movePoints(const pointField&); + + //- Update local data for topology changes + virtual void updateMesh(const mapPolyMesh&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C b/src/dynamicMesh/motionSolvers/displacement/solidBody/multiSolidBodyMotionSolver.C similarity index 50% rename from src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C rename to src/dynamicMesh/motionSolvers/displacement/solidBody/multiSolidBodyMotionSolver.C index f2a06887f..625f8cfad 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C +++ b/src/dynamicMesh/motionSolvers/displacement/solidBody/multiSolidBodyMotionSolver.C @@ -23,9 +23,8 @@ License \*---------------------------------------------------------------------------*/ -#include "multiSolidBodyMotionFvMesh.H" +#include "multiSolidBodyMotionSolver.H" #include "addToRunTimeSelectionTable.H" -#include "volFields.H" #include "transformField.H" #include "cellZoneMesh.H" #include "boolList.H" @@ -35,80 +34,44 @@ License namespace Foam { - defineTypeNameAndDebug(multiSolidBodyMotionFvMesh, 0); + defineTypeNameAndDebug(multiSolidBodyMotionSolver, 0); addToRunTimeSelectionTable ( - dynamicFvMesh, - multiSolidBodyMotionFvMesh, - IOobject + motionSolver, + multiSolidBodyMotionSolver, + dictionary ); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io) +Foam::multiSolidBodyMotionSolver::multiSolidBodyMotionSolver +( + const polyMesh& mesh, + const IOdictionary& dict +) : - dynamicFvMesh(io), - dynamicMeshCoeffs_ - ( - IOdictionary - ( - IOobject - ( - "dynamicMeshDict", - io.time().constant(), - *this, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).subDict(typeName + "Coeffs") - ), - undisplacedPoints_ - ( - IOobject - ( - "points", - io.time().constant(), - meshSubDir, - *this, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ) - ) + points0MotionSolver(mesh, dict, typeName) { - if (undisplacedPoints_.size() != nPoints()) - { - FatalIOErrorInFunction - ( - dynamicMeshCoeffs_ - ) << "Read " << undisplacedPoints_.size() - << " undisplaced points from " << undisplacedPoints_.objectPath() - << " but the current mesh has " << nPoints() - << exit(FatalIOError); - } + zoneIDs_.setSize(coeffDict().size()); + SBMFs_.setSize(coeffDict().size()); + pointIDs_.setSize(coeffDict().size()); + label zonei = 0; - - zoneIDs_.setSize(dynamicMeshCoeffs_.size()); - SBMFs_.setSize(dynamicMeshCoeffs_.size()); - pointIDs_.setSize(dynamicMeshCoeffs_.size()); - label zoneI = 0; - - forAllConstIter(dictionary, dynamicMeshCoeffs_, iter) + forAllConstIter(dictionary, coeffDict(), iter) { if (iter().isDict()) { - zoneIDs_[zoneI] = cellZones().findZoneID(iter().keyword()); + zoneIDs_[zonei] = mesh.cellZones().findZoneID(iter().keyword()); - if (zoneIDs_[zoneI] == -1) + if (zoneIDs_[zonei] == -1) { FatalIOErrorInFunction ( - dynamicMeshCoeffs_ + coeffDict() ) << "Cannot find cellZone named " << iter().keyword() - << ". Valid zones are " << cellZones().names() + << ". Valid zones are " << mesh.cellZones().names() << exit(FatalIOError); } @@ -116,22 +79,22 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io) SBMFs_.set ( - zoneI, - solidBodyMotionFunction::New(subDict, io.time()) + zonei, + solidBodyMotionFunction::New(subDict, mesh.time()) ); // Collect points of cell zone. - const cellZone& cz = cellZones()[zoneIDs_[zoneI]]; + const cellZone& cz = mesh.cellZones()[zoneIDs_[zonei]]; - boolList movePts(nPoints(), false); + boolList movePts(mesh.nPoints(), false); forAll(cz, i) { label celli = cz[i]; - const cell& c = cells()[celli]; + const cell& c = mesh.cells()[celli]; forAll(c, j) { - const face& f = faces()[c[j]]; + const face& f = mesh.faces()[c[j]]; forAll(f, k) { label pointi = f[k]; @@ -140,9 +103,9 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io) } } - syncTools::syncPointList(*this, movePts, orEqOp(), false); + syncTools::syncPointList(mesh, movePts, orEqOp(), false); - DynamicList