# Turbulent Paralell plates Simulation

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

 March 24, 2017, 12:09 #2 Senior Member     Uwe Pilz Join Date: Feb 2017 Location: Leipzig, Germany Posts: 590 Rep Power: 9 You have fixed "to much " boundary conditions. If you give two pressures you may only give one velocity. If you give two velocities (which should different from each other for any need to simulate the result) give only one pressure bc. If you get a Reynold number which is rather high you have vortices in the flow and therewith a y component of the velocity. __________________ Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)

March 25, 2017, 09:30
#3
New Member

Join Date: Mar 2017
Posts: 11
Rep Power: 5
Quote:
 Originally Posted by piu58 You have fixed "to much " boundary conditions. If you give two pressures you may only give one velocity. If you give two velocities (which should different from each other for any need to simulate the result) give only one pressure bc. If you get a Reynold number which is rather high you have vortices in the flow and therewith a y component of the velocity.
If you give two pressures you may only give one velocity.
The purpose of the two velocity BC (which are zero gradient) is to impose a fully developed flow state in the inlet and outlet (as long as everywhere along the flow, which is clearly not happening in the results)

If you get a Reynold number which is rather high you have vortices in the flow and therewith a y component of the velocity

That's right! But for a fully developed case, I should have as the result something that resembles the power law everywhere along the geometry, right?

Power law:
u/U=(y/R)^(1/n)

Also, I've redone the simulation with low Reynolds number and I'm geting the same Uy profile (and something like Uymax=~0.01 Uxmax)

I've forgotten to mention: I'm using the k-epsilon model in this case.

 March 26, 2017, 05:47 #4 Senior Member   Santiago Lopez Castano Join Date: Nov 2012 Posts: 295 Rep Power: 11 I don't understand which archetype flow are you trying to get. Turbulent Wall bounded channel flow, perhaps? Sent from my GT-I8190L using CFD Online Forum mobile app

March 27, 2017, 16:12
#5
New Member

Join Date: Mar 2017
Posts: 11
Rep Power: 5
Quote:
 Originally Posted by Santiago I don't understand which archetype flow are you trying to get. Turbulent Wall bounded channel flow, perhaps? Sent from my GT-I8190L using CFD Online Forum mobile app
Yes, that's right

I should have a velocity profile such as the power law velocity profile

reference (page 8):
http://www.itcmp.pwr.wroc.pl/~znmp/d..._Modelling.pdf

