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

Probes writing frequency

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2006, 07:02
Default I noticed in OpenFOAM 1.2 that
  #1
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
I noticed in OpenFOAM 1.2 that if the solver has been stopped suddenly (electric shut down), probes folder is empty. My question is:

How frequent probe values are written? Can we control that? Thanks in advance

regards,
Maka.
maka is offline   Reply With Quote

Old   April 12, 2006, 05:49
Default probes file writing seems to b
  #2
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
probes file writing seems to be limited to certain file size and then the code write in a new file. Does this only happen when the code finishes. If we look for a solver like channelOodles, writeProbes.H is inside the time loop, in spite of that, it does not update file writing every time step. Can any body help explaining, how does write probe works? and how frequent the file is updated? Thanks in advance.

best regards,
Maka.
maka is offline   Reply With Quote

Old   April 12, 2006, 05:58
Default Look into: OpenFOAM-1.3/src
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Look into:

OpenFOAM-1.3/src/sampling/Probe/Probe.C

The Probel class holds the OFstream and in the write() function it puts stuff into it. The rest happens at the C++ level.

C++ ofstream buffers the output for efficiency and the buffer size depends on the implementation. Once the buffer is full, it gets flushed into the file, which is what you are seeing.

If you wish, you can add the flush stream modifier, which will force thw write but will mess up your I/O performance.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   April 13, 2006, 05:45
Default Thanks Hrv for the info. be
  #4
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
Thanks Hrv for the info.

best regards,
Maka
maka is offline   Reply With Quote

Old   July 6, 2006, 07:51
Default Hello, I have a few questio
  #5
Member
 
Mélanie Piellard
Join Date: Mar 2009
Posts: 86
Rep Power: 17
melanie is on a distinguished road
Hello,

I have a few questions on the probes.
1. Is it possible to control the writing frequency of the probes, i.e. if we want the probes to be written every 20 time steps, is it possible ? For instance, could we do a check in the time loop of the solver (if the time is a multiple of 20*delta t, then the probe is written) or anything else ?
2. I guess the number of probe locations is not limited, am I right ?
3. I am not sure if I have well understood Probes.C: there is no interpolation for the probes, it looks in which cell each probe is located and affects the value of this cell to the probe, is it right ? What happens then if the probe is located on the border of 2 cells ? and if the probe is located outside of the OF domain, is there an error message or fatal error ?

Thanks !
melanie is offline   Reply With Quote

Old   July 10, 2006, 09:31
Default Hello, could anyone answer my
  #6
Member
 
Mélanie Piellard
Join Date: Mar 2009
Posts: 86
Rep Power: 17
melanie is on a distinguished road
Hello,
could anyone answer my few questions concerning the probes utility please ?
Thanks !
melanie
melanie is offline   Reply With Quote

Old   July 10, 2006, 09:42
Default Hi Melanie, I have not used t
  #7
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17
hemph is on a distinguished road
Hi Melanie,
I have not used the probe-utility, but it looks like you could cause writing at any frequency you desire by calling write().

label i=0;
label freq=10;
..
your code
..
i++;
if (i%freq == 0)
myProbe.write()
hemph is offline   Reply With Quote

Old   July 10, 2006, 09:54
Default Regarding the other questions
  #8
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17
hemph is on a distinguished road
Regarding the other questions
2) No limit.
3) It seems like there is no interpolation for the probes. Probe uses mesh.findCells() to search for the cell containing the point. If it is exactly on the border, I guess it will use either cell. If it is outside findCell will return -1. In probe.C, you will find that only if a cell value is larger than zero will a probe be created.

if (probeCelli >= 0)
{
cellList_[probesFoundi] = probeCelli;
probeLocations_[probesFoundi] = probeLocations_[probei];
probesFoundi++;
}

No error message from what I can see, but you can always try!

best
Rasmus
hemph 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
Problem with Probes function martinr OpenFOAM Running, Solving & CFD 0 December 29, 2008 11:01
Probes and multiprocessor runs grtabor OpenFOAM Running, Solving & CFD 1 June 12, 2007 13:59
Probes in OpenFOAM14 otsuki OpenFOAM Running, Solving & CFD 2 May 16, 2007 06:18
Probes msrinath80 OpenFOAM Pre-Processing 4 April 28, 2006 06:55
Dynamic probes Greg Z. FLUENT 1 December 2, 2005 12:05


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