CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

StreamFunction

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 2, 2013, 10:00
Default StreamFunction
  #1
New Member
 
Luis Batista
Join Date: Mar 2013
Location: Lisboa / Setúbal
Posts: 17
Rep Power: 4
Luis Batista is on a distinguished road
Hello Forum,

I am doing an analysis to a cavity flow using SimpleFoam....

Is there any known issue/error with the OF(2.1.2) function StreamFunction ?

Apparently, I am having proper results within my vorticity vector field but when I plot the point field resulting from the streamFunction in Paraview, it seems that the results are 10 times smaller....I also see that the units of the streamfunction scalar field are L3 T-1.

How are these units being derived?

Regards,
Luis
Luis Batista is offline   Reply With Quote

Old   July 7, 2013, 05:57
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Luis,

Can you provide a simple test case?

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 19, 2013, 13:37
Default
  #3
chl
New Member
 
Christiane Lechner
Join Date: Jul 2011
Location: Vienna
Posts: 4
Rep Power: 6
chl is on a distinguished road
Dear Bruno and Luis,

I find the same with version 1.6-ext: the stream function seems to be too small by a factor of 10 and has dimensions length^3/time.

I attach a case of a linear shear flow, U = (y/H)*V, with H the height of the domain, and V the velocity at the upper boundary.

The stream function should be: \Psi = 0.5*((y/H)^2 -1)*V*H

best regards,
Christiane
Attached Files
File Type: gz testStreamFunction.tar.gz (25.7 KB, 7 views)
chl is offline   Reply With Quote

Old   August 20, 2013, 05:34
Default
  #4
chl
New Member
 
Christiane Lechner
Join Date: Jul 2011
Location: Vienna
Posts: 4
Rep Power: 6
chl is on a distinguished road
Hi,

the factor 0.1 seems to stem from the cell width in the empty direction, which is \Delta z = 0.1 in the above example. Reducing \Delta z to 0.01 also reduces the streamFunction by another factor of 10.

So it seems, that the streamFunction utility computes
\Psi*\Delta z, not \Psi. This would also explain the dimensions length^3/time.

Do you agree?

best regards,
Christiane
chl is offline   Reply With Quote

Old   August 21, 2013, 09:32
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Christiane,

Many thanks for the test case, but I haven't yet managed to look into it.
But I've taken a quick look into the source code of "streamFunction" on both 2.2.x and 1.6-ext:
And both calculations seem to be done in the same. I can't find any indication of an explicit scaling factor, which leads me to believe that the phi field that OpenFOAM is using already includes the scale of each cell or face. Because the sign function only gives us "+1" or "-1".

Another indication is that it doesn't seem to work for 3D simulations, because it assumes that Z is the empty orientation.

I'll try to look at the test case later today.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 22, 2013, 12:28
Default
  #6
chl
New Member
 
Christiane Lechner
Join Date: Jul 2011
Location: Vienna
Posts: 4
Rep Power: 6
chl is on a distinguished road
Hi Bruno,

yes, the face flux field phi is
phi = U_f & S_f, with S_f the area of the face.

For the computation of the stream function U_f & S_f/\Delta z would be
needed instead.

best regards,
Christiane
chl is offline   Reply With Quote

Old   August 22, 2013, 12:59
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Christiane,

Of course! Why didn't I visualize that... the face area still depends on Z, even though the flow is only over X-Y.

OK, then there are 2 immediate solutions:
  1. Use 1.0 for the width of the empty direction, in order to avoid the distortion of the "phi" and "psi" calculation.
    • This reminds me of a 2D tutorial in OpenFOAM that uses the thickness of 1.0m and I didn't understand why... until now. The tutorial is the "combustion/XiFoam/ras/moriyoshiHomogeneous".
  2. Request a bug fix for this at the respective bug trackers:
    1. Official OpenFOAM: http://www.openfoam.org/bugs/
    2. Extend Project's bug tracker: http://sourceforge.net/apps/mantisbt/openfoam-extend/
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 26, 2013, 04:29
Default
  #8
chl
New Member
 
Christiane Lechner
Join Date: Jul 2011
Location: Vienna
Posts: 4
Rep Power: 6
chl is on a distinguished road
Hi Bruno,

thanks!

I requested bug fixes at both sites:
http://www.openfoam.org/mantisbt/view.php?id=976
http://sourceforge.net/apps/mantisbt...iew.php?id=185

best regards,
Christiane
chl is offline   Reply With Quote

Reply

Tags
streamfunction

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem of streamFunction in buoyantBoussinesqSimpleFoam jignesh_thaker2007 OpenFOAM 4 September 29, 2011 12:25
StreamFunction utility titio OpenFOAM Post-Processing 0 May 19, 2010 16:04
UDF for streamfunction nisha Fluent UDF and Scheme Programming 0 September 15, 2009 06:55
streamfunction from u and v on a coarse mesh ryoga Main CFD Forum 0 February 1, 2002 19:20
cylinder streamfunction Steven Main CFD Forum 1 December 30, 2000 13:04


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