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
    }
}
This commit is contained in:
Henry Weller
2016-12-01 15:57:15 +00:00
parent 85036f78ab
commit 1c687baa35
78 changed files with 739 additions and 418 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,6 +62,4 @@ Foam::Ostream& Foam::operator<<
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* // // ************************************************************************* //

View File

@ -4,20 +4,6 @@ staticFvMesh/staticFvMesh.C
dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C
dynamicInkJetFvMesh/dynamicInkJetFvMesh.C dynamicInkJetFvMesh/dynamicInkJetFvMesh.C
dynamicRefineFvMesh/dynamicRefineFvMesh.C dynamicRefineFvMesh/dynamicRefineFvMesh.C
dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.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
LIB = $(FOAM_LIBBIN)/libdynamicFvMesh LIB = $(FOAM_LIBBIN)/libdynamicFvMesh

View File

@ -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 <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#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<volVectorField>("U"))
{
volVectorField& U =
const_cast<volVectorField&>(lookupObject<volVectorField>("U"));
U.correctBoundaryConditions();
}
return true;
}
// ************************************************************************* //

View File

@ -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 <http://www.gnu.org/licenses/>.
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<motionSolver> 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
// ************************************************************************* //

View File

@ -98,11 +98,31 @@ motionSmoother/polyMeshGeometry/polyMeshGeometry.C
motionSmoother/badQualityToCell/badQualityToCell.C motionSmoother/badQualityToCell/badQualityToCell.C
motionSmoother/badQualityToFace/badQualityToFace.C motionSmoother/badQualityToFace/badQualityToFace.C
motionSolver/motionSolver/motionSolver.C motionSolvers/motionSolver/motionSolver.C
motionSolver/displacement/displacementMotionSolver.C motionSolvers/displacement/points0/points0MotionSolver.C
motionSolver/componentDisplacement/componentDisplacementMotionSolver.C motionSolvers/displacement/displacement/displacementMotionSolver.C
motionSolver/velocity/velocityMotionSolver.C motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C
motionSolver/componentVelocity/componentVelocityMotionSolver.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 createShellMesh/createShellMesh.C

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#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()
{}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,24 +38,20 @@ SourceFiles
#ifndef displacementMotionSolver_H #ifndef displacementMotionSolver_H
#define displacementMotionSolver_H #define displacementMotionSolver_H
#include "motionSolver.H" #include "points0MotionSolver.H"
#include "pointFields.H"
#include "pointIOField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
class mapPolyMesh;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class displacementMotionSolver Declaration Class displacementMotionSolver Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class displacementMotionSolver class displacementMotionSolver
: :
public motionSolver public points0MotionSolver
{ {
protected: protected:
@ -64,18 +60,9 @@ protected:
//- Point motion field //- Point motion field
mutable pointVectorField pointDisplacement_; mutable pointVectorField pointDisplacement_;
//- Starting points
pointIOField points0_;
// Protected Member Functions
//- Return IO object for points0
IOobject points0IO(const polyMesh& mesh) const;
private: private:
// Private Member Functions // Private Member Functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
@ -107,18 +94,6 @@ public:
// Member Functions // 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 //- Return reference to the point motion displacement field
pointVectorField& pointDisplacement() pointVectorField& pointDisplacement()
{ {
@ -130,12 +105,6 @@ public:
{ {
return pointDisplacement_; return pointDisplacement_;
} }
//- Update local data for geometry changes
virtual void movePoints(const pointField&);
//- Update local data for topology changes
virtual void updateMesh(const mapPolyMesh&);
}; };

View File

@ -49,8 +49,6 @@ namespace Foam
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::displacementInterpolationMotionSolver:: Foam::displacementInterpolationMotionSolver::

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,7 +25,7 @@ Class
Foam::displacementInterpolationMotionSolver Foam::displacementInterpolationMotionSolver
Description Description
Mesh motion solver for an fvMesh. Mesh motion solver for a polyMesh.
Scales inbetween motion prescribed on faceZones. Works out per point Scales inbetween motion prescribed on faceZones. Works out per point
the distance between the bounding face zones (in all three directions) the distance between the bounding face zones (in all three directions)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,20 +23,20 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "displacementMotionSolver.H" #include "points0MotionSolver.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(displacementMotionSolver, 0); defineTypeNameAndDebug(points0MotionSolver, 0);
} }
// * * * * * * * * * * * * * Protected Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * Protected Data Members * * * * * * * * * * * * * //
Foam::IOobject Foam::displacementMotionSolver::points0IO Foam::IOobject Foam::points0MotionSolver::points0IO
( (
const polyMesh& mesh const polyMesh& mesh
) const ) const
@ -106,7 +106,7 @@ Foam::IOobject Foam::displacementMotionSolver::points0IO
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::displacementMotionSolver::displacementMotionSolver Foam::points0MotionSolver::points0MotionSolver
( (
const polyMesh& mesh, const polyMesh& mesh,
const IOdictionary& dict, const IOdictionary& dict,
@ -114,18 +114,6 @@ Foam::displacementMotionSolver::displacementMotionSolver
) )
: :
motionSolver(mesh, dict, type), motionSolver(mesh, dict, type),
pointDisplacement_
(
IOobject
(
"pointDisplacement",
time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh::New(mesh)
),
points0_(pointIOField(points0IO(mesh))) points0_(pointIOField(points0IO(mesh)))
{ {
if (points0_.size() != mesh.nPoints()) if (points0_.size() != mesh.nPoints())
@ -134,8 +122,7 @@ Foam::displacementMotionSolver::displacementMotionSolver
<< "Number of points in mesh " << mesh.nPoints() << "Number of points in mesh " << mesh.nPoints()
<< " differs from number of points " << points0_.size() << " differs from number of points " << points0_.size()
<< " read from file " << " read from file "
<< << IOobject
IOobject
( (
"points", "points",
time().constant(), time().constant(),
@ -152,19 +139,17 @@ Foam::displacementMotionSolver::displacementMotionSolver
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::displacementMotionSolver::~displacementMotionSolver() Foam::points0MotionSolver::~points0MotionSolver()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::displacementMotionSolver::movePoints(const pointField&) void Foam::points0MotionSolver::movePoints(const pointField&)
{ {}
// No local data to update
}
void Foam::displacementMotionSolver::updateMesh(const mapPolyMesh& mpm) void Foam::points0MotionSolver::updateMesh(const mapPolyMesh& mpm)
{ {
// pointMesh already updates pointFields // pointMesh already updates pointFields

View File

@ -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 <http://www.gnu.org/licenses/>.
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
// ************************************************************************* //

View File

@ -23,9 +23,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "multiSolidBodyMotionFvMesh.H" #include "multiSolidBodyMotionSolver.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "volFields.H"
#include "transformField.H" #include "transformField.H"
#include "cellZoneMesh.H" #include "cellZoneMesh.H"
#include "boolList.H" #include "boolList.H"
@ -35,80 +34,44 @@ License
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(multiSolidBodyMotionFvMesh, 0); defineTypeNameAndDebug(multiSolidBodyMotionSolver, 0);
addToRunTimeSelectionTable addToRunTimeSelectionTable
( (
dynamicFvMesh, motionSolver,
multiSolidBodyMotionFvMesh, multiSolidBodyMotionSolver,
IOobject dictionary
); );
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io) Foam::multiSolidBodyMotionSolver::multiSolidBodyMotionSolver
(
const polyMesh& mesh,
const IOdictionary& dict
)
: :
dynamicFvMesh(io), points0MotionSolver(mesh, dict, typeName)
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
)
)
{ {
if (undisplacedPoints_.size() != nPoints()) zoneIDs_.setSize(coeffDict().size());
{ SBMFs_.setSize(coeffDict().size());
FatalIOErrorInFunction pointIDs_.setSize(coeffDict().size());
( label zonei = 0;
dynamicMeshCoeffs_
) << "Read " << undisplacedPoints_.size()
<< " undisplaced points from " << undisplacedPoints_.objectPath()
<< " but the current mesh has " << nPoints()
<< exit(FatalIOError);
}
forAllConstIter(dictionary, coeffDict(), iter)
zoneIDs_.setSize(dynamicMeshCoeffs_.size());
SBMFs_.setSize(dynamicMeshCoeffs_.size());
pointIDs_.setSize(dynamicMeshCoeffs_.size());
label zoneI = 0;
forAllConstIter(dictionary, dynamicMeshCoeffs_, iter)
{ {
if (iter().isDict()) 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 FatalIOErrorInFunction
( (
dynamicMeshCoeffs_ coeffDict()
) << "Cannot find cellZone named " << iter().keyword() ) << "Cannot find cellZone named " << iter().keyword()
<< ". Valid zones are " << cellZones().names() << ". Valid zones are " << mesh.cellZones().names()
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -116,22 +79,22 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io)
SBMFs_.set SBMFs_.set
( (
zoneI, zonei,
solidBodyMotionFunction::New(subDict, io.time()) solidBodyMotionFunction::New(subDict, mesh.time())
); );
// Collect points of cell zone. // 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) forAll(cz, i)
{ {
label celli = cz[i]; label celli = cz[i];
const cell& c = cells()[celli]; const cell& c = mesh.cells()[celli];
forAll(c, j) forAll(c, j)
{ {
const face& f = faces()[c[j]]; const face& f = mesh.faces()[c[j]];
forAll(f, k) forAll(f, k)
{ {
label pointi = f[k]; label pointi = f[k];
@ -140,9 +103,9 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io)
} }
} }
syncTools::syncPointList(*this, movePts, orEqOp<bool>(), false); syncTools::syncPointList(mesh, movePts, orEqOp<bool>(), false);
DynamicList<label> ptIDs(nPoints()); DynamicList<label> ptIDs(mesh.nPoints());
forAll(movePts, i) forAll(movePts, i)
{ {
if (movePts[i]) if (movePts[i])
@ -151,34 +114,36 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io)
} }
} }
pointIDs_[zoneI].transfer(ptIDs); pointIDs_[zonei].transfer(ptIDs);
Info<< "Applying solid body motion " << SBMFs_[zoneI].type() Info<< "Applying solid body motion " << SBMFs_[zonei].type()
<< " to " << pointIDs_[zoneI].size() << " points of cellZone " << " to " << pointIDs_[zonei].size() << " points of cellZone "
<< iter().keyword() << endl; << iter().keyword() << endl;
zoneI++; zonei++;
} }
} }
zoneIDs_.setSize(zoneI); zoneIDs_.setSize(zonei);
SBMFs_.setSize(zoneI); SBMFs_.setSize(zonei);
pointIDs_.setSize(zoneI); pointIDs_.setSize(zonei);
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::multiSolidBodyMotionFvMesh::~multiSolidBodyMotionFvMesh() Foam::multiSolidBodyMotionSolver::~multiSolidBodyMotionSolver()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::multiSolidBodyMotionFvMesh::update() Foam::tmp<Foam::pointField> Foam::multiSolidBodyMotionSolver::curPoints() const
{ {
static bool hasWarned = false; tmp<pointField> ttransformedPts
(
pointField transformedPts(undisplacedPoints_); new pointField(points0_)
);
pointField& transformedPts = ttransformedPts.ref();
forAll(zoneIDs_, i) forAll(zoneIDs_, i)
{ {
@ -192,23 +157,7 @@ bool Foam::multiSolidBodyMotionFvMesh::update()
); );
} }
fvMesh::movePoints(transformedPts); return ttransformedPts;
if (foundObject<volVectorField>("U"))
{
const_cast<volVectorField&>(lookupObject<volVectorField>("U"))
.correctBoundaryConditions();
}
else if (!hasWarned)
{
hasWarned = true;
WarningInFunction
<< "Did not find volVectorField U."
<< " Not updating U boundary conditions." << endl;
}
return true;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,23 +22,21 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::multiSolidBodyMotionFvMesh Foam::multiSolidBodyMotionSolver
Description Description
Solid-body motion of the mesh specified by a run-time selectable Solid-body motion of the mesh specified by a run-time selectable
motion function. motion function.
SourceFiles SourceFiles
multiSolidBodyMotionFvMesh.C multiSolidBodyMotionSolver.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef multiSolidBodyMotionFvMesh_H #ifndef multiSolidBodyMotionSolver_H
#define multiSolidBodyMotionFvMesh_H #define multiSolidBodyMotionSolver_H
#include "dynamicFvMesh.H" #include "points0MotionSolver.H"
#include "dictionary.H"
#include "pointIOField.H"
#include "solidBodyMotionFunction.H" #include "solidBodyMotionFunction.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -47,24 +45,18 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class multiSolidBodyMotionFvMesh Declaration Class multiSolidBodyMotionSolver Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class multiSolidBodyMotionFvMesh class multiSolidBodyMotionSolver
: :
public dynamicFvMesh public points0MotionSolver
{ {
// Private data // Private data
//- Dictionary of motion control parameters
const dictionary dynamicMeshCoeffs_;
//- The motion control function //- The motion control function
PtrList<solidBodyMotionFunction> SBMFs_; PtrList<solidBodyMotionFunction> SBMFs_;
//- The reference points which are transformed
pointIOField undisplacedPoints_;
//- Specified cellZones //- Specified cellZones
labelList zoneIDs_; labelList zoneIDs_;
@ -75,32 +67,40 @@ class multiSolidBodyMotionFvMesh
// Private Member Functions // Private Member Functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
multiSolidBodyMotionFvMesh(const multiSolidBodyMotionFvMesh&); multiSolidBodyMotionSolver(const multiSolidBodyMotionSolver&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const multiSolidBodyMotionFvMesh&); void operator=(const multiSolidBodyMotionSolver&);
public: public:
//- Runtime type information //- Runtime type information
TypeName("multiSolidBodyMotionFvMesh"); TypeName("multiSolidBodyMotionSolver");
// Constructors // Constructors
//- Construct from IOobject //- Construct from mesh and dictionary
multiSolidBodyMotionFvMesh(const IOobject& io); multiSolidBodyMotionSolver
(
const polyMesh&,
const IOdictionary&
);
//- Destructor //- Destructor
~multiSolidBodyMotionFvMesh(); ~multiSolidBodyMotionSolver();
// Member Functions // Member Functions
//- Update the mesh for both mesh motion and topology change //- Return point location obtained from the current motion field
virtual bool update(); virtual tmp<pointField> curPoints() const;
//- Solve for motion
virtual void solve()
{}
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,9 +23,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "solidBodyMotionFvMesh.H" #include "solidBodyMotionSolver.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "volFields.H"
#include "transformField.H" #include "transformField.H"
#include "cellZoneMesh.H" #include "cellZoneMesh.H"
#include "cellSet.H" #include "cellSet.H"
@ -36,91 +35,61 @@ License
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(solidBodyMotionFvMesh, 0); defineTypeNameAndDebug(solidBodyMotionSolver, 0);
addToRunTimeSelectionTable(dynamicFvMesh, solidBodyMotionFvMesh, IOobject); addToRunTimeSelectionTable
(
motionSolver,
solidBodyMotionSolver,
dictionary
);
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io) Foam::solidBodyMotionSolver::solidBodyMotionSolver
(
const polyMesh& mesh,
const IOdictionary& dict
)
: :
dynamicFvMesh(io), points0MotionSolver(mesh, dict, typeName),
dynamicMeshCoeffs_ SBMFPtr_(solidBodyMotionFunction::New(coeffDict(), mesh.time())),
(
IOdictionary
(
IOobject
(
"dynamicMeshDict",
io.time().constant(),
*this,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
),
SBMFPtr_(solidBodyMotionFunction::New(dynamicMeshCoeffs_, io.time())),
undisplacedPoints_
(
IOobject
(
"points",
io.time().constant(),
meshSubDir,
*this,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
),
pointIDs_(), pointIDs_(),
moveAllCells_(false), moveAllCells_(false)
UName_(dynamicMeshCoeffs_.lookupOrDefault<word>("U", "U"))
{ {
if (undisplacedPoints_.size() != nPoints())
{
FatalIOErrorInFunction(dynamicMeshCoeffs_)
<< "Read " << undisplacedPoints_.size()
<< " undisplaced points from " << undisplacedPoints_.objectPath()
<< " but the current mesh has " << nPoints()
<< exit(FatalIOError);
}
word cellZoneName = word cellZoneName =
dynamicMeshCoeffs_.lookupOrDefault<word>("cellZone", "none"); coeffDict().lookupOrDefault<word>("cellZone", "none");
word cellSetName = word cellSetName =
dynamicMeshCoeffs_.lookupOrDefault<word>("cellSet", "none"); coeffDict().lookupOrDefault<word>("cellSet", "none");
if ((cellZoneName != "none") && (cellSetName != "none")) if ((cellZoneName != "none") && (cellSetName != "none"))
{ {
FatalIOErrorInFunction(dynamicMeshCoeffs_) FatalIOErrorInFunction(coeffDict())
<< "Either cellZone OR cellSet can be supplied, but not both. " << "Either cellZone OR cellSet can be supplied, but not both. "
<< "If neither is supplied, all cells will be included" << "If neither is supplied, all cells will be included"
<< exit(FatalIOError); << exit(FatalIOError);
} }
labelList cellIDs; labelList cellIDs;
if (cellZoneName != "none") if (cellZoneName != "none")
{ {
Info<< "Applying solid body motion to cellZone " << cellZoneName Info<< "Applying solid body motion to cellZone " << cellZoneName
<< endl; << endl;
label zoneID = cellZones().findZoneID(cellZoneName); label zoneID = mesh.cellZones().findZoneID(cellZoneName);
if (zoneID == -1) if (zoneID == -1)
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Unable to find cellZone " << cellZoneName << "Unable to find cellZone " << cellZoneName
<< ". Valid cellZones are:" << ". Valid cellZones are:"
<< cellZones().names() << mesh.cellZones().names()
<< exit(FatalError); << exit(FatalError);
} }
cellIDs = cellZones()[zoneID]; cellIDs = mesh.cellZones()[zoneID];
} }
if (cellSetName != "none") if (cellSetName != "none")
@ -128,7 +97,7 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
Info<< "Applying solid body motion to cellSet " << cellSetName Info<< "Applying solid body motion to cellSet " << cellSetName
<< endl; << endl;
cellSet set(*this, cellSetName); cellSet set(mesh, cellSetName);
cellIDs = set.toc(); cellIDs = set.toc();
} }
@ -144,15 +113,15 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
{ {
// collect point IDs of points in cell zone // collect point IDs of points in cell zone
boolList movePts(nPoints(), false); boolList movePts(mesh.nPoints(), false);
forAll(cellIDs, i) forAll(cellIDs, i)
{ {
label celli = cellIDs[i]; label celli = cellIDs[i];
const cell& c = cells()[celli]; const cell& c = mesh.cells()[celli];
forAll(c, j) forAll(c, j)
{ {
const face& f = faces()[c[j]]; const face& f = mesh.faces()[c[j]];
forAll(f, k) forAll(f, k)
{ {
label pointi = f[k]; label pointi = f[k];
@ -161,9 +130,9 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
} }
} }
syncTools::syncPointList(*this, movePts, orEqOp<bool>(), false); syncTools::syncPointList(mesh, movePts, orEqOp<bool>(), false);
DynamicList<label> ptIDs(nPoints()); DynamicList<label> ptIDs(mesh.nPoints());
forAll(movePts, i) forAll(movePts, i)
{ {
if (movePts[i]) if (movePts[i])
@ -179,59 +148,34 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::solidBodyMotionFvMesh::~solidBodyMotionFvMesh() Foam::solidBodyMotionSolver::~solidBodyMotionSolver()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::solidBodyMotionFvMesh::update() Foam::tmp<Foam::pointField> Foam::solidBodyMotionSolver::curPoints() const
{ {
static bool hasWarned = false;
if (moveAllCells_) if (moveAllCells_)
{ {
fvMesh::movePoints return transformPoints(SBMFPtr_().transformation(), points0_);
(
transformPoints
(
SBMFPtr_().transformation(),
undisplacedPoints_
)
);
} }
else else
{ {
pointField transformedPts(undisplacedPoints_); tmp<pointField> ttransformedPts
(
new pointField(points0_)
);
pointField& transformedPts = ttransformedPts.ref();
UIndirectList<point>(transformedPts, pointIDs_) = UIndirectList<point>(transformedPts, pointIDs_) = transformPoints
transformPoints
( (
SBMFPtr_().transformation(), SBMFPtr_().transformation(),
pointField(transformedPts, pointIDs_) pointField(transformedPts, pointIDs_)
); );
fvMesh::movePoints(transformedPts); return ttransformedPts;
} }
if (foundObject<volVectorField>(UName_))
{
const volVectorField& U = lookupObject<volVectorField>(UName_);
const_cast<volVectorField&>(U).correctBoundaryConditions();
}
else if (!hasWarned)
{
hasWarned = true;
WarningInFunction
<< "Did not find volVectorField " << UName_
<< " Not updating " << UName_ << "boundary conditions."
<< endl;
}
return true;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -22,23 +22,21 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::solidBodyMotionFvMesh Foam::solidBodyMotionSolver
Description Description
Solid-body motion of the mesh specified by a run-time selectable Solid-body motion of the mesh specified by a run-time selectable
motion function. motion function.
SourceFiles SourceFiles
solidBodyMotionFvMesh.C solidBodyMotionSolver.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef solidBodyMotionFvMesh_H #ifndef solidBodyMotionSolver_H
#define solidBodyMotionFvMesh_H #define solidBodyMotionSolver_H
#include "dynamicFvMesh.H" #include "points0MotionSolver.H"
#include "dictionary.H"
#include "pointIOField.H"
#include "solidBodyMotionFunction.H" #include "solidBodyMotionFunction.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -47,63 +45,62 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class solidBodyMotionFvMesh Declaration Class solidBodyMotionSolver Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class solidBodyMotionFvMesh class solidBodyMotionSolver
: :
public dynamicFvMesh public points0MotionSolver
{ {
// Private data // Private data
//- Dictionary of motion control parameters
const dictionary dynamicMeshCoeffs_;
//- The motion control function //- The motion control function
autoPtr<solidBodyMotionFunction> SBMFPtr_; autoPtr<solidBodyMotionFunction> SBMFPtr_;
//- The reference points which are transformed
pointIOField undisplacedPoints_;
//- Points to move when cell zone is supplied //- Points to move when cell zone is supplied
labelList pointIDs_; labelList pointIDs_;
//- Flag to indicate whether all cells should move //- Flag to indicate whether all cells should move
bool moveAllCells_; bool moveAllCells_;
//- Name of velocity field
word UName_;
// Private Member Functions // Private Member Functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
solidBodyMotionFvMesh(const solidBodyMotionFvMesh&); solidBodyMotionSolver(const solidBodyMotionSolver&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const solidBodyMotionFvMesh&); void operator=(const solidBodyMotionSolver&);
public: public:
//- Runtime type information //- Runtime type information
TypeName("solidBodyMotionFvMesh"); TypeName("solidBody");
// Constructors // Constructors
//- Construct from IOobject //- Construct from mesh and dictionary
solidBodyMotionFvMesh(const IOobject& io); solidBodyMotionSolver
(
const polyMesh&,
const IOdictionary&
);
//- Destructor //- Destructor
~solidBodyMotionFvMesh(); ~solidBodyMotionSolver();
// Member Functions // Member Functions
//- Update the mesh for both mesh motion and topology change //- Return point location obtained from the current motion field
virtual bool update(); virtual tmp<pointField> curPoints() const;
//- Solve for motion
virtual void solve()
{}
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,6 +89,13 @@ Foam::motionSolver::motionSolver
{} {}
Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::clone() const
{
NotImplemented;
return autoPtr<motionSolver>(nullptr);
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New
@ -150,6 +157,36 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh)
} }
Foam::motionSolver::iNew::iNew(const polyMesh& mesh)
:
mesh_(mesh)
{}
Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::iNew::operator()
(
Istream& is
) const
{
dictionaryEntry dict(dictionary::null, is);
return motionSolver::New
(
mesh_,
IOdictionary
(
IOobject
(
dict.name() + ":meshSolver",
mesh_.time().constant(),
mesh_
),
dict
)
);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::motionSolver::~motionSolver() Foam::motionSolver::~motionSolver()

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,6 +38,10 @@ SourceFiles
#include "IOdictionary.H" #include "IOdictionary.H"
#include "pointField.H" #include "pointField.H"
#include "Time.H"
#include "polyMesh.H"
#include "dictionaryEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -55,9 +59,6 @@ class motionSolver
: :
public IOdictionary public IOdictionary
{ {
private:
// Private data // Private data
//- Reference to mesh //- Reference to mesh
@ -72,6 +73,7 @@ private:
//- De-register object if registered and assign to current //- De-register object if registered and assign to current
static IOobject stealRegistration(const IOdictionary& dict); static IOobject stealRegistration(const IOdictionary& dict);
public: public:
//- Runtime type information //- Runtime type information
@ -99,6 +101,20 @@ public:
// was registered this will 'steal' that registration. // was registered this will 'steal' that registration.
static autoPtr<motionSolver> New(const polyMesh&, const IOdictionary&); static autoPtr<motionSolver> New(const polyMesh&, const IOdictionary&);
//- Class used for the construction of PtrLists of motionSolvers
class iNew
{
const polyMesh& mesh_;
mutable label index_;
public:
iNew(const polyMesh& mesh);
autoPtr<motionSolver> operator()(Istream& is) const;
};
// Constructors // Constructors
@ -113,6 +129,9 @@ public:
const word& type const word& type
); );
//- Clone function
virtual autoPtr<motionSolver> clone() const;
//- Destructor //- Destructor
virtual ~motionSolver(); virtual ~motionSolver();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -1,9 +1,6 @@
fvMotionSolvers/fvMotionSolverCore/fvMotionSolverCore.C fvMotionSolvers/fvMotionSolver/fvMotionSolver.C
fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C
fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C
fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C
fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C
fvMotionSolvers/displacement/layeredSolver/pointEdgeStructuredWalk.C
fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C
fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C

View File

@ -55,7 +55,7 @@ displacementComponentLaplacianFvMotionSolver
) )
: :
componentDisplacementMotionSolver(mesh, dict, type()), componentDisplacementMotionSolver(mesh, dict, type()),
fvMotionSolverCore(mesh), fvMotionSolver(mesh),
cellDisplacement_ cellDisplacement_
( (
IOobject IOobject

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ SourceFiles
#define displacementComponentLaplacianFvMotionSolver_H #define displacementComponentLaplacianFvMotionSolver_H
#include "componentDisplacementMotionSolver.H" #include "componentDisplacementMotionSolver.H"
#include "fvMotionSolverCore.H" #include "fvMotionSolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,7 +54,7 @@ class motionDiffusivity;
class displacementComponentLaplacianFvMotionSolver class displacementComponentLaplacianFvMotionSolver
: :
public componentDisplacementMotionSolver, public componentDisplacementMotionSolver,
public fvMotionSolverCore public fvMotionSolver
{ {
// Private data // Private data

View File

@ -54,7 +54,7 @@ velocityComponentLaplacianFvMotionSolver
) )
: :
componentVelocityMotionSolver(mesh, dict, typeName), componentVelocityMotionSolver(mesh, dict, typeName),
fvMotionSolverCore(mesh), fvMotionSolver(mesh),
cellMotionU_ cellMotionU_
( (
IOobject IOobject

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ SourceFiles
#define velocityComponentLaplacianFvMotionSolver_H #define velocityComponentLaplacianFvMotionSolver_H
#include "componentVelocityMotionSolver.H" #include "componentVelocityMotionSolver.H"
#include "fvMotionSolverCore.H" #include "fvMotionSolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,7 +54,7 @@ class motionDiffusivity;
class velocityComponentLaplacianFvMotionSolver class velocityComponentLaplacianFvMotionSolver
: :
public componentVelocityMotionSolver, public componentVelocityMotionSolver,
public fvMotionSolverCore public fvMotionSolver
{ {
// Private data // Private data
@ -114,7 +114,6 @@ public:
//- Update topology //- Update topology
virtual void updateMesh(const mapPolyMesh&); virtual void updateMesh(const mapPolyMesh&);
}; };

View File

@ -58,7 +58,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver
) )
: :
displacementMotionSolver(mesh, dict, dict.lookup("solver")), displacementMotionSolver(mesh, dict, dict.lookup("solver")),
fvMotionSolverCore(mesh), fvMotionSolver(mesh),
cellDisplacement_ cellDisplacement_
( (
IOobject IOobject

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ SourceFiles
#define displacementSBRStressFvMotionSolver_H #define displacementSBRStressFvMotionSolver_H
#include "displacementMotionSolver.H" #include "displacementMotionSolver.H"
#include "fvMotionSolverCore.H" #include "fvMotionSolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,7 +54,7 @@ class motionDiffusivity;
class displacementSBRStressFvMotionSolver class displacementSBRStressFvMotionSolver
: :
public displacementMotionSolver, public displacementMotionSolver,
public fvMotionSolverCore public fvMotionSolver
{ {
// Private data // Private data

View File

@ -56,7 +56,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
) )
: :
displacementMotionSolver(mesh, dict, typeName), displacementMotionSolver(mesh, dict, typeName),
fvMotionSolverCore(mesh), fvMotionSolver(mesh),
cellDisplacement_ cellDisplacement_
( (
IOobject IOobject

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ SourceFiles
#define displacementLaplacianFvMotionSolver_H #define displacementLaplacianFvMotionSolver_H
#include "displacementMotionSolver.H" #include "displacementMotionSolver.H"
#include "fvMotionSolverCore.H" #include "fvMotionSolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,7 +54,7 @@ class motionDiffusivity;
class displacementLaplacianFvMotionSolver class displacementLaplacianFvMotionSolver
: :
public displacementMotionSolver, public displacementMotionSolver,
public fvMotionSolverCore public fvMotionSolver
{ {
// Private data // Private data

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,19 +23,19 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvMotionSolverCore.H" #include "fvMotionSolver.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(fvMotionSolverCore, 0); defineTypeNameAndDebug(fvMotionSolver, 0);
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fvMotionSolverCore::fvMotionSolverCore(const polyMesh& mesh) Foam::fvMotionSolver::fvMotionSolver(const polyMesh& mesh)
: :
fvMesh_(refCast<const fvMesh>(mesh)) fvMesh_(refCast<const fvMesh>(mesh))
{} {}

View File

@ -22,18 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::fvMotionSolverCore Foam::fvMotionSolver
Description Description
Base class for fvMesh based motionSolvers. Base class for fvMesh based motionSolvers.
SourceFiles SourceFiles
fvMotionSolverCore.C fvMotionSolver.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fvMotionSolverCore_H #ifndef fvMotionSolver_H
#define fvMotionSolverCore_H #define fvMotionSolver_H
#include "fvMesh.H" #include "fvMesh.H"
@ -46,7 +46,7 @@ namespace Foam
Class velocityMotionSolver Declaration Class velocityMotionSolver Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class fvMotionSolverCore class fvMotionSolver
{ {
protected: protected:
@ -76,7 +76,7 @@ public:
// Constructors // Constructors
//- Construct from polyMesh //- Construct from polyMesh
fvMotionSolverCore(const polyMesh&); fvMotionSolver(const polyMesh&);
// Member Functions // Member Functions
@ -96,7 +96,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
#include "fvMotionSolverCoreTemplates.C" #include "fvMotionSolverTemplates.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvMotionSolverCore.H" #include "fvMotionSolver.H"
#include "fixedValuePointPatchFields.H" #include "fixedValuePointPatchFields.H"
#include "cellMotionFvPatchFields.H" #include "cellMotionFvPatchFields.H"
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
template<class Type> template<class Type>
Foam::wordList Foam::fvMotionSolverCore::cellMotionBoundaryTypes Foam::wordList Foam::fvMotionSolver::cellMotionBoundaryTypes
( (
const typename GeometricField<Type, pointPatchField, pointMesh>:: const typename GeometricField<Type, pointPatchField, pointMesh>::
Boundary& pmUbf Boundary& pmUbf

View File

@ -53,7 +53,7 @@ Foam::velocityLaplacianFvMotionSolver::velocityLaplacianFvMotionSolver
) )
: :
velocityMotionSolver(mesh, dict, typeName), velocityMotionSolver(mesh, dict, typeName),
fvMotionSolverCore(mesh), fvMotionSolver(mesh),
cellMotionU_ cellMotionU_
( (
IOobject IOobject

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ SourceFiles
#define velocityLaplacianFvMotionSolver_H #define velocityLaplacianFvMotionSolver_H
#include "velocityMotionSolver.H" #include "velocityMotionSolver.H"
#include "fvMotionSolverCore.H" #include "fvMotionSolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,7 +54,7 @@ class motionDiffusivity;
class velocityLaplacianFvMotionSolver class velocityLaplacianFvMotionSolver
: :
public velocityMotionSolver, public velocityMotionSolver,
public fvMotionSolverCore public fvMotionSolver
{ {
// Private data // Private data

View File

@ -17,9 +17,11 @@ FoamFile
#include "${FOAM_CASE}/constant/caseSettings" #include "${FOAM_CASE}/constant/caseSettings"
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone rotatingZone; cellZone rotatingZone;

View File

@ -15,11 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" ); motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone rotor; cellZone rotor;
@ -32,5 +34,4 @@ solidBodyMotionFvMeshCoeffs
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -15,11 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" ); motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone inletChannel; cellZone inletChannel;

View File

@ -15,11 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" ); motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone innerCylinderSmall; cellZone innerCylinderSmall;

View File

@ -15,11 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" ); motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone rotating; cellZone rotating;

View File

@ -15,9 +15,11 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
solidBodyMotionFunction SDA; solidBodyMotionFunction SDA;
SDACoeffs SDACoeffs

View File

@ -15,11 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" ); motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone rotating; cellZone rotating;

View File

@ -15,9 +15,11 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
solidBodyMotionFunction SDA; solidBodyMotionFunction SDA;
SDACoeffs SDACoeffs

View File

@ -15,9 +15,11 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
solidBodyMotionFunction SDA; solidBodyMotionFunction SDA;
SDACoeffs SDACoeffs

View File

@ -15,9 +15,11 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
solidBodyMotionFunction SDA; solidBodyMotionFunction SDA;
SDACoeffs SDACoeffs

View File

@ -15,9 +15,11 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
solidBodyMotionFunction SDA; solidBodyMotionFunction SDA;
SDACoeffs SDACoeffs

View File

@ -15,9 +15,11 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
solidBodyMotionFunction tabulated6DoFMotion; solidBodyMotionFunction tabulated6DoFMotion;
tabulated6DoFMotionCoeffs tabulated6DoFMotionCoeffs

View File

@ -15,9 +15,11 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
solidBodyMotionFunction multiMotion; solidBodyMotionFunction multiMotion;

View File

@ -15,11 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" ); motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone innerCylinderSmall; cellZone innerCylinderSmall;

View File

@ -15,11 +15,13 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" ); motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs solver solidBody;
solidBodyCoeffs
{ {
cellZone rotor; cellZone rotor;