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

Line data in runtime

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 9, 2007, 12:44
Default Hi, I want to save line dat
  #1
New Member
 
Magnus Åberg
Join Date: Mar 2009
Posts: 11
Rep Power: 17
magnus is on a distinguished road
Hi,

I want to save line data from my LES case in runtime. Do anyone know if there is a tool already implemented for this ? If there is I did not find it..

What I did so far was to use the tool sampleLine in my own routine i.e. I define my lines and then use OpenFOAM's sampleLine to interpolate the values. Then I write the data manually from my own routine. The structure of the solver looks schematically something like this:

create all fields,points,lines:
...
...
define lineVar // (contains start,end,nrPoints)
line=new sampleLine(lineVar) // (calls the tool sampleline which finds the cells in the mesh which defines the line)

start time looping of LES:
...
...
phi_line=line->line.interpolate(phi) // (interpolate the variable phi to the line, using the line memberfunction interpolate)

write the line

end time loop


This works fine in serial, but when I try to use it in parallel, the interpolation function gets stuck and the solver hangs.

Maybe this is a stupid way to do it, but as I said I found no other tool for this. what would your solution to the problem be?

best regards
/M
magnus is offline   Reply With Quote

Old   February 13, 2007, 11:05
Default Hi, I tried to debug my cod
  #2
New Member
 
Magnus Åberg
Join Date: Mar 2009
Posts: 11
Rep Power: 17
magnus is on a distinguished road
Hi,

I tried to debug my code and it seems the bug is inside sampleLine. But I am not sure how or why. I would relly appreciate some help here.. All suggestions are welcome!

best regards!
/Magnus
magnus is offline   Reply With Quote

Old   February 13, 2007, 12:10
Default Hello, I might be wrong but
  #3
Member
 
Pierre Le Fur
Join Date: Mar 2009
Location: UK
Posts: 60
Rep Power: 17
pierre is on a distinguished road
Hello,

I might be wrong but I think that sampleSurface is fully parallelised but not sampleLine (although I have only used them as post-proc tools).

Although it's a bit annoying, you can just use sampleSurface and write it, and write a little routine then to pick out line data from the surface data.
Other solution make the line sampling utility fully parallelised.

Hope this helps

Pierre
pierre is offline   Reply With Quote

Old   February 14, 2007, 09:19
Default Hi, thanks for your input P
  #4
New Member
 
Magnus Åberg
Join Date: Mar 2009
Posts: 11
Rep Power: 17
magnus is on a distinguished road
Hi,

thanks for your input Pierre!

I guess I will have to study the lineSampling code more thoroughly. It feels like using the sampleSurface utility and then extracting lines will take about the same effort as fixing the current problem. It is only a matter of 2d vs 3d in this case right?

Best regards
/M
magnus 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
[OpenFOAM] Output data file on the line of the example zhoubinwx ParaView 0 February 13, 2008 05:59
CFX Runtime Priority Karsten CFX 0 April 26, 2006 05:33
saving data along a line Philip FLUENT 2 February 7, 2006 04:18
path line data Chetan Kadakia FLUENT 0 November 9, 2005 19:25
creating line for dispalying data ? siswara dana FLUENT 6 September 3, 2001 05:41


All times are GMT -4. The time now is 20:07.