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

turbulent velocity inlet and negative drag coefficients

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 18, 2020, 03:18
Default turbulent velocity inlet and negative drag coefficients
  #1
New Member
 
Hui Zhang
Join Date: Jun 2020
Posts: 15
Rep Power: 6
Isaiah_HZ is on a distinguished road
Hello FOAMers,

Recently I have encountered a problem, that is, when I use turbulent velocity inlet to simulate flow past cylinder, I got very weird flow and even negative drag coefficient. When I used laminar velocity inlet, I can get drag coefficient around 1.2, but when I used turbulentInlet boundary condition, I got big problem.

Can anyone help me on this problem, or any comments or suggestions about turbulent velocity inlet setup? Thank you, very much!!

drag coefficients are following, those are part of coefficients and I have run case to 60+ seconds, the results are same.
Quote:
Force coefficients
# liftDir : (0.000000e+00 0.000000e+00 1.000000e+00)
# dragDir : (1.000000e+00 0.000000e+00 0.000000e+00)
# pitchAxis : (0.000000e+00 0.000000e+00 1.000000e+00)
# magUInf : 1.000000e+00
# lRef : 1.000000e+00
# Aref : 1.000000e+00
# CofR : (0.000000e+00 0.000000e+00 0.000000e+00)
# Time Cm Cd Cl Cl(f) Cl(r)
0.05 -3.637109e-04 -9.393916e+00 -1.913834e-16 -3.637109e-04 3.637109e-04
0.1 -1.069031e-03 2.375448e+01 3.022741e-17 -1.069031e-03 1.069031e-03
0.15 -8.246212e-04 2.057010e+01 4.173255e-17 -8.246212e-04 8.246212e-04
0.2 3.506248e-04 1.181656e+01 -2.843983e-17 3.506248e-04 -3.506248e-04
0.25 -1.027511e-03 5.672581e+01 2.885990e-16 -1.027511e-03 1.027511e-03
0.3 -7.074825e-04 -2.189804e+01 -2.490386e-16 -7.074825e-04 7.074825e-04
0.35 1.543098e-04 -5.380912e+00 -8.722727e-17 1.543098e-04 -1.543098e-04
0.4 -8.585386e-04 -2.449880e+01 -3.211157e-16 -8.585386e-04 8.585386e-04
0.45 -1.749605e-03 -5.990513e+01 -5.966330e-16 -1.749605e-03 1.749605e-03
0.5 -5.186319e-05 1.595486e+01 4.767925e-17 -5.186319e-05 5.186319e-05
0.55 1.543635e-04 -3.588935e+01 -3.930577e-16 1.543635e-04 -1.543635e-04
0.6 -7.612249e-04 2.186014e+01 3.930336e-17 -7.612249e-04 7.612249e-04
0.65 3.313410e-04 4.639652e+01 2.889795e-16 3.313410e-04 -3.313410e-04
0.7 2.892349e-04 2.621798e+01 1.689769e-16 2.892349e-04 -2.892349e-04
0.75 9.735677e-04 -1.517326e+00 -1.294361e-16 9.735677e-04 -9.735677e-04
0.8 -2.238232e-04 -3.281918e+00 -1.674658e-16 -2.238232e-04 2.238232e-04
0.85 2.134998e-03 3.552458e+01 1.390528e-16 2.134998e-03 -2.134998e-03
0.9 1.684388e-03 5.884333e+00 -8.721815e-17 1.684388e-03 -1.684388e-03
0.95 -7.424199e-04 4.539278e+01 2.427875e-16 -7.424199e-04 7.424199e-04
1 -1.481543e-03 -2.255855e+01 -2.944276e-16 -1.481543e-03 1.481543e-03
1.05 -1.582587e-03 -2.505637e+01 -3.293464e-16 -1.582587e-03 1.582587e-03
1.1 -8.179162e-04 2.253506e+01 6.726714e-17 -8.179162e-04 8.179162e-04
1.15 -1.319489e-03 3.004999e+01 1.292810e-16 -1.319489e-03 1.319489e-03
1.2 -1.192611e-03 -2.039599e+01 -2.585416e-16 -1.192611e-03 1.192611e-03
1.25 -1.379565e-03 -1.013076e+01 -1.370142e-16 -1.379565e-03 1.379565e-03
1.3 6.314464e-04 1.041990e+01 -4.245293e-17 6.314464e-04 -6.314464e-04
1.35 -7.855393e-04 7.819462e+01 5.326010e-16 -7.855393e-04 7.855393e-04
1.4 -2.026940e-03 3.335260e+01 1.830789e-16 -2.026940e-03 2.026940e-03
1.45 -5.432268e-03 1.905791e+01 6.719342e-17 -5.432268e-03 5.432268e-03
1.5 -4.095904e-03 -3.961749e+01 -4.103964e-16 -4.095904e-03 4.095904e-03
1.55 -1.168909e-04 4.603047e+00 -5.514416e-17 -1.168909e-04 1.168909e-04
1.6 5.805177e-03 3.819683e+01 2.081643e-16 5.805177e-03 -5.805177e-03
1.65 6.791586e-03 -4.846155e+01 -4.837928e-16 6.791586e-03 -6.791586e-03
1.7 8.073238e-03 -6.908144e+00 -1.649426e-16 8.073238e-03 -8.073238e-03

