mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge commit 'OpenCFD/master' into olesenm
This commit is contained in:
@ -78,10 +78,7 @@ int main(int argc, char *argv[])
|
|||||||
Serr<< "slave sending to master "
|
Serr<< "slave sending to master "
|
||||||
<< Pstream::masterNo() << endl;
|
<< Pstream::masterNo() << endl;
|
||||||
|
|
||||||
OPstream toMaster
|
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
||||||
(
|
|
||||||
Pstream::blocking, Pstream::masterNo(), IOstream::ASCII
|
|
||||||
);
|
|
||||||
|
|
||||||
FixedList<label, 2> list3;
|
FixedList<label, 2> list3;
|
||||||
list3[0] = 0;
|
list3[0] = 0;
|
||||||
@ -98,10 +95,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
Serr << "master receiving from slave " << slave << endl;
|
Serr << "master receiving from slave " << slave << endl;
|
||||||
IPstream fromSlave
|
IPstream fromSlave(Pstream::blocking, slave);
|
||||||
(
|
|
||||||
Pstream::blocking, slave, IOstream::ASCII
|
|
||||||
);
|
|
||||||
FixedList<label, 2> list3(fromSlave);
|
FixedList<label, 2> list3(fromSlave);
|
||||||
|
|
||||||
Serr<< list3 << endl;
|
Serr<< list3 << endl;
|
||||||
|
|||||||
@ -11,5 +11,8 @@ $(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C
|
|||||||
$(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C
|
$(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C
|
||||||
$(solidBodyMotionFunctions)/SDA/SDA.C
|
$(solidBodyMotionFunctions)/SDA/SDA.C
|
||||||
$(solidBodyMotionFunctions)/SKA/SKA.C
|
$(solidBodyMotionFunctions)/SKA/SKA.C
|
||||||
|
$(solidBodyMotionFunctions)/linearMotion/linearMotion.C
|
||||||
|
$(solidBodyMotionFunctions)/rotationMotion/rotationMotion.C
|
||||||
|
$(solidBodyMotionFunctions)/multiMotion/multiMotion.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libdynamicFvMesh
|
LIB = $(FOAM_LIBBIN)/libdynamicFvMesh
|
||||||
|
|||||||
@ -0,0 +1,99 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "linearMotion.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace solidBodyMotionFunctions
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(linearMotion, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
solidBodyMotionFunction,
|
||||||
|
linearMotion,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solidBodyMotionFunctions::linearMotion::linearMotion
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs,
|
||||||
|
const Time& runTime
|
||||||
|
)
|
||||||
|
:
|
||||||
|
solidBodyMotionFunction(SBMFCoeffs, runTime)
|
||||||
|
{
|
||||||
|
read(SBMFCoeffs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solidBodyMotionFunctions::linearMotion::~linearMotion()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::septernion
|
||||||
|
Foam::solidBodyMotionFunctions::linearMotion::transformation() const
|
||||||
|
{
|
||||||
|
scalar t = time_.value();
|
||||||
|
|
||||||
|
// Translation of centre of gravity with constant velocity
|
||||||
|
const vector displacement = velocity_*t;
|
||||||
|
|
||||||
|
quaternion R(0, 0, 0);
|
||||||
|
septernion TR(septernion(displacement)*R);
|
||||||
|
|
||||||
|
Info<< "solidBodyMotionFunctions::linearMotion::transformation(): "
|
||||||
|
<< "Time = " << t << " transformation: " << TR << endl;
|
||||||
|
|
||||||
|
return TR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::solidBodyMotionFunctions::linearMotion::read
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs
|
||||||
|
)
|
||||||
|
{
|
||||||
|
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||||
|
|
||||||
|
SBMFCoeffs_.lookup("velocity") >> velocity_;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::solidBodyMotionFunctions::linearMotion
|
||||||
|
|
||||||
|
Description
|
||||||
|
SolidBodyMotionFvMesh 6DoF motion function. Constant velocity displacement.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
linearMotion.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef linearMotion_H
|
||||||
|
#define linearMotion_H
|
||||||
|
|
||||||
|
#include "solidBodyMotionFunction.H"
|
||||||
|
#include "primitiveFields.H"
|
||||||
|
#include "point.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace solidBodyMotionFunctions
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class linearMotion Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class linearMotion
|
||||||
|
:
|
||||||
|
public solidBodyMotionFunction
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Linear velocity
|
||||||
|
vector velocity_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
linearMotion(const linearMotion&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const linearMotion&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("linearMotion");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
linearMotion
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs,
|
||||||
|
const Time& runTime
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~linearMotion();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the solid-body motion transformation septernion
|
||||||
|
virtual septernion transformation() const;
|
||||||
|
|
||||||
|
//- Update properties from given dictionary
|
||||||
|
virtual bool read(const dictionary& SBMFCoeffs);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace solidBodyMotionFunctions
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "multiMotion.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace solidBodyMotionFunctions
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(multiMotion, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
solidBodyMotionFunction,
|
||||||
|
multiMotion,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solidBodyMotionFunctions::multiMotion::multiMotion
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs,
|
||||||
|
const Time& runTime
|
||||||
|
)
|
||||||
|
:
|
||||||
|
solidBodyMotionFunction(SBMFCoeffs, runTime)
|
||||||
|
{
|
||||||
|
read(SBMFCoeffs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solidBodyMotionFunctions::multiMotion::~multiMotion()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::septernion
|
||||||
|
Foam::solidBodyMotionFunctions::multiMotion::transformation() const
|
||||||
|
{
|
||||||
|
scalar t = time_.value();
|
||||||
|
|
||||||
|
septernion TR = SBMFs_[0].transformation();
|
||||||
|
|
||||||
|
for (label i = 1; i < SBMFs_.size(); i++)
|
||||||
|
{
|
||||||
|
TR *= SBMFs_[i].transformation();
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "solidBodyMotionFunctions::multiMotion::transformation(): "
|
||||||
|
<< "Time = " << t << " transformation: " << TR << endl;
|
||||||
|
|
||||||
|
return TR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::solidBodyMotionFunctions::multiMotion::read
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs
|
||||||
|
)
|
||||||
|
{
|
||||||
|
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||||
|
|
||||||
|
label i = 0;
|
||||||
|
SBMFs_.setSize(SBMFCoeffs_.size());
|
||||||
|
|
||||||
|
forAllConstIter(IDLList<entry>, SBMFCoeffs_, iter)
|
||||||
|
{
|
||||||
|
if (iter().isDict())
|
||||||
|
{
|
||||||
|
SBMFs_.set
|
||||||
|
(
|
||||||
|
i,
|
||||||
|
solidBodyMotionFunction::New(iter().dict(), time_)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Constructed SBMF " << i << " : "
|
||||||
|
<< iter().keyword() << " of type "
|
||||||
|
<< SBMFs_[i].type() << endl;
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SBMFs_.setSize(i);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::solidBodyMotionFunctions::multiMotion
|
||||||
|
|
||||||
|
Description
|
||||||
|
Combination of SolidBodyMotionFvMesh 6DoF motion functions.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
multiMotion.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef multiMotion_H
|
||||||
|
#define multiMotion_H
|
||||||
|
|
||||||
|
#include "solidBodyMotionFunction.H"
|
||||||
|
#include "primitiveFields.H"
|
||||||
|
#include "point.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace solidBodyMotionFunctions
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class multiMotion Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class multiMotion
|
||||||
|
:
|
||||||
|
public solidBodyMotionFunction
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Motions to combine
|
||||||
|
PtrList<solidBodyMotionFunction> SBMFs_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
multiMotion(const multiMotion&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const multiMotion&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("multiMotion");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
multiMotion
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs,
|
||||||
|
const Time& runTime
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~multiMotion();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the solid-body motion transformation septernion
|
||||||
|
virtual septernion transformation() const;
|
||||||
|
|
||||||
|
//- Update properties from given dictionary
|
||||||
|
virtual bool read(const dictionary& SBMFCoeffs);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace solidBodyMotionFunctions
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "rotationMotion.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "mathConstants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant::math;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace solidBodyMotionFunctions
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(rotationMotion, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
solidBodyMotionFunction,
|
||||||
|
rotationMotion,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solidBodyMotionFunctions::rotationMotion::rotationMotion
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs,
|
||||||
|
const Time& runTime
|
||||||
|
)
|
||||||
|
:
|
||||||
|
solidBodyMotionFunction(SBMFCoeffs, runTime)
|
||||||
|
{
|
||||||
|
read(SBMFCoeffs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solidBodyMotionFunctions::rotationMotion::~rotationMotion()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::septernion
|
||||||
|
Foam::solidBodyMotionFunctions::rotationMotion::transformation() const
|
||||||
|
{
|
||||||
|
scalar t = time_.value();
|
||||||
|
|
||||||
|
// Motion around a centre of gravity
|
||||||
|
|
||||||
|
// Rotation around centre of gravity (in degrees)
|
||||||
|
vector eulerAngles = radialVelocity_*t;
|
||||||
|
|
||||||
|
// Convert the rotational motion from deg to rad
|
||||||
|
eulerAngles *= pi/180.0;
|
||||||
|
|
||||||
|
quaternion R(eulerAngles.x(), eulerAngles.y(), eulerAngles.z());
|
||||||
|
septernion TR(septernion(CofG_)*R*septernion(-CofG_));
|
||||||
|
|
||||||
|
Info<< "solidBodyMotionFunctions::rotationMotion::transformation(): "
|
||||||
|
<< "Time = " << t << " transformation: " << TR << endl;
|
||||||
|
|
||||||
|
return TR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::solidBodyMotionFunctions::rotationMotion::read
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs
|
||||||
|
)
|
||||||
|
{
|
||||||
|
solidBodyMotionFunction::read(SBMFCoeffs);
|
||||||
|
|
||||||
|
SBMFCoeffs_.lookup("CofG") >> CofG_;
|
||||||
|
SBMFCoeffs_.lookup("radialVelocity") >> radialVelocity_;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 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, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::solidBodyMotionFunctions::rotationMotion
|
||||||
|
|
||||||
|
Description
|
||||||
|
SolidBodyMotionFvMesh 6DoF motion function. Constant
|
||||||
|
velocity rotation around CoG.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
rotationMotion.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef rotationMotion_H
|
||||||
|
#define rotationMotion_H
|
||||||
|
|
||||||
|
#include "solidBodyMotionFunction.H"
|
||||||
|
#include "primitiveFields.H"
|
||||||
|
#include "point.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace solidBodyMotionFunctions
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class rotationMotion Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class rotationMotion
|
||||||
|
:
|
||||||
|
public solidBodyMotionFunction
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Centre of gravity
|
||||||
|
point CofG_;
|
||||||
|
|
||||||
|
//- Rotational velocity (deg/s)
|
||||||
|
vector radialVelocity_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
rotationMotion(const rotationMotion&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const rotationMotion&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("rotationMotion");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
rotationMotion
|
||||||
|
(
|
||||||
|
const dictionary& SBMFCoeffs,
|
||||||
|
const Time& runTime
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~rotationMotion();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the solid-body motion transformation septernion
|
||||||
|
virtual septernion transformation() const;
|
||||||
|
|
||||||
|
//- Update properties from given dictionary
|
||||||
|
virtual bool read(const dictionary& SBMFCoeffs);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace solidBodyMotionFunctions
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -83,14 +83,27 @@ Foam::solidBodyMotionFvMesh::~solidBodyMotionFvMesh()
|
|||||||
|
|
||||||
bool Foam::solidBodyMotionFvMesh::update()
|
bool Foam::solidBodyMotionFvMesh::update()
|
||||||
{
|
{
|
||||||
|
static bool hasWarned = false;
|
||||||
|
|
||||||
fvMesh::movePoints
|
fvMesh::movePoints
|
||||||
(
|
(
|
||||||
transform(SBMFPtr_().transformation(),
|
transform(SBMFPtr_().transformation(),
|
||||||
undisplacedPoints_)
|
undisplacedPoints_)
|
||||||
);
|
);
|
||||||
|
|
||||||
const_cast<volVectorField&>(lookupObject<volVectorField>("U"))
|
if (foundObject<volVectorField>("U"))
|
||||||
.correctBoundaryConditions();
|
{
|
||||||
|
const_cast<volVectorField&>(lookupObject<volVectorField>("U"))
|
||||||
|
.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
else if (!hasWarned)
|
||||||
|
{
|
||||||
|
hasWarned = true;
|
||||||
|
|
||||||
|
WarningIn("solidBodyMotionFvMesh::update()")
|
||||||
|
<< "Did not find volVectorField U."
|
||||||
|
<< " Not updating U boundary conditions." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -195,7 +195,7 @@ NonlinearKEShih::NonlinearKEShih
|
|||||||
Cmu_(2.0/(3.0*(A1_ + eta_ + alphaKsi_*ksi_))),
|
Cmu_(2.0/(3.0*(A1_ + eta_ + alphaKsi_*ksi_))),
|
||||||
fEta_(A2_ + pow(eta_, 3.0)),
|
fEta_(A2_ + pow(eta_, 3.0)),
|
||||||
|
|
||||||
nut_(Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_)),
|
nut_("nut", Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_)),
|
||||||
|
|
||||||
nonlinearStress_
|
nonlinearStress_
|
||||||
(
|
(
|
||||||
@ -318,9 +318,12 @@ void NonlinearKEShih::correct()
|
|||||||
// generation term
|
// generation term
|
||||||
volScalarField S2 = symm(gradU_) && gradU_;
|
volScalarField S2 = symm(gradU_) && gradU_;
|
||||||
|
|
||||||
volScalarField G =
|
volScalarField G
|
||||||
|
(
|
||||||
|
"RASModel::G",
|
||||||
Cmu_*sqr(k_)/epsilon_*S2
|
Cmu_*sqr(k_)/epsilon_*S2
|
||||||
- (nonlinearStress_ && gradU_);
|
- (nonlinearStress_ && gradU_)
|
||||||
|
);
|
||||||
|
|
||||||
#include "nonLinearWallFunctionsI.H"
|
#include "nonLinearWallFunctionsI.H"
|
||||||
|
|
||||||
|
|||||||
30
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/0/U
Normal file
30
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/0/U
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type movingWallVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object alpha1;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
30
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/0/p
Normal file
30
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/0/p
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
4
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allclean
Executable file
4
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allclean
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
foamCleanTutorials cases
|
||||||
|
rm -rf 0/alpha1.gz
|
||||||
8
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun
Executable file
8
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
cp 0/alpha1.org 0/alpha1
|
||||||
|
runApplication setFields
|
||||||
|
runApplication interDyMFoam
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object RASProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
RASModel laminar;
|
||||||
|
|
||||||
|
turbulence off;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object dynamicMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dynamicFvMesh solidBodyMotionFvMesh;
|
||||||
|
|
||||||
|
solidBodyMotionFvMeshCoeffs
|
||||||
|
{
|
||||||
|
solidBodyMotionFunction multiMotion;
|
||||||
|
|
||||||
|
multiMotionCoeffs
|
||||||
|
{
|
||||||
|
// Table rotating in z axis
|
||||||
|
rotatingTable
|
||||||
|
{
|
||||||
|
solidBodyMotionFunction rotationMotion;
|
||||||
|
rotationMotionCoeffs
|
||||||
|
{
|
||||||
|
CofG (0 0.1 0);
|
||||||
|
radialVelocity (0 0 360); // degrees/s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Box rotates on rotating table
|
||||||
|
rotatingBox
|
||||||
|
{
|
||||||
|
solidBodyMotionFunction rotationMotion;
|
||||||
|
rotationMotionCoeffs
|
||||||
|
{
|
||||||
|
CofG (0 0 0);
|
||||||
|
radialVelocity (720 0 0); // degrees/s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class uniformDimensionedVectorField;
|
||||||
|
location "constant";
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
value ( 0 0 -9.81 );
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
convertToMeters 0.01;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(-0.5 -5 -0.5)
|
||||||
|
( 0.5 -5 -0.5)
|
||||||
|
( 0.5 5 -0.5)
|
||||||
|
(-0.5 5 -0.5)
|
||||||
|
(-0.5 -5 0.5)
|
||||||
|
( 0.5 -5 0.5)
|
||||||
|
( 0.5 5 0.5)
|
||||||
|
(-0.5 5 0.5)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (5 50 5) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
wall walls
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
(0 4 7 3)
|
||||||
|
(2 6 5 1)
|
||||||
|
(1 5 4 0)
|
||||||
|
(0 3 2 1)
|
||||||
|
(4 5 6 7)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object transportProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
phase1
|
||||||
|
{
|
||||||
|
transportModel Newtonian;
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
|
||||||
|
rho rho [ 1 -3 0 0 0 0 0 ] 998.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
phase2
|
||||||
|
{
|
||||||
|
transportModel Newtonian;
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
|
||||||
|
rho rho [ 1 -3 0 0 0 0 0 ] 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sigma sigma [ 1 0 -2 0 0 0 0 ] 0;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
libs ("libOpenFOAM.so" "libmySolidBodyMotionFunctions.so");
|
||||||
|
|
||||||
|
application interDyMFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 1;
|
||||||
|
|
||||||
|
deltaT 0.0001;
|
||||||
|
|
||||||
|
writeControl adjustableRunTime;
|
||||||
|
|
||||||
|
writeInterval 0.01;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression compressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
maxCo 0.5;
|
||||||
|
|
||||||
|
maxDeltaT 1;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 16;
|
||||||
|
|
||||||
|
method hierarchical;
|
||||||
|
|
||||||
|
simpleCoeffs
|
||||||
|
{
|
||||||
|
n ( 2 2 1 );
|
||||||
|
delta 0.001;
|
||||||
|
}
|
||||||
|
|
||||||
|
hierarchicalCoeffs
|
||||||
|
{
|
||||||
|
n ( 4 2 2 );
|
||||||
|
delta 0.001;
|
||||||
|
order xyz;
|
||||||
|
}
|
||||||
|
|
||||||
|
metisCoeffs
|
||||||
|
{
|
||||||
|
processorWeights ( 1 1 1 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
manualCoeffs
|
||||||
|
{
|
||||||
|
dataFile "";
|
||||||
|
}
|
||||||
|
|
||||||
|
distributed no;
|
||||||
|
|
||||||
|
roots ( );
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
div(rho*phi,U) Gauss vanLeerV;
|
||||||
|
div(phi,alpha) Gauss vanLeer;
|
||||||
|
div(phirb,alpha) Gauss vanLeer;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
p;
|
||||||
|
pcorr;
|
||||||
|
alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,112 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
pcorr
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner
|
||||||
|
{
|
||||||
|
preconditioner GAMG;
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0;
|
||||||
|
smoother DICGaussSeidel;
|
||||||
|
nPreSweeps 0;
|
||||||
|
nPostSweeps 2;
|
||||||
|
nBottomSweeps 2;
|
||||||
|
cacheAgglomeration false;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tolerance 1e-05;
|
||||||
|
relTol 0;
|
||||||
|
maxIter 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
p
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-08;
|
||||||
|
relTol 0.01;
|
||||||
|
smoother DIC;
|
||||||
|
nPreSweeps 0;
|
||||||
|
nPostSweeps 2;
|
||||||
|
nFinestSweeps 2;
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
pFinal
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner
|
||||||
|
{
|
||||||
|
preconditioner GAMG;
|
||||||
|
tolerance 2e-09;
|
||||||
|
relTol 0;
|
||||||
|
nVcycles 2;
|
||||||
|
smoother DICGaussSeidel;
|
||||||
|
nPreSweeps 2;
|
||||||
|
nPostSweeps 2;
|
||||||
|
nFinestSweeps 2;
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
tolerance 2e-09;
|
||||||
|
relTol 0;
|
||||||
|
maxIter 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
U
|
||||||
|
{
|
||||||
|
solver smoothSolver;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
nSweeps 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PISO
|
||||||
|
{
|
||||||
|
momentumPredictor no;
|
||||||
|
nCorrectors 2;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
nAlphaCorr 1;
|
||||||
|
nAlphaSubCycles 3;
|
||||||
|
cAlpha 1.5;
|
||||||
|
correctPhi no;
|
||||||
|
|
||||||
|
pRefPoint (0.0013 0.0017 0.0017);
|
||||||
|
pRefValue 1e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
U 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object setFieldsDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defaultFieldValues
|
||||||
|
(
|
||||||
|
volScalarFieldValue alpha1 0
|
||||||
|
);
|
||||||
|
|
||||||
|
regions
|
||||||
|
(
|
||||||
|
boxToCell
|
||||||
|
{
|
||||||
|
box ( -100 -100 -100 ) ( 100 -0.02 100);
|
||||||
|
fieldValues ( volScalarFieldValue alpha1 1 );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user