CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   unable to get parabolic velocity profile with pimplefoam (https://www.cfd-online.com/Forums/openfoam/107839-unable-get-parabolic-velocity-profile-pimplefoam.html)

houkensjtu October 8, 2012 00:47

unable to get parabolic velocity profile with pimplefoam
 
2 Attachment(s)
Hi foamers!

In my last thread, I modified a pimplefoam tutorial case into a laminar, 2d channel flow.
The boundary conditions I applied could be summarized as:

inlet: fixedvalue velocity / zerogradient pressure
outlet: zerogradient velocity / fixed value pressure(=0 pa)
wall: fixedvalue velocity (0 0 0) / zerogradient pressure
frontandback: empty

From theory I knew for a fully developed channel flow, velocity profile on outlet should be parabolic with max velocity equals 1.5 times average velocity which should be the inlet velocity here, and this profile should have nothing to do with viscosity and density.

However, even I simulate very long time(3000 seconds), I can only get the following velocity profile:

Attachment 16070
Attachment 16071

Any ideas about this?
Also I want to know, how could I debug the pimplefoam using gdb, for example, view how the pressure field changing every time step. Is it necessary to modify the source code to add some print out code? (I have already compiled of with a debug flag)

thanks in advance

nimasam October 8, 2012 02:02

1- whats the value of your inlet velocity? is it a laminar at all?
2-what the ration of length to width? as you know when you apply a uniform inlet,
there is an entrance length, after that flow would be developed

houkensjtu October 8, 2012 02:32

1 Attachment(s)
Quote:

Originally Posted by nimasam (Post 385412)
1- whats the value of your inlet velocity? is it a laminar at all?
2-what the ration of length to width? as you know when you apply a uniform inlet,
there is an entrance length, after that flow would be developed

Thanks for reply!
I also noticed may be the problem is entrance length.
If I raise the dynamic viscosity 100 times, to 1e-3, I could now view the "normal" parabolic velocity profile.
Attachment 16073
It seems that the lower viscosity, the longer entrance length will be.
However I read my textbook which says entrance length is usually about 116*D for laminar flow, where D is the channel diameter...seems no relation with viscosity...

Bernhard October 8, 2012 03:10

Quote:

Originally Posted by houkensjtu (Post 385420)
However I read my textbook which says entrance length is usually about 116*D for laminar flow, where D is the channel diameter...seems no relation with viscosity...

I suppose this length should be Reynolds depedent. What is your Reynolds number? Increasing viscosity by a factor 100, decreases Reynolds number by a factor 100. (Hence the first question about the laminarity)

houkensjtu October 8, 2012 04:41

Quote:

Originally Posted by Bernhard (Post 385428)
I suppose this length should be Reynolds depedent. What is your Reynolds number? Increasing viscosity by a factor 100, decreases Reynolds number by a factor 100. (Hence the first question about the laminarity)

hmm...I will recheck the entrance length on text book.
Would you kindly comment on my second question, about how to debug and view data with gdb?


All times are GMT -4. The time now is 23:30.