The following is my code
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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


internalField uniform (1 0 0);

boundaryField
{
inlet
{
type turbulentInlet;
referenceField uniform (1 0 0);
fluctuationScale (0.01 0.01 0);
}

outlet
{
type zeroGradient;
}

topwall
{
type symmetryPlane;
}

bottomwall
{
type symmetryPlane;
}

cylinder
{
type fixedValue;
value uniform (0 0 0);
}

front
{
type empty;
}

back
{
type empty;
}

}


// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

topwall
{
type symmetryPlane;
}

bottomwall
{
type symmetryPlane;
}

cylinder
{
type zeroGradient;
}
front
{
type empty;
}

back
{
type empty;
}
}

// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nuTilda;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}

outlet
{
type zeroGradient;
}

topwall
{
type symmetryPlane;;
}
bottomwall
{
type symmetryPlane;;
}

cylinder
{
type fixedValue;
value uniform 0;
}

front
{
type empty;
}

back
{
type empty;
}
}

// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
topwall
{
type symmetryPlane;
value uniform 0;
}
bottomwall
{
type symmetryPlane;
value uniform 0;
}
cylinder
{
type calculated;
value uniform 0;
}
front
{
type empty;
}

back
{
type empty;
}
}


// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// k = 3/2*(Uref * I)^2 = 0.002159
// I = 0.16*Re^(-1/8)= 0.03794
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.002159;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.002159;
}
outlet
{
type zeroGradient;
}
topwall
{
type symmetryPlane;
}
bottomwall
{
type symmetryPlane;
}
cylinder
{
type fixedValue;
value uniform 0.0;
}
front
{
type empty;
}

back
{
type empty;
}
}


// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

transportModel Newtonian;

nu [0 2 -1 0 0 0 0] 1e-05;

// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType LES;

LES
{
LESModel Smagorinsky;

turbulence on;

printCoeffs on;

delta cubeRootVol;

dynamicKEqnCoeffs
{
filter simple;
}

cubeRootVolCoeffs
{
deltaCoeff 1;
}

PrandtlCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}

Cdelta 0.158;
}

vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}

Aplus 26;
Cdelta 0.158;
}

smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}

maxDeltaRatio 1.1;
}
}
// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default backward;
}

gradSchemes
{
default leastSquares;
}

divSchemes
{
default none;
div(phi,U) Gauss linear;
div(phi,k) Gauss linear;
div(phi,B) Gauss linear;
div(phi,nuTilda) Gauss linear;
div(B) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;

}

laplacianSchemes
{
default Gauss linear limited 1;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default limited 1;
}

fluxRequired
{
default no;
p ;
}

wallDist
{
method meshWave;
}


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

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-7;
relTol 0;
}

pFinal
{
$p;
relTol 0;
}

"(U.*|k.*|B.*|nuTilda.*)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}

}

PISO
{
momentumPredictor yes;
nCorrectors 3;
nNonOrthogonalCorrectors 2;
pRefCell 0;
pRefValue 0;
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.7;
R 0.7;
nuTilda 0.7;
nut 0.7;
}
}
// ************************************************** *********************** //
Isaiah_HZ is offline   Reply With Quote

Old   September 25, 2020, 13:04
Default
  #2
New Member
 
Hui Zhang
Join Date: Jun 2020
Posts: 15
Rep Power: 6
Isaiah_HZ is on a distinguished road
anyone has this kind of experience?
Thanks
Isaiah_HZ is offline   Reply With Quote

Reply

Tags
cylinder, fluctuated flow, openfoam, turbulentinlet


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 18:22
negative velocity inlet hebeldebel STAR-CCM+ 1 July 22, 2015 17:33
3-D parabolic velocity Inlet - Steady state - UDF Turbulent Flow mohibanwar Fluent UDF and Scheme Programming 10 May 18, 2015 11:34
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 11:45.