CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   LES turbulent pipe flow (https://www.cfd-online.com/Forums/openfoam-solving/58905-les-turbulent-pipe-flow.html)

hasanduz August 5, 2011 21:33

laminar to turbulent transitonal pipe flow
 
I am studying transitional pipe flow in numerical. This is my doctorate thesis. My aim is to simulate pressure fluctuation on the entire pipe flow or I want to simulate the existance of transition through the pipe flow.

*How can I carried out this one by using LES model in FLUENT.
My package program is ANSYS 12.

* how can I impose the perturbations into the pipe flow for transition.

is there any tutorial about this or any notes

I will be pleased with your helpings

sen.1986 March 29, 2012 06:53

To all, and specially Cedric,

I was trying to emulate the exact case that Cedric had discussed. For starters, I would like to know, as to how long approximately, one has to wait, for the flow to depict Turbulence? I have already completed around 70 time cycles, but I see no turbulence yet :(

I am using inlet/outlet boundary condition, for inlet and outlet respectively, and 'wall' for my walls. I initialize my flow field using the perturbU code by Eugene.

Any help, is most welcome.

florian_krause March 29, 2012 07:11

Quote:

Originally Posted by sen.1986 (Post 352151)
To all, and specially Cedric,

I was trying to emulate the exact case that Cedric had discussed. For starters, I would like to know, as to how long approximately, one has to wait, for the flow to depict Turbulence? I have already completed around 70 time cycles, but I see no turbulence yet :(

I am using inlet/outlet boundary condition, for inlet and outlet respectively, and 'wall' for my walls. I initialize my flow field using the perturbU code by Eugene.

Any help, is most welcome.

I would say, if after 70 flow cycles your perturbed laminar flow field is not becoming turbulent there is something going wrong... did you check how your perturbations (the imposed low-speed streaks at the wall) are evolving over time? just make a cut through your pipe and look at the velocity contours for different times

What is your y+ at the wall and what schemes are you using?

Are you setting your case up as a short periodic pipe with dimensions as approx. length = 5 diameter?

Best,
Florian

sen.1986 March 29, 2012 07:35

Quote:

Originally Posted by florian_krause (Post 352155)
I would say, if after 70 flow cycles your perturbed laminar flow field is not becoming turbulent there is something going wrong... did you check how your perturbations (the imposed low-speed streaks at the wall) are evolving over time? just make a cut through your pipe and look at the velocity contours for different times

What is your y+ at the wall and what schemes are you using?

Are you setting your case up as a short periodic pipe with dimensions as approx. length = 5 diameter?

Best,
Florian

Yes, I did check the imposed low speed streaks, as they evolve with time, or rather don't evolve significantly with time.

My y+ at the wall is 70,

Here is a copy of my fvschemes file,

Quote:

ddtSchemes
{
default backward;
}

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

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

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DBEff,B) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}
This is exactly as it is, in the ChannelFoam case, I merely changed the divergence scheme of U from Gauss Linear to Gauss Limitedlinear.

In my case Length of pipe= 5.7 * D

Will this help?

florian_krause March 29, 2012 08:09

Well, if y+=70 at the wall is not a typo, then for a LES it is far too large.

You have to resolve the flow near the wall, so you should have at least 3 cells within the viscous sublayer (y+ approx. 5) and the smallest y+ should be approx. 0.3-0.5. Using that, I generally obtain acceptable results.

Hope that helps!
Florian

sen.1986 March 29, 2012 08:25

Quote:

Originally Posted by florian_krause (Post 352166)
Well, if y+=70 at the wall is not a typo, then for a LES it is far too large.

You have to resolve the flow near the wall, so you should have at least 3 cells within the viscous sublayer (y+ approx. 5) and the smallest y+ should be approx. 0.3-0.5. Using that, I generally obtain acceptable results.

Hope that helps!
Florian

Thank you for the prompt reply. Ok I see now, what you are saying. Yes I misreported the value of y+. At the boundary, the closest cell has a y+ value of 16. I understand that it there should be 3 cells approximately, within the viscous sub layer. Let me try this out, and I shall get back to you.

cedric_duprat March 30, 2012 07:53

Senpatras,

As already mention by Florian, for a LES simulation, y+ should be less than 1 and 3 cells within the viscous layer is really the minimum.
If your mesh is too coarse, you will dissipate the perturbation created by perturbU.

If I remember correcly, in perturbU, you can change few parameters such as the amplitude of the noise added. This might be the easiest way.

let us know if it's working or not.

I my case, I was interesting in swirling flow that's why I've used an other method which is to add a bodyforce in the orthoradial direction to let the flow become unsteady (rotating flow is more unstable than pure axial flow). After few time cycle, you can remove this bodyforce and let the flow converge to an non-rotating flow. Then you can start the averaging of your fields. Of course you will need to modified the solver with this method.

I hope this will help you,

Cedric

sen.1986 March 30, 2012 08:41

Quote:

Originally Posted by cedric_duprat (Post 352314)
Senpatras,

As already mention by Florian, for a LES simulation, y+ should be less than 1 and 3 cells within the viscous layer is really the minimum.
If your mesh is too coarse, you will dissipate the perturbation created by perturbU.

If I remember correcly, in perturbU, you can change few parameters such as the amplitude of the noise added. This might be the easiest way.

let us know if it's working or not.

I my case, I was interesting in swirling flow that's why I've used an other method which is to add a bodyforce in the orthoradial direction to let the flow become unsteady (rotating flow is more unstable than pure axial flow). After few time cycle, you can remove this bodyforce and let the flow converge to an non-rotating flow. Then you can start the averaging of your fields. Of course you will need to modified the solver with this method.

I hope this will help you,

Cedric

Thank you. I am working on it now :) Will get back real soon.

