BC > k e simpleFoam
Hello!
I tried to simulate a simple airflow with the kEpsilon model, solver simpleFoam. a totalPressureInlet with 0.44 pa is given. Velocity has to be calculated. The residuals and the continuity looks good but the velocity much to small about 1e06. the Solution should be about 0.35 m/s. BC: U: internalField uniform (0 0 0); outlet: type zeroGradient; inlet: type pressureInletVelocity; value uniform (0 0 0); wall: type fixedValue; value uniform (0 0 0);  p: internalField uniform (0 0 0); outlet: type zeroGradient; inlet: type totalPressure; p0 uniform 0.44; value uniform 0.44; gamma 1; wall: type zeroGradient  epsilon: internalField 0.02247; outlet: type zeroGradient; inlet: type turbulentIntensityKineticEnergyInlet; intensity 0.001; value uniform 0.02247; wall: type epsilonWallFunction; value uniform 0.02247;  k internalField uniform (0 0 0); outlet: type zeroGradient; inlet: type turbulentMixingLengthDissipationRateInlet; mixingLength 0.01; value uniform 1.356e03; wall: type kqRWallFunction; value uniform 1.356e03; Has anyone a hint for me ? 
I'm guessing it is an issue with your p and U boundary conditions. Neither of them actually drive a flow. You'd need something like a fixed value U or a fixed pressure gradient to get some momentum into the domain.

Hi!
Thanks for your quick reply! With fixedGradent instead of fixedValue in my pressure inlet BC i got a flow in my flow simulation :rolleyes:. 
Ok but now i got the problem that the pressure decreases at the inlet. i thought fixed Gradient is NOT variable.
Do you have an idea what goes wrong there? 
Perhaps nothing is wrong. You fixed the gradient, not the value.

hmmm... Thanks!
But I have the Problem that I just know the fix pressure value at the inlet and if I only fix the Value there, there is nothing which drives my Flow. so should I fix the value and the gradient at the inlet and how does it works ? 
what is the dimension of the p variable you have prediscribed ?
check if it is not p/rho. And you have maybe correct solution for the wrong task. 
yes it is p/rho!
My pressure is about 0.5 pa, rho is 1.225 so my PressureValue is about 0.44 an the solution is about 2000 times smaller! I also tried to set initial conditions with potentialFoam but either my velocities are much to small or much to high! :o 
I think I can't really imagine how the BC at inlet and outlet of U and P should be set correctly.
When I take a look at the examples I can only find BC where the velocity is known. Not so in my case! 
1 Attachment(s)
try attached case with simpleFoam. It seems fine with your values on D=1cm pipe.
(it is based on case_pipe_viscous_heating for mySimpleFoam solver found on that forum) edit: it is only laminar case. 
Ok I'll try it thank you very much. Hope that even works in k e model

yes, it do. Tried with 10Pa on inlet to have Re in turbulent zone.

Thank you very much for this nice example. I took same BC for keModel and it didn't worked!

Hi at all!
now the Laminar model works! But if I take the same BC as in the laminar model for the kEModell it doesn't work! My BC are: k & epsilon interiorField: 1 pressure_inlet: 1 pressure_outlet: 1 wall: WllFunktion 1 p interiorField: 0 pressure_inlet: 0.44 pressure_outlet: 0 wall: zeroGradient U interiorField: (0 0 0) pressure_inlet: zeroGradient pressure_outlet: zeroGradient wall: (0 0 0) Can anyone help me? 
what is not working? descrbie more.
Is your Re in turbulent zone ? Try initialize the case with higher eps values and add approximate/correct values for k and eps at your BCs. the test case with values of one "does not work" too. Correct values will make it. 
Thinks for your help!
In my case i have to compare fluent with openFoam! So i got a simulation from my college with given BC. And to compare it correctly I have do set the same initial condition as he did. Which is k & epsilon is 1 the pressure is 0.5 (in my case 0.44 because of dimensions) and velocity is not known. so its not possible to change the values. If I set the BC like shown before the simulation crashes with errors! I think because of the bounding variables (up to inf) > velocities higher than 1e+20. I also tried to set BC of k eps at the walls to zeroGradient it also didn't work. Its also diverging 
1 Attachment(s)
I tryed to set correct values for pressure to have turbulent flow and set calculated values for k and eps and there is the case again.
I still do not know, how big is your pipe. I just bet, that correct values for k and epsilon are thousand times smaller than one. 
Hi kilo, I'm having the exact same problem as you. I'm also trying to do a comparison between fluent and openfoam using a turbulent flow. I've also tried using simplefoam and the ke model. I haven't been able to get the simulation to work using a set pressure drop and having velocity calculated, but used my results from the fluent to set the boundary conditions and I'm also getting velocities of 1e20. I haven't been able to get soonic's suggestions to work for me. Have you had any luck?

hi!
@soonic: hmm ... my Model is a cube with a 0.006 m thick pipe (0.06 m long ) at the inlet and same at the outlet. I also have calculated the k and epsilon for the model but it must work somehow with the same input parameter a fluent gets. ive tried now : k & epsilon interiorField: 0 pressure_inlet: 1 pressure_outlet: 1 wall: zeroGradient p interiorField: 0 pressure_inlet: 0.44 pressure_outlet: 0 wall: zeroGradient U interiorField: (0 0 0) pressure_inlet: zeroGradient pressure_outlet: zeroGradient wall: (0 0 0) > IT WAS MUCH BETTER! but now the velocity is to small!! 0.002 instead of 0.35 :rolleyes: @lobstar: no i had no luck!!! but i found out that k & epsilon & nut File should have same type of wall BC! and don't let OpenFoam generate your nut file or others automatically! if you found out anything please tell me  i'll do the same! you should also set the internal Field of k an epsilon 0, because i fond out that fluent also does so! and if you don't know what fluent does you can tell fluent to write out bc and then you get an acci file (terrible to read but lots information in it!) 
You might want to take a second swing at your k & E boundary/internal conditions. I'm not too familiar with setting up these kinds of models but those values look like they might be pretty off after looking at this setup: [tutorials/incompressible/simpleFoam/pitzDaily]. Perhaps try reading up on the models' best practices or looking at some of the other tutorials with k&E turbulence modeling already set up.

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