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

Turbulent Paralell plates Simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By agustinvo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2017, 08:29
Default Turbulent Paralell plates Simulation
  #1
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
Dear all,

I recently start using openfoam. I am simulating an incompressiblefully developed turbulent flow in a simple 2D parallel plates geometry using simpleFoam as the solver. The thing is that the uy velocity, which should be 0 in all elements, is not 0.

my boundary conditions are the following:

inlet:
U: fixed gradient ; gradient uniform (0 0 0)
p: fixed value; value 0.2
k: zerogradient
epsilon: zero gradient

outlet:
inlet:
U: fixed gradient ; gradient uniform (0 0 0)
p: fixed value; value 0
k: zerogradient
epsilon: zero gradient

walls:
U: fixed value; value uniform (0 0 0)
p: zerogradient
k: kqRWallFunction
epsilon: epsilonWallFunction

I'm sending three pictures of my results for the Ux (along a fixed x coordinate), Uy (on the inlet) velocity and k just to be clear on what's going on:

Ux (as you can see, Ux is not constant as it should be for a fully developed flow):
ux.png

Uy (as you can see, uy is not =0 in all cells as it shoud be):
uy.png

k:
k.png


What I've tried to do:
One of the things that I've tried is seting k and epsilon gradient equal 0 in all directions (not only in the normal direction as the zerogradient BC does). But when I do :

type fixedGradient;
gradient uniform (0 0 0);

for the k and epsilon fields, the following error appears:

error.png

I've also tried to set my BCs as cyclic but unfortunatelly my pressure BC is not periodic so I can't do that.

Does anyone knows a way to improve these results?

Best Regards
Felipe
FMurad is offline   Reply With Quote

Old   March 24, 2017, 13:09
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
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)
piu58 is offline   Reply With Quote

Old   March 25, 2017, 10:30
Default
  #3
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
Quote:
Originally Posted by piu58 View Post
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.
FMurad is offline   Reply With Quote

Old   March 26, 2017, 06:47
Default
  #4
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
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
Santiago is offline   Reply With Quote

Old   March 27, 2017, 17:12
Default
  #5
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
Quote:
Originally Posted by Santiago View Post
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?
FMurad is offline   Reply With Quote

Old   March 27, 2017, 17:32
Default
  #6
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
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
Santiago is offline   Reply With Quote

Old   March 27, 2017, 18:28
Default
  #7
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18
vatavuk is on a distinguished road
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
vatavuk is offline   Reply With Quote

Old   March 27, 2017, 18:53
Default
  #8
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
Quote:
Originally Posted by Santiago View Post
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):
U: fixed gradient ; gradient uniform (0 0 0)
p: fixed value; value 0.2
k: zerogradient
epsilon: zero gradient

outlet (right face):
U: fixed gradient ; gradient uniform (0 0 0)
p: fixed value; value 0
k: zerogradient
epsilon: zero gradient

(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)
FMurad is offline   Reply With Quote

Old   March 28, 2017, 04:26
Default
  #9
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
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.
agustinvo is offline   Reply With Quote

Old   March 28, 2017, 04:58
Default
  #10
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by FMurad View Post
(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:

Attachment 54957

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):
U: fixed gradient ; gradient uniform (0 0 0)
p: fixed value; value 0.2
k: zerogradient
epsilon: zero gradient

outlet (right face):
U: fixed gradient ; gradient uniform (0 0 0)
p: fixed value; value 0
k: zerogradient
epsilon: zero gradient

(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)
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.
Santiago is offline   Reply With Quote

Old   March 28, 2017, 22:16
Default
  #11
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
Quote:
Originally Posted by vatavuk View Post
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
FMurad is offline   Reply With Quote

Old   March 28, 2017, 22:29
Default
  #12
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
Quote:
Originally Posted by agustinvo View Post
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?
FMurad is offline   Reply With Quote

Old   March 28, 2017, 23:12
Default
  #13
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
Quote:
Originally Posted by Santiago View Post
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)
FMurad is offline   Reply With Quote

Old   March 30, 2017, 00:58
Default
  #14
New Member
 
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9
FMurad is on a distinguished road
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?
FMurad is offline   Reply With Quote

Old   March 30, 2017, 06:07
Default
  #15
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by FMurad View Post
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
Santiago is offline   Reply With Quote

Reply

Tags
fixedgradient, simplefoam, turbulent boundary, zerogradient


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
Simulation FPEs - turbulence for transient and steady-state? DaveR OpenFOAM Running, Solving & CFD 5 March 5, 2017 16:06
How to set unsteady turbulent inlet velocity using the result of another simulation? John-Lee FLUENT 2 December 27, 2016 18:36
Natural Convection 2D axisymmetric turbulent simulation enayath FLUENT 4 June 4, 2014 11:20
Natural convection - Inlet boundary condition max91 CFX 1 July 29, 2008 21:28
Laminar Zone in Turbulent Simulation Demetrios FLUENT 6 June 6, 2007 11:36


All times are GMT -4. The time now is 04:51.