sen.1986 April 2, 2012 08:00

@Cedric and Florian

Now, I need some help with refining the mesh, I can't make proper headway because of this. Firstly, I would like to ask you, is there a proper tutorial for topoSet and refineMesh application of OpenFoam, I am really confused with the two as of now. I am presently trying to mesh near the wall, as suggested by you guys, i.e to have 4 cells within y+ = 5.

For doing that, I am presently using the following refinemeshdict and toposetdict files, but I do not see refinement after I run toposet and refineMesh at the terminal, though they do not report any error. My geometry is a circular pipe with x [0 0.12], y[-0.01 0.01] and z[-0.01 0.01].

Quote:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object refineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

set c0;

coordinateSystem local;

globalCoeffs
{
normal ( 1 0 0 );
tan1 ( 0 1 0 );
tan2 ( 0 0 1 );
}

patchLocalCoeffs
{
patch wall;
tan1 ( 0 1 0 );
}

directions ( tan2 );

useHexTopology no;

geometricCut yes;

writeMesh no;
Quote:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
{
name c0;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0 9.97e-03 -0.01) (0.12 0.01 0.01);
}
}
);
Regards.

florian_krause April 4, 2012 03:37

I have never used these utilities, so I cannot help you with that. I created my pipe grids in a different grid generator calculating the thickness of the viscous sublayer as
y_{visc. sublayer} = y^+(=5)*d_{pipe} / Re_{tau}

Did you search the forum for the utilities? There is also a sub-forum Meshing & Mesh Conversion, I guess your question is better placed there.

Regards,
Florian

cedric_duprat April 5, 2012 02:06

I don't know how you've generate your mesh but, there is somewhere in the forum a blockMesh file to do simple pipe configuration (butterfly mesh).
In this case it is really easy to modify the distribution close to the wall and not too much time consuming.

I've never used these utilities either.

Regards,

Cédric

sen.1986 April 12, 2012 08:13

3 Attachment(s)
So after a bit of a struggle, I need more help. This is what I did in the meanwhile, I couldn't grasp how one could remesh specifically near the wall using blockmesh (meshing uniformly and stayisfying the condition of having 3 elements inside y+=5 seemed to expensive. So I decided to mesh with icemcfd. The mesh looks, as is shown in the attachment.

Attachment 12509

Attachment 12510

Attachment 12511

After I did this, I exported the mesh and then using Fluent3dtoFoam converted it. When I tried running perturbU initially, an annoying face ordering problem was reported, with 1.98%. This has something to do with the periodic/cyclic boundary conditions. After rechecking my association of edges and curves again, the only way to work around it was to increase the matchTolerance to 2, from the preset value of 1d-4.