and my simulation results agree with that profile for the fully developed region of my geometry (when Uy=~0). (that's good )

My doubt is: why am I getting a Uy different than 0 in the inlet zone if I'm using periodic boundary conditios (except for pressure) for the inlet and outlet faces?

 March 27, 2017, 16:32 #6 Senior Member   Santiago Lopez Castano Join Date: Nov 2012 Posts: 295 Rep Power: 11 Three things: (1) your turbulent velocity profiles do not fit *at all* to what it should be, the Ux profile is definitely not a logarithmic profile, and it should be statistically symmetric at mid height if the two horizontal boundaries are walls; (2) it is not clear to me how you are driving the flow, are you imposing a velocity profile? (3) your bc for kappa is not physically consistent, kappa is the turbulent kinetic energy of the flow, the energy contained ib the fluctuations, is it feasable in your case to have a solid boundary producing vorticity? Sent from my GT-I8190L using CFD Online Forum mobile app

 March 27, 2017, 17:28 #7 Senior Member   Paulo Vatavuk Join Date: Mar 2009 Location: Campinas, Brasil Posts: 189 Rep Power: 13 Hi Felipe, Your case setup seems correct, but something went wrong. Which version of OpenFOAM you are using? Can you post the complete case? Best regards, Paulo

March 27, 2017, 17:53
#8
New Member

Join Date: Mar 2017
Posts: 11
Rep Power: 5
Quote:
 Originally Posted by Santiago Three things: (1) your turbulent velocity profiles do not fit *at all* to what it should be, the Ux profile is definitely not a logarithmic profile, and it should be statistically symmetric at mid height if the two horizontal boundaries are walls; (2) it is not clear to me how you are driving the flow, are you imposing a velocity profile? (3) your bc for kappa is not physically consistent, kappa is the turbulent kinetic energy of the flow, the energy contained ib the fluctuations, is it feasable in your case to have a solid boundary producing vorticity? Sent from my GT-I8190L using CFD Online Forum mobile app
(1) your turbulent velocity profiles do not fit *at all* to what it should be, the Ux profile is definitely not a logarithmic profile, and it should be statistically symmetric at mid height if the two horizontal boundaries are walls;

The pictures that I posted in my first topic were the Ux velocity along the x direction (y=0.8) (just for you to see that it is not constat, which is wrong for a fully developed flow),
The Uy velocity along the inlet face (x=0),
The turbulent energy (kappa) along the x direction.

(Sorry, maybe those pictures weren't clear enough). I haven't posted yet the Ux velocity varyng with y yet, so here it goes:

power law comparison.png

1-The picture shows the Ux velocity along y for x=5 (this corresponds to the middle section of my geomety). At this region, Uy=~0 and the flow is fully devloped.
2-The height of my geometry is 1 (Here, I've ploted Ux untill the middle of the section because, as you said, Ux is statistically symmetric at mid height)
3-As you can see, the simulated Ux profile agrees with the power law profile (error bellow 1%).

(2) it is not clear to me how you are driving the flow, are you imposing a velocity profile?

No, I'm imposing a pressure difference beetween the inlet and outlet boundaries.

inlet (left face):
p: fixed value; value 0.2

outlet (right face):
p: fixed value; value 0

(3) your bc for kappa is not physically consistent, kappa is the turbulent kinetic energy of the flow, the energy contained ib the fluctuations, is it feasable in your case to have a solid boundary producing vorticity?

I've tried the zerogradient kappa on the inlet and outlet boundaies. I've imagined that this should be the best BC to simulate a fully developed flow (any ideas of a better BC are welcome )
For the up and bottom faces (walls) this variable were calculated using kqRWallFunction BCs (which is basically a wall law that impose a zero gradient condition too)

 March 28, 2017, 03:26 #9 Senior Member   Agustín Villa Join Date: Apr 2013 Location: Fuenlabrada Posts: 257 Rep Power: 11 Hi, if you want to have the developed solution, why don't you use a cyclic BC between inlet and outlet? Then you fix your pressure gradient inside fvOptions Santiago likes this.

March 28, 2017, 03:58
#10
Senior Member

Santiago Lopez Castano
Join Date: Nov 2012
Posts: 295
Rep Power: 11
Quote:
This is a very different discussion now that you have been more clear on what you have posted. Now, I guess you are somehow trying to generate a "pressure gradient" imposing this difference of pressure between the inlet and the outlet. This, although it is more consistent with what you would do in experiments, is not recommended. The first reason for that is that pressure, in general, has no physical meaning in incompressible flows; but its gradient does (a bodyforce), so instead try to put a bodyforce in the momentum equation. Second reason is that TKE (or kappa) is produced by the stretching of vortex streaks close to the walls, and then convected along the channel so there is no easy way to determine an "inlet" value for kappa specially in RANS. Since it's fully developed BL flow you are studying, vertical boundaries can be periodic (or cyclic, as OF likes to call them). Last thing, why you think spanwise/vertical velocities must be zero at all times? There would be no production of TKE if V=0, although in the mean they should be zero. Now, for the wall functions you're using you'll have to refer to the source code and see what exactly is being done there, and see if it is physically consistent with your problem at hand. In my experience using FOAM, I've found that trusting the developers on what they promise is implemented is a very dangerous game.

March 28, 2017, 21:16
#11
New Member

Join Date: Mar 2017
Posts: 11
Rep Power: 5
Quote:
 Originally Posted by vatavuk Hi Felipe, Your case setup seems correct, but something went wrong. Which version of OpenFOAM you are using? Can you post the complete case? Best regards, Paulo
Paulo,

Which version of OpenFOAM you are using?
I'm using v1606 (I think that it's the last version avaiable for windows). I've just intalled openfoam a coupple of months ago, so it should be up to date

Can you post the complete case?
Not a problem, I've just attached it to this messege

case.zip

March 28, 2017, 21:29
#12
New Member

Join Date: Mar 2017
Posts: 11
Rep Power: 5
Quote:
 Originally Posted by agustinvo Hi, if you want to have the developed solution, why don't you use a cyclic BC between inlet and outlet? Then you fix your pressure gradient inside fvOptions
agustinvo,

That should be a good idea (I've tried already to set cyclic BCs but I couldn't get it done becase of the pressure).

I'm quite new to openFoam, thats why I've never used "fvOptions" before. I read a little about it after you sent your messege and found out that what I should use is probably the "directionalPressureGradientExplicitSource " function, which has the following description in
http://www.openfoam.com/documentatio...e.html#details

Creates an explicit pressure gradient source in such a way to deflect the flow towards an specific direction (flowDir). Alternatively add an extra pressure drop in the flowDir direction using a model.

Ok, now I know that this functions add a pressure gradient to the flow equation and it is based on a model, but I didn't understand what "explicit" means in this case. Could you explain it in more detail?

March 28, 2017, 22:12
#13
New Member

Join Date: Mar 2017
Posts: 11
Rep Power: 5
Quote:
 Originally Posted by Santiago This is a very different discussion now that you have been more clear on what you have posted. Now, I guess you are somehow trying to generate a "pressure gradient" imposing this difference of pressure between the inlet and the outlet. This, although it is more consistent with what you would do in experiments, is not recommended. The first reason for that is that pressure, in general, has no physical meaning in incompressible flows; but its gradient does (a bodyforce), so instead try to put a bodyforce in the momentum equation. Second reason is that TKE (or kappa) is produced by the stretching of vortex streaks close to the walls, and then convected along the channel so there is no easy way to determine an "inlet" value for kappa specially in RANS. Since it's fully developed BL flow you are studying, vertical boundaries can be periodic (or cyclic, as OF likes to call them). Last thing, why you think spanwise/vertical velocities must be zero at all times? There would be no production of TKE if V=0, although in the mean they should be zero. Now, for the wall functions you're using you'll have to refer to the source code and see what exactly is being done there, and see if it is physically consistent with your problem at hand. In my experience using FOAM, I've found that trusting the developers on what they promise is implemented is a very dangerous game.
The first reason for that is that pressure, in general, has no physical meaning in incompressible flows; but its gradient does (a bodyforce), so instead try to put a bodyforce in the momentum equation

Thanks for the advice I'll try to do that

Second reason is that TKE (or kappa) is produced by the stretching of vortex streaks close to the walls, and then convected along the channel so there is no easy way to determine an "inlet" value for kappa specially in RANS

Yes, I've figured that out when I tried to come with a BC for kappa. I only set these BC because before I started simulating this case, Ive done another simulation for the laminar flow in this ame geometry and I wanted to keep the same BCs for pressure and velocity. But thinking about it, I really should have imposed the velocity value on the faces (not the pressure). That way I could easily have BCs for kappa and apsilon ( such as http://www.esi-cfd.com/esi-users/turb_parameters/ ). Anyway, seting the two BDs as cyclic and using fvOptions seems to be a good idea too.

Last thing, why you think spanwise/vertical velocities must be zero at all times? There would be no production of TKE if V=0, although in the mean they should be zero.

Thinking about it now, maybe the V can really be different than 0 at some times but what I must have as a result is something that agrees with the power law velocity profile at every section of my geometry (that's the result that I'm trying to achieve as I'm trying to simulate a developed flow). Unfortunately, that's not what is happening at the inlet zone.

Now, for the wall functions you're using you'll have to refer to the source code and see what exactly is being done there, and see if it is physically consistent with your problem at hand.

Couldnt find any problem with the law of wall that I'm using. The developed zone of my results is alright so I don't think that this law of wall is unrealistic in my case. (just to be sure I've double checked it and it seemes to be working fine)

 March 29, 2017, 23:58 #14 New Member   Felipe Murad Join Date: Mar 2017 Posts: 11 Rep Power: 5 Dear all, I've followed your advice and started considereing my inlet and outlet BCs as cyclic and started to use fvOptions to set the pressure gradient. At the momment that I've done this, openfoam started to crash (the following error was shown): error.png I'm also sending an updated version of my case (NOTE: don't forget to run topoSetDict) case.zip Am I doing something wrong?

March 30, 2017, 05:07
#15
Senior Member

Santiago Lopez Castano
Join Date: Nov 2012
Posts: 295
Rep Power: 11
Quote:
 Originally Posted by FMurad Dear all, I've followed your advice and started considereing my inlet and outlet BCs as cyclic and started to use fvOptions to set the pressure gradient. At the momment that I've done this, openfoam started to crash (the following error was shown): Attachment 55012 I'm also sending an updated version of my case (NOTE: don't forget to run topoSetDict) Attachment 55013 Am I doing something wrong?

Sorry, but I don't use your version of OF, in fact I use foam-extend so your configuration is not compatible with mine. To see what the error is, please try one thing at a time: (1) using the bodyforce without the cyclic boundaries (set zeroGradient); (2) then test the cyclic BCs. Most probably the error is from the cyclic BCs. You have to be careful on how you set them up.

Cheers