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

Wrong radial velocity near the rotating wall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2022, 23:11
Default Wrong radial velocity near the rotating wall
  #1
New Member
 
Jinghong Su
Join Date: Mar 2021
Posts: 3
Rep Power: 5
Su JH is on a distinguished road
I am using the type rotatingWallVelocity to simulate taylor-couette flow. Strangely, the radial velocity of the rotating wall is equal to 0, while the cells close to the rotating wall, especially the first layer cells, show abnormal radial velocities. In order to observe this phenomenon more clearly, I simulated the case where the inner and outer walls have the same angular velocity. The inlet and outlet are set to be cyclic. The front patch and back patch are set to be empty.

The magnitude of velocity
image1.png

The radial velocity(ur)
image2.jpg

The radial velocity(ur) is obtained by codes following:
dimensionedVector zNormal("zNormal", dimless, vector(0.0, 0.0, 1.0));
volVectorField C = mesh.C();
volVectorField xy = (C - zNormal * (C & zNormal));
ur = U & xy / mag(xy);

0/U file
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];


internalField   uniform (0 0 0);

boundaryField
{
    fixedWall
    {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis            (0 0 1);
        omega           constant 2.72;
        value           uniform (0 0 0);
    }
    movingWall
    {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis            (0 0 1);
        omega           constant 2.72;
	value           uniform (0 0 0);
    }
    patch1_inlet
    {
        type            cyclic;
    }
    patch1_outlet
    {
        type            cyclic;
    }
    patch2_periodic0
    {
        type            empty;
    }
    patch2_periodic1
    {
        type           empty;
    }
}
system/fvSchemes
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear orthogonal;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         orthogonal;
}
system/fvSolution
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0.05;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    U
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-05;
        relTol          0;
    }
}

PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 1;
    pRefCell        0;
    pRefValue       0;
}
The run file is attached:rotatingWallVelocity_test.zip
OpenFOAM version : v2012

Beside, I also try to set the rotating velocity by codedFixedValue, finding the same results. So I think there is something wrong with the discrete format,but I can't check it out.

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];


internalField   uniform (0 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    fixedWall
    {
        name    rotatingVelocity_out;
        type        codedFixedValue;
        code
        #{
            const vector axis(0, 0, 1);
            const scalar omega = 2.72;
            vectorField v(omega*this->patch().Cf() ^ axis);
            operator==(v);

        #};

       value           $internalField;
    }
    movingWall
    {
        name    rotatingVelocity_in;
        type        codedFixedValue;
        code
        #{
            const vector axis(0, 0, 1);
            const scalar omega = 2.72;
            vectorField v(omega*this->patch().Cf() ^ axis);
            operator==(v);

        #};

       value           $internalField;

    }
    patch1_inlet
    {
        type            cyclic;
    }
    patch1_outlet
    {
        type            cyclic;
    }
    patch2_periodic0
    {
        type            empty;
    }
    patch2_periodic1
    {
        type           empty;
    }
}
Su JH is offline   Reply With Quote

Old   September 7, 2023, 15:56
Default
  #2
New Member
 
Lorenzo
Join Date: Sep 2023
Posts: 2
Rep Power: 0
usrL is on a distinguished road
Quote:
Originally Posted by Su JH View Post
I am using the type rotatingWallVelocity to simulate taylor-couette flow. Strangely, the radial velocity of the rotating wall is equal to 0, while the cells close to the rotating wall, especially the first layer cells, show abnormal radial velocities. In order to observe this phenomenon more clearly, I simulated the case where the inner and outer walls have the same angular velocity. The inlet and outlet are set to be cyclic. The front patch and back patch are set to be empty.

The magnitude of velocity
Attachment 92200

The radial velocity(ur)
Attachment 92201

The radial velocity(ur) is obtained by codes following:
dimensionedVector zNormal("zNormal", dimless, vector(0.0, 0.0, 1.0));
volVectorField C = mesh.C();
volVectorField xy = (C - zNormal * (C & zNormal));
ur = U & xy / mag(xy);

0/U file
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];


internalField   uniform (0 0 0);

boundaryField
{
    fixedWall
    {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis            (0 0 1);
        omega           constant 2.72;
        value           uniform (0 0 0);
    }
    movingWall
    {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis            (0 0 1);
        omega           constant 2.72;
	value           uniform (0 0 0);
    }
    patch1_inlet
    {
        type            cyclic;
    }
    patch1_outlet
    {
        type            cyclic;
    }
    patch2_periodic0
    {
        type            empty;
    }
    patch2_periodic1
    {
        type           empty;
    }
}
system/fvSchemes
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear orthogonal;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         orthogonal;
}
system/fvSolution
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-06;
        relTol          0.05;
    }

    pFinal
    {
        $p;
        relTol          0;
    }

    U
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-05;
        relTol          0;
    }
}

PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 1;
    pRefCell        0;
    pRefValue       0;
}
The run file is attached:Attachment 92202
OpenFOAM version : v2012

Beside, I also try to set the rotating velocity by codedFixedValue, finding the same results. So I think there is something wrong with the discrete format,but I can't check it out.

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];


internalField   uniform (0 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    fixedWall
    {
        name    rotatingVelocity_out;
        type        codedFixedValue;
        code
        #{
            const vector axis(0, 0, 1);
            const scalar omega = 2.72;
            vectorField v(omega*this->patch().Cf() ^ axis);
            operator==(v);

        #};

       value           $internalField;
    }
    movingWall
    {
        name    rotatingVelocity_in;
        type        codedFixedValue;
        code
        #{
            const vector axis(0, 0, 1);
            const scalar omega = 2.72;
            vectorField v(omega*this->patch().Cf() ^ axis);
            operator==(v);

        #};

       value           $internalField;

    }
    patch1_inlet
    {
        type            cyclic;
    }
    patch1_outlet
    {
        type            cyclic;
    }
    patch2_periodic0
    {
        type            empty;
    }
    patch2_periodic1
    {
        type           empty;
    }
}
Hi,
I have the same problem. Did you solve it? If so, what was the problem?
Thanks in advance.
usrL is offline   Reply With Quote

Reply

Tags
icofoam, near-wall, openfoam, radial velocity, rotatingwall


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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 01:04
Rotating wall velocity boundary condition for axisymmetric flow problem diwakaranant SU2 1 March 24, 2013 00:45
UDF for wall slipping HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 13:03
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 03:13


All times are GMT -4. The time now is 23:46.