After that perturbU ran just fine, and then when I run my case, the Courant Number goes fine for about 70 iterations, and then suddenly the residuals shoot up, and my simulation blows off. My calculated deltaT for a Courant no. of 0.5 is 7.5d-5, hence I am using a time step of 1d-5.

Any ideas, how one could go about it next?

sen.1986 April 13, 2012 05:43

2 Attachment(s)
Also, this is where the simulation blows up. I am using a time step of 1d-5. From the 76th time step to 77th time step, something suddenly goes wrong with Uy, which causes the residuals to Uy to go very high, eventually causing the simulation to diverge. I am attaching the two plots of Uy at time 0.00076 and 0.00077.

Attachment 12527

Attachment 12528

Kindly give it a look, and let me know if you have any idea.

timo_IHS April 13, 2012 06:15

Hi,

which solver do you use? What is your Courant number? which sgs-model? What is your inlet BC?
Which case do you run?

Best

cedric_duprat April 13, 2012 07:59

Hi Senpatras,

Are you sure there is no influence fixing the matchTolerance to 2, from the preset value of 1e-4 (4 orders magnitudes are quite a lot ....) ?
In an other word, is your periodic BC really cyclic ?

To avoid this problem, you could create a simple blockMeshDict file. Maybe you can have a look at the turbomachinery SIG: http://openfoamwiki.net/index.php/Si...nical_diffuser
This test case includes parametrizations of an axisymetric geometry using O-grid, you will find the blockMeshDict.m4 file to create both geometry and mesh.
It straithforward to get a periodic pipe mesh in the native blockMesh format.

I hope this will help you,

Cedric

antonio.samel June 29, 2013 05:40

Source term in the momentum equation
 
Quote:

Originally Posted by panara (Post 192082)
Hi Fabian,
I am using cylcic boundary condition at the inlet and outlet of the pipe plus a source term in the momentum equation to sustain the flow.

I have used this configuration already with another code and in a channel configuration initializing the flowfield with white noise.
It worked for the channel, but I am having problems with openFoam and the pipe configuration (I just started to try.. )

I saw that in OpenFoam exists also a turbulent inlet... but I didn't try it..

Anyway could anybody give some reference on the compressible LES turbulence models implemented in OpenFoam?

Thanks

Hello Mr. Panara.
Could you explain how to implement the referenced momentum source term? You implement a constant force or something like a pressure gradient?

Thanks,
Antonio

pante December 20, 2013 05:38

Hi guys,
I am trying to simulate a turbulent pipe flow, Re=5300 (based on bulk velocity and diameter of cylinder pipe). My problem is in the initialization of turbulent field. I saw the existence of perturbU utility for this purpose, but when I download the .tgz file am not able to open it as its changes to .unk (unknown) type.
Any suggestions?

Thanks!

huangxianbei March 4, 2014 03:32

Quote:

Originally Posted by eugene (Post 192079)
Try this

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif perturbCylinder.tgz

You have to edit the code and set the cylinder diameter and Re_tau. It only works for flow in the x direction. It will set up wavy sinusoidal precursor perturbations that should develop into fully blown turbulence after a few dozen flow-through times.

Hi, Eugene
I'm looking for your Phd thesis for a long time in order to study the channel flow using openfoam with LES and DNS. But I can't find it for my net can't connect to some website. So can you be so kind to send me a copy of your thesis? My email is znhuang@163.com

Best regards

gu1 January 24, 2018 13:05

postChannel
 
Quote:

Originally Posted by cedric_duprat (Post 192116)
Now, I plan to postprocess the result and I'd like to know if there is a "postChannel" for periodic LES pipe ? or if a postChannel with one periodic direction will be enough ?
If some one has experience of this topic, I'm interesting to that.

Cedric

Did you find out anything about this?

lastjedivol September 16, 2019 09:58

Quote:

Originally Posted by gu1 (Post 679245)
Did you find out anything about this?


Hello, still interested about postprocessing turbulent pipe flows. I need to average spatially U.z over a homogeneous direction z of a pipe. Result of the averaging should be a surface field U.z(x,y). Is it possible? Is there any progress regarding pipe postprocessing that you can share?


Thank you very much!


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