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

BC -> k e simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 3, 2012, 10:21
Default
  #21
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 14
lobstar is on a distinguished road
Thanks for the advice on on the k/e/nut bcs getting the fluent bc data, that's really helpful! I'll continue to look around and of course will let you know what i find. so far my searches have been unfruitful as some of the recommendations i've seen don't make a lot of sense (either because my understanding is flawed or because it genuinely doesn't make sense). A recommendation i saw suggested using a fixed pressure gradient instead of two fixed values as apparently openfoam doesn't recognise the pressure drop as causing a flow (initiating momentum to quote the advisor). I haven't managed to get this to work but i'll keep trying and let you know the results.
klio likes this.
lobstar is offline   Reply With Quote

Old   April 3, 2012, 10:23
Default
  #22
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
hmmm yes but if i set a gradient the pressure is not fixed as soonic adverted me to and then my pressure de- or increases and the velocity as well! and the tutorials are all not very helpful because they all have velocity driven flows. and in my case this is not possible!
klio is offline   Reply With Quote

Old   April 10, 2012, 02:31
Default
  #23
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
Quote:
Originally Posted by lobstar View Post
Thanks for the advice on on the k/e/nut bcs getting the fluent bc data, that's really helpful! I'll continue to look around and of course will let you know what i find. so far my searches have been unfruitful as some of the recommendations i've seen don't make a lot of sense (either because my understanding is flawed or because it genuinely doesn't make sense). A recommendation i saw suggested using a fixed pressure gradient instead of two fixed values as apparently openfoam doesn't recognise the pressure drop as causing a flow (initiating momentum to quote the advisor). I haven't managed to get this to work but i'll keep trying and let you know the results.
Hi did you find out anything?
klio is offline   Reply With Quote

Old   April 10, 2012, 03:34
Default
  #24
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 14
lobstar is on a distinguished road
Hey Kilo,

No such luck I'm afraid. Whenever I tried using the pressureInletVelocity or any variation of it with a fixedGradient pressure (at either inlet or outlet) it didn't converge or gave a result with infinite pressure. I'll keep trying variations as I continue to look for a solution but I'm not expecting much. I may also be flawed in my understanding of fixed gradient, I assumed it was the pressure gradient from inlet to outlet, so dp/dx (x being distance between inlet and outlet). How about you, any luck? When you say you the pressure won't be fixed if you use gradient, do you use it on bot inlet and outlet? Again this is probably because I've misunderstood what is defined by fixedGradient but I thought if you had fixed value at one and fixed gradient at the other then you should essentially have to fixed values just defined differently.
lobstar is offline   Reply With Quote

Old   April 10, 2012, 03:57
Default
  #25
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 17
kid is on a distinguished road
@kilo
What is the error message you get? Please paste the error messgae,as this would help.
kid is offline   Reply With Quote

Old   April 10, 2012, 04:06
Default
  #26
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
@lobstar:

so you mean if i have an inletpressure of 0.5 pa and at the outlet my pressure is 0 i just have to know the distance between them?

ok so if i know the inlet value do i set this to fixedValue and then a gradient at the outlet or should i set the outlet to zero and the gradient at the inlet?

what about 3D simulation what would be the right distance ?
Because my inlet is orthogonal to z direction and my outlet is orthogonal to x direction!

@kid: i don't get error messages i just get wrong solutions!
klio is offline   Reply With Quote

Old   April 10, 2012, 10:37
Default
  #27
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 14
lobstar is on a distinguished road
I believe so yes, but again my understanding could be flawed. Not quite sure what to do for your model, I have been modelling flow through a pipe because I thought it would be simple! I think if you just use total distance (as in the distance the flow will travel through) it should make physical sense as your looking for how pressure changes relative to distance. I modelled both, as in fixedvalue inlet fixedgradient outlet and vice versa, though the former makes most sense to me if you want to use the pressureinletvelocity bc but I couldn;t get either to work.
Just reading through the thread again, you said you got a laminar version to work. Does this mean it was a pressure driven flow through the same geometry using icofoam? If so maybe the issue is having a pressure driven flow with simplefoam.
lobstar is offline   Reply With Quote

Old   April 10, 2012, 11:04
Default
  #28
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
Yes I got a laminar solution and it was nearly correct! velocities about 0.48 instead of 0.9. and the flow was driven with the BC that you can find in the example pipe_pressure_turm of soonic. it worked because there was no e and k. I think the problem is that Open Foam is not able to correct given BC (that only can be wrong like a k and e value 1 in a 0.006 m thick pipe where air flows) so it crashes or it gets wrong solutions! Fluent is able to do that.

So i think there is no way to get same solutions with the same bc you have to calculate the epsilon and the k on your own and set right values (that you will also find in fluent if you get your steady solution).

klio is offline   Reply With Quote

Old   April 10, 2012, 11:23
Default
  #29
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 14
lobstar is on a distinguished road
Ok, I'll give the laminar version a go and see what I can manage. From there I'll try using the results I have from fluent as the values for the turbulent values and see how it goes. What your saying does make sense but what I've read from other people would suggest that it OpenFOAM should be able to correct it and that the values you put in are only initial values that are improved via iterations. Otherwise you'd only really need one iteration as if all your inputs were exactly correct then the first set of results should be correct too.
lobstar is offline   Reply With Quote

Old   April 12, 2012, 04:01
Default
  #30
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
hmmm... it could also be possible that the sovers OF uses are different to Fluent and thats the reason why simulations diverge. So because of that you have to set initial conditions nearer to the final solution so that the sim converges.

I did that and now i got nearly the same solution with kE - Model as with the laminar calculation. (But for me it would also be more satisfying if the right solution could be calculated with the same initial BC)
klio is offline   Reply With Quote

Old   April 12, 2012, 04:20
Default
  #31
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
But look at this file. It's about a OF and Fluent comparison and also initial k & epsilon for the OF sim are much smaller (1e-15 instead of 1e-5)
http://www.google.com/url?sa=t&rct=j...MwLbLOwI_cwvWQ
lobstar likes this.
klio is offline   Reply With Quote

Old   April 12, 2012, 06:09
Default
  #32
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 14
lobstar is on a distinguished road
Hi kilo, I haven't been able to get the laminar version to work either. But I think I've made a mistake. When I look at soonic's bcs he has put the inlet pressure as 0.44 but then calculates for a hundred bar. Do you know where the 0.44 has come from? I'm just downloading the file to have a look, will let you know my thoughts.
lobstar is offline   Reply With Quote

Old   April 12, 2012, 06:28
Default
  #33
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 16
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
Hi, I set the case like that:
- I knew diameter of pipe and wish to have Re in laminar/turbulent zone. (choose Re or compute limit velocity)
- I computed velocity for Re
- I computed dyn.pressure corresponding to velocity
- I set bc with value p/rho
lobstar likes this.
soonic is offline   Reply With Quote

Old   April 12, 2012, 06:33
Default
  #34
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 17
kid is on a distinguished road
@soonic

Can you have a look at this link plz
http://www.cfd-online.com/Forums/ope...tml#post354340

Regards
CFDkid
kid is offline   Reply With Quote

Old   April 12, 2012, 08:07
Default
  #35
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
@lobstar: if you look at the dimentions you will see [0 2 -2 0 0 0 0] thats m²/s² -> p [pa] / rho [kg/m³]

did you use simpleFoam for the laminar calculation like soonics example?
klio is offline   Reply With Quote

Old   April 12, 2012, 08:16
Default
  #36
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 14
lobstar is on a distinguished road
@kilo
Yeah i did! I also divided my pressures by the density of the fluid. However going from what soonic said I think i understand what's wrong, the pressures set don't produce a laminar flow. i'll try and change the pressures for a laminar flow and see how it goes. How did you change from laminar to turbulent? did you keep p and U bcs the same? What did you use for k/e/nut? Sorry for all the questions! Also I think you're right, Openfoam seems to need starting values very close to the correct values in order to converge. Requires a lot more work to run a simulation than in Fluent!

@ soonic
can i ask what equation you used to calculate dyn pressure? Thanks for the advice thouhg, has cleared a lot up!
lobstar is offline   Reply With Quote

Old   April 12, 2012, 08:27
Default
  #37
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 14
lobstar is on a distinguished road
also kilo that link was a great find, really helpful guidance tool!
lobstar is offline   Reply With Quote

Old   April 12, 2012, 09:30
Default
  #38
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
first I just added the requred files and changed laminar Flag from RASModell to kEpsilon.

Yes! I thougt i'd be a good idea not to change whats already working (but may i have to if i don't get correct solutions)

k epsilon and nut are now fixed at inlet ZeroGradient at outlet and on walls depending on whats converging either wallFunction or (zeroGradient and nut: calculated)
klio is offline   Reply With Quote

Old   April 12, 2012, 10:03
Default
  #39
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 16
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
i do not know if it is correct to use it like that, but i calculated dynamic pressure like: pd = rho/2 * U^2
soonic is offline   Reply With Quote

Old   April 13, 2012, 03:37
Default
  #40
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 14
klio is on a distinguished road
You calculated [kg]/[m]³ * [m]²/[s]² = [kg]/[m]*[s]² which is [pa]

But may it explains this

->because of dimensions pressure inlet is u²
-> u is not known but the pressure (in my case 0.5 pa) -> 2*p/rho = 0.816326531 = u² -> the pressure inlet value
-> u = ~0.9

Last edited by klio; April 13, 2012 at 04:09.
klio is offline   Reply With Quote

Reply


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
Laminar simpleFoam and inviscid simpleFoam herenger OpenFOAM Running, Solving & CFD 7 July 11, 2013 06:27
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 09:07
simpleFoam crash -> How to solve tH3f0rC3 OpenFOAM 4 May 12, 2011 07:07
1.7.x -> buoyantPimpleFoam -> hRhoThermo -> incompressible and icoPoly3ThermoPhysics? will.logie OpenFOAM 0 December 16, 2010 07:08
Naca0012 k-e mpirun gives fpe whereas simpleFoam not Pierpaolo OpenFOAM 1 May 8, 2010 03:08


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