CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Negative torque with PimpleDyMFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By kmallick

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2017, 10:12
Default Negative torque with PimpleDyMFoam
  #1
New Member
 
Kaushik Mallick
Join Date: Jan 2017
Posts: 10
Rep Power: 9
kmallick is on a distinguished road
I am simulating a vertical axis wind turbine (vawt) in OpenFoam using sliding mesh AMI. The turbine is a set of 3 twisted savonius style blades. The axis of rotation is the z axis. The stator domain is 19D x 14D x 14D where D is the turbine diameter. When I run my analysis with stuck rotor using SimpleFoam I get the correct positive torque around the z axis when equilibrium is reached However when I run a dynamic analysis with positive rotation speed around the z axis using PimpleDyMFoam, I consistently get negative torque and negative torque coefficient, even after the analysis has continued past a number of full 360 deg. rotations of the turbine. The only time I get a positive torque is when I run the PimpleDyMFoam analysis at zero or very low rotational speed.

I have checked all my parameters, boundary conditions, mesh quality, fvsolution and fvscheme settings and I just cannot seem to pinpoint what could be causing the negative torque. I have checked the log file and Courant number is always below 1.

I am anxious to seek out some help and suggestions from the forum.

Below are some pictures of my model and the relevant system files.












Here is my dynamicMeshDict:

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

dynamicFvMesh   dynamicMotionSolverFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solver solidBody;

solidBodyCoeffs
{
    cellZone        rotor;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin        (0 0 0);
        axis          (0 0 1);
        omega         7; // rad/s
    }
}

// ************************************************************************* //
My controlDict:

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

application     pimpleDyMFoam;

startFrom       latestTime;

//startTime       0;

stopAt          endTime;

endTime          20;

deltaT          .0025;

writeControl    adjustableRunTime;

writeInterval   0.01;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  yes

maxCo           1.0;

libs
(
    "libincompressibleTurbulenceModels.so"
);

functions
{
    #includeFunc residuals
    #includeFunc Q
    #include "surfaces"
    #include "forces"
    #include "wallPressure"
}

// ************************************************************************* //
My forces file:

HTML Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

forces
{
    type          forces;

    libs          ("libforces.so");
    writeControl  timeStep;
    timeInterval  1;

    log           yes;

    patches       ("blades.*");
    rho           rhoInf;     // Indicates incompressible
    log           true;
    rhoInf        1;          // Redundant for incompressible

    CofR          (0 0 0);    // Rotation around centre line of turbine
}

forceCoeffs
{
    type forceCoeffs;
    functionObjectLibs ("libforces.so");
    writeControl  timeStep;
    timeInterval  1;

    patches ("blades.*");
    rho           rhoInf;
    rhoInf        1;          // Redundant for incompressible

    CofR          (0 0 0);  
    pitchAxis     (0 0 1);
    dragDir       (1 0 0);
    liftDir       (0 1 0);
    magUInf       7;
    lRef	  1.;
    Aref	  2.44;
}


// ************************************************************************* //
My fvSolution:

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

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-8;
        relTol          0.01;
        smoother        GaussSeidel;
        cacheAgglomeration no;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;
        maxIter         50;
    }

    pFinal
    {
        $p;
        tolerance       1e-06;
        relTol          0;
    }

    pcorr
    {
        $p
        tolerance       0.02;
        relTol          0;
    }


    "(U|k|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-06;
        relTol          0.1;
	maxIter 100;
	minIter 1;
    }

    "(U|k|omega)Final"
    {
        $U;
        tolerance       1e-06;
        relTol          0;
	maxIter 100;
	minIter 1;
    }

    cellDisplacement
    {
        solver          GAMG;
        tolerance       1e-5;
        relTol          0;
        smoother        GaussSeidel;
    }
}

