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

pipeline velocity profile

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By SHUBHAM9595

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2021, 06:12
Default pipeline velocity profile
  #1
New Member
 
Aydar
Join Date: Dec 2021
Location: Russia, Kazan
Posts: 4
Rep Power: 5
Aydar Mukhametov is on a distinguished road
Trying to calculate the velocity profile on the axis of the pipeline. Does not match analytical calculation.

long pipe section, y+ = 1, simpleFoam solver.

Please tell me how to set the initial settings.


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2106                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      bounded Gauss upwind;
	div(phi,p)      bounded Gauss upwind;
    turbulence      bounded Gauss upwind;
    div(phi,k)      $turbulence;
    div(phi,omega) $turbulence;

    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
	method meshWave;
}

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2106                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-06;
        relTol          0.1;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps     2;
        cacheAgglomeration on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels     1;
    }

    "(U|k|omega|R|nuTilda)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-05;
        relTol          0.1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;

   
}

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


// ************************************************************************* //
__________________
Best regards,Mukhametov Aydar
Aydar Mukhametov is offline   Reply With Quote

Old   December 8, 2021, 12:06
Default
  #2
Member
 
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 9
SHUBHAM9595 is on a distinguished road
Hello Aydar,

To begin with, you should switch to more accurate div scheme, something like

Code:
  div(phi,U)      bounded Gauss linearUpwind grad(U);
For the gradient calculations, you can switch to leastSquares instead of Gauss linear.

Do a checkMesh and see the max non - orthogonality, because now its bit contrdictory, as in fvSolutions you dont have any nonOrthoCorrectors but in fvSchemes you are using "corrector" for snGrad.

P.S. I did grep in tutorials and found that, you will never need div(phi, p), unless either you are solving for Compressible multiphase flows or have modified the solver to obtain something else.
Aydar Mukhametov likes this.

Last edited by SHUBHAM9595; December 8, 2021 at 16:07.
SHUBHAM9595 is offline   Reply With Quote

Reply

Tags
openfoam, simplefoam, yplus


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
[UDF] Relative coordinates in logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 25 July 13, 2017 04:44
3d velocity profile at velocity inlet swethaprakash FLUENT 3 September 1, 2015 03:10
Logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 0 April 23, 2009 20:09
[boundary condition] logarithmic velocity profile cfdworker FLUENT 2 April 18, 2009 00:36
Prescribed inflow velocity profile - how to? Alan Main CFD Forum 10 October 28, 2005 13:14


All times are GMT -4. The time now is 14:52.