CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Probe funtion slows down the computation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2024, 15:53
Default Probe funtion slows down the computation
  #1
New Member
 
Join Date: Jun 2022
Location: Belgium
Posts: 5
Rep Power: 4
Vylnius Mante is on a distinguished road
Hello to everyone reading this thread,

I try to perform a DNS simulation of an incompressible flow by using the pimple algorithm in OpenFOAM. As the resolution of the computational mesh is too high to save all the data at all the points, we decided to save only the data in a restricted area of the domain by using the probe function (writen in the controlDict file). Everything seems to work perfectly except that the use of the probe function seems to slow down the computation and limit the scalability of the computation, even with one probe. It seems that the probe function is called and search the probe locations in the domain at every time step even if the data are saved in the right post-processing files every two time steps.

Does anyone know how to avoid the call of the probe function at every time step but only for the times when it is necessary to save the data ?

Thank you in advance.
Vylnius Mante is offline   Reply With Quote

Old   March 4, 2024, 04:15
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,200
Rep Power: 28
Yann will become famous soon enough
Hello,

I don't know if this is the actual problem you are facing, but do you know there are 2 parameters to control function objects? writeControl and executeControl. If you didn't define executeControl the default behavior would be to execute the function every time step even if writeControl is set to write data every 2 time steps.

https://doc.openfoam.com/2306/tools/...bject-controls

I hope this helps,
Yann
Yann is offline   Reply With Quote

Old   March 4, 2024, 16:26
Default
  #3
New Member
 
Join Date: Jun 2022
Location: Belgium
Posts: 5
Rep Power: 4
Vylnius Mante is on a distinguished road
Hello Yann,

First, thank you for your quick answer.

It seems that the computation is faster by adding the lines executeControl and executeInterval.
But I have always the same warning:

--> FOAM Warning :

From function virtual void Foam:robes::findElements(const Foam::fvMesh&)

in file probes/probes.C at line 117

Did not find location (0.233625 0.003625 0.11775) in any cell. Skipping location.


I know why I have this warning: it is because I have a movable object in the fluid domain whose position changes with time while the probe locations remain unchanged during the computation. Therefore, some probes lie in the movable object and no data can be considered in these positions. So, I am ok with the nature of the warning and I can deal with the "data" stored in the void (I treat them in a Python post-processing code as "not a number") but the fact that it is diplayed every time step seems to me that the probe function works yet at every time step.

Am I wrong ?

Thank you in advance.
Vylnius Mante is offline   Reply With Quote

Old   March 5, 2024, 04:51
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,200
Rep Power: 28
Yann will become famous soon enough
Hello,

If you get the warning at every time step it indeed looks like the function is still executed.

Could you please share your function definition?
Have you specified an executeInterval?

Yann
Yann is offline   Reply With Quote

Old   March 5, 2024, 09:03
Default
  #5
New Member
 
Join Date: Jun 2022
Location: Belgium
Posts: 5
Rep Power: 4
Vylnius Mante is on a distinguished road
Helo,

Below, the function written in the controlDict file:

probes_part_0
{
type probes;
functionObjectLibs ("libsampling.so");
fields
(
U
p
//scalar_injection

//gas_sky
);
executeControl adjustableRunTime;
executeInterval 0.025;
writeControl adjustableRunTime;
writeInterval 0.025;
probeLocations
(
(-0.007125 -0.121625 0.11625)
(-0.006375 -0.121625 0.11625)
(-0.005625 -0.121625 0.11625)
(-0.004875 -0.121625 0.11625)
...
);
}

Vylnius
Vylnius Mante is offline   Reply With Quote

Old   March 5, 2024, 09:21
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,200
Rep Power: 28
Yann will become famous soon enough
Hello Vylnius,

What OpenFOAM version are you using ?
Yann is offline   Reply With Quote

Old   March 5, 2024, 09:54
Default
  #7
New Member
 
Join Date: Jun 2022
Location: Belgium
Posts: 5
Rep Power: 4
Vylnius Mante is on a distinguished road
OpenFOAM version 9
Vylnius Mante is offline   Reply With Quote

Old   March 6, 2024, 04:54
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,200
Rep Power: 28
Yann will become famous soon enough
OK, I was asking because functionObjectLibs ("libsampling.so"); is an old syntax and old OpenFOAM versions used evaluateControl and outputControl rather than executeControl and writeControl, respectively.

But On OpenFOAM-9 it should definitively be executeControl and writeControl.

I don't know if this is a specific issue for the probes function object.
Yann is offline   Reply With Quote

Reply

Tags
openfoam, probes, slow-down_computation


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
Plotting Velocity Components from Probe Data Using Gnuplot joshc OpenFOAM Post-Processing 1 February 15, 2023 11:35
how to probe cell volume and probe an entire surface Andrea23 OpenFOAM Running, Solving & CFD 4 December 11, 2020 12:29
symmetryPlane slows down computation joshmccraney OpenFOAM Pre-Processing 3 February 20, 2020 14:37
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
Empty Probe File - Probes not working rvmedina20 OpenFOAM Post-Processing 3 May 11, 2016 20:36


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