PIMPLE
{
    correctPhi          no; //was no
    nOuterCorrectors    1;  //was 2
    nCorrectors         2;
    nNonOrthogonalCorrectors 0;

    pRefCell            0;
    pRefValue           0;

    turbOnFinalIterOnly on;
    consistent          true;

	residualControl
	{
		"(p|U)"
		{
			tolerance 1e-4;
			relTol 0;
		}

		"(k|omega)"
		{
			tolerance 1e-4;
			relTol 0;
		}
	}

}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.9;
        k               0.7;
        omega           0.7;
    }
}


// ************************************************************************* //
My fvSchemes:

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

ddtSchemes
{
    default         Euler;
    //default         CrankNicolson 0.5;
}

wallDist
{
	method meshWave;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
    //grad(U)         Gauss linear;
    grad(U)         cellLimited Gauss linear 1;
}

divSchemes
{
    default             none;
    //div(phi,U)          Gauss upwind;
    //div(phi,U)              Gauss linearUpwindV grad(U);
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,k)      Gauss upwind;
    div(phi,omega)    Gauss upwind;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
//    default         Gauss linear corrected;
    default         Gauss linear limited corrected 0.33;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
//    default         corrected;
    default         limited corrected 0.33;
}

fluxRequired
{
    default         no;
    pcorr           ;
    p               ;
}

wallDist
{
    method meshWave;
}


// ************************************************************************* //
maasyraf3 and Joe.in like this.
kmallick is offline   Reply With Quote

Old   March 22, 2018, 15:07
Default
  #2
New Member
 
Joe
Join Date: Nov 2017
Posts: 1
Rep Power: 0
Joe.in is on a distinguished road
Quote:
Originally Posted by kmallick View Post
I am simulating a vertical axis wind turbine (vawt) in OpenFoam using sliding mesh AMI. The turbine is a set of 3 twisted savonius style blades. The axis of rotation is the z axis. The stator domain is 19D x 14D x 14D where D is the turbine diameter. When I run my analysis with stuck rotor using SimpleFoam I get the correct positive torque around the z axis when equilibrium is reached However when I run a dynamic analysis with positive rotation speed around the z axis using PimpleDyMFoam, I consistently get negative torque and negative torque coefficient, even after the analysis has continued past a number of full 360 deg. rotations of the turbine. The only time I get a positive torque is when I run the PimpleDyMFoam analysis at zero or very low rotational speed.

I have checked all my parameters, boundary conditions, mesh quality, fvsolution and fvscheme settings and I just cannot seem to pinpoint what could be causing the negative torque. I have checked the log file and Courant number is always below 1.

I am anxious to seek out some help and suggestions from the forum.

Below are some pictures of my model and the relevant system files.












Here is my dynamicMeshDict:

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

dynamicFvMesh   dynamicMotionSolverFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solver solidBody;

solidBodyCoeffs
{
    cellZone        rotor;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin        (0 0 0);
        axis          (0 0 1);
        omega         7; // rad/s
    }
}

// ************************************************************************* //
My controlDict:

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

application     pimpleDyMFoam;

startFrom       latestTime;

//startTime       0;

stopAt          endTime;

endTime          20;

deltaT          .0025;

writeControl    adjustableRunTime;

writeInterval   0.01;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  yes

maxCo           1.0;

libs
(
    "libincompressibleTurbulenceModels.so"
);

functions
{
    #includeFunc residuals
    #includeFunc Q
    #include "surfaces"
    #include "forces"
    #include "wallPressure"
}

// ************************************************************************* //
My forces file:

HTML Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

forces
{
    type          forces;

    libs          ("libforces.so");
    writeControl  timeStep;
    timeInterval  1;

    log           yes;

    patches       ("blades.*");
    rho           rhoInf;     // Indicates incompressible
    log           true;
    rhoInf        1;          // Redundant for incompressible

    CofR          (0 0 0);    // Rotation around centre line of turbine
}

