CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   [pimpleDyMFoam][dynamicMeshDict] "Attempt to return dictionary entry as a primitive" (https://www.cfd-online.com/Forums/openfoam/219165-pimpledymfoam-dynamicmeshdict-attempt-return-dictionary-entry-primitive.html)

Sorabh July 18, 2019 01:07

[pimpleDyMFoam][dynamicMeshDict] "Attempt to return dictionary entry as a primitive"
 
I am trying to simulate a propeller in pimpleDyMFoam. Meshing has been successful, but on running the solver, the following error appears:

Code:


Attempt to return dictionary entry as a primitive

file: /home/mslab02/Saurabh/OpenFoamTutorials/incompressible/pimpleDyMFoam/TestPropeller2/constant/dynamicMeshDict.solver from line 26 to line 26.

    From function ITstream& primitiveEntry::stream() const
    in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 83.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::IOerror::abort() at ??:?
#2  Foam::dictionaryEntry::stream() const at ??:?
#3  Foam::motionSolver::New(Foam::polyMesh const&, Foam::IOdictionary const&) at ??:?
#4  Foam::motionSolver::New(Foam::polyMesh const&) at ??:?
#5  Foam::dynamicMotionSolverFvMesh::dynamicMotionSolverFvMesh(Foam::IOobject const&) at ??:?
#6  Foam::dynamicFvMesh::addIOobjectConstructorToTable<Foam::dynamicMotionSolverFvMesh>::New(Foam::IOobject const&) at ??:?
#7  Foam::dynamicFvMesh::New(Foam::IOobject const&) at ??:?
#8  ? at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  ? at ??:?

It seems like the issue is with the dynamicMeshDict, line 26. This is my dynamicMeshDict file:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  3.0.x                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh  solidBodyMotionFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solidBodyMotionFvMeshCoeffs
{
    cellZone        propellerTip;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin      (0 0 0);
        axis        (0 1 0);
        omega      105; // rad/s //126 rad/sec == 1200 rpm
    }
}

The line causing the trouble seems to be this one:

Code:

solidBodyMotionFunction  rotatingMotion;
It would be a great help if someone could help me out with this problem.

Regards,
Sorabh

CFD_10 July 18, 2019 07:23

Which version of OpenFOAM you are using?
is it 3.0.x?
I think you are using an old dictionary version with a recent version of OpenFOAM.

Sorabh July 18, 2019 07:24

Quote:

Originally Posted by CFD_10 (Post 739304)
Which version of OpenFOAM you are using?
is it 3.0.x?

I am using OpenFOAM 5.0

CFD_10 July 18, 2019 07:38

I think there is some changes in OpenFOAM 5 version. I think solidBodyMotionFvMesh is changed to solidBodyMotionFvMesh
Here is an example:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh  dynamicMotionSolverFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

motionSolver    solidBody;

cellZone        propellerTip;

solidBodyMotionFunction  rotatingMotion;

origin        (0 0 0);
axis          (0 1 0);
omega        105;

You can find other examples by executing the following:
Code:

find $FOAM_TUTORIALS -name 'dynamicMeshDict'

Sorabh July 19, 2019 02:08

Well, I changed the syntax as instructed. This is the new dynamicMeshDict:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh  dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

motionSolver    solidBody;

cellZone        innerCylinderSmall;

solidBodyMotionFunction  rotatingMotion;

origin      (0 0 0);
axis        (0 1 0);
omega      158; // rad/s


// ************************************************************************* //

But the following error pops up:
Code:

keyword solver is undefined in dictionary "/home/mslab02/Saurabh/V15_V13_NoPorosity_ConcentratedSlurry_worked/constant/dynamicMeshDict"

CFD_10 July 19, 2019 06:57

Change your cellZone to propellerTip.


All times are GMT -4. The time now is 16:18.