Hi, I want to save line dat
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?
Hi, I tried to debug my cod
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!
Hello, I might be wrong but
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
Hi, thanks for your input P
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?
|All times are GMT -4. The time now is 03:58.|