forceCoeffs
{
    type forceCoeffs;
    functionObjectLibs ("libforces.so");
    writeControl  timeStep;
    timeInterval  1;

    patches ("blades.*");
    rho           rhoInf;
    rhoInf        1;          // Redundant for incompressible

    CofR          (0 0 0);  
    pitchAxis     (0 0 1);
    dragDir       (1 0 0);
    liftDir       (0 1 0);
    magUInf       7;
    lRef	  1.;
    Aref	  2.44;
}


// ************************************************************************* //
My fvSolution:

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

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-8;
        relTol          0.01;
        smoother        GaussSeidel;
        cacheAgglomeration no;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;
        maxIter         50;
    }

    pFinal
    {
        $p;
        tolerance       1e-06;
        relTol          0;
    }

    pcorr
    {
        $p
        tolerance       0.02;
        relTol          0;
    }


    "(U|k|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-06;
        relTol          0.1;
	maxIter 100;
	minIter 1;
    }

    "(U|k|omega)Final"
    {
        $U;
        tolerance       1e-06;
        relTol          0;
	maxIter 100;
	minIter 1;
    }

    cellDisplacement
    {
        solver          GAMG;
        tolerance       1e-5;
        relTol          0;
        smoother        GaussSeidel;
    }
}

PIMPLE
{
    correctPhi          no; //was no
    nOuterCorrectors    1;  //was 2
    nCorrectors         2;
    nNonOrthogonalCorrectors 0;

    pRefCell            0;
    pRefValue           0;

    turbOnFinalIterOnly on;
    consistent          true;

	residualControl
	{
		"(p|U)"
		{
			tolerance 1e-4;
			relTol 0;
		}

		"(k|omega)"
		{
			tolerance 1e-4;
			relTol 0;
		}
	}

}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.9;
        k               0.7;
        omega           0.7;
    }
}


// ************************************************************************* //
My fvSchemes:

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

ddtSchemes
{
    default         Euler;
    //default         CrankNicolson 0.5;
}

wallDist
{
	method meshWave;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
    //grad(U)         Gauss linear;
    grad(U)         cellLimited Gauss linear 1;
}

divSchemes
{
    default             none;
    //div(phi,U)          Gauss upwind;
    //div(phi,U)              Gauss linearUpwindV grad(U);
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,k)      Gauss upwind;
    div(phi,omega)    Gauss upwind;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
//    default         Gauss linear corrected;
    default         Gauss linear limited corrected 0.33;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
//    default         corrected;
    default         limited corrected 0.33;
}

fluxRequired
{
    default         no;
    pcorr           ;
    p               ;
}

wallDist
{
    method meshWave;
}


// ************************************************************************* //
I too am encountering the same problem. I've got a similar case (VAWT) and the Moments (torque) in the z axis are negative or fluctuating more on the negative side and hence the turbine doesn't produce any power.

If someone could help with this regard, pls do reply.

Joe
Engineering Undergrad.
Joe.in is offline   Reply With Quote

Old   April 1, 2018, 15:51
Default
  #3
New Member
 
Carlos
Join Date: Nov 2017
Posts: 2
Rep Power: 0
Thyriel is on a distinguished road
I am facing a similar issue with my VAWT simulation. Sadly I don't have any clarification for you but hopefully you will be able to clarify something for me.
My forces setup resembles your own, i am curious however, if the parameters for the calculation of lift and drag account for the movement of the blades, as in will the lift and drag direction vary for the purposes of the calculation? if not, then how are you obtaining the forces required to compute the torque?
Thyriel is offline   Reply With Quote

Old   April 5, 2018, 11:29
Default
  #4
New Member
 
Kaushik Mallick
Join Date: Jan 2017
Posts: 10
Rep Power: 9
kmallick is on a distinguished road
The forces and moments in my VAWT simulation are computed using OpenFOAm's libforces library. There are many tutorials and examples on the intranet and forums. Hopefully you can resolve your problems soon.
kmallick is offline   Reply With Quote

Reply

Tags
pimpledymfoam, torque, vawt

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 09:08.