Extracting a probe value after a simulation run
This should be really easy to answer, but I couldn't find any information myself. :o
I want to print out probes values for multiple locations on a finished simulation.
What I normally do is to create a probe file, include it in the controldict and then rerun the simulation for at least an iteration to print out the results. Is there a static function that can do this so that I don't have to got through this or is the way I'm doing the only way possible?
I think you can use the sample utility. (see page U-169 of the user guide)
To use it, you have to setup a sampleDict file which will be put inside your system folder.
You can use the general template located at:
I hope this can help you.
Thanks a lot Cyp,
I completely overlooked sample.
Merry X-Mas and a Happy New Year.
I have been using the probes function to extract the data at particular location, but I find that the probes function uses some sort of interpolation scheme and the results are not same as the results I observe in paraview at the same location. Is there a way to get more accurate results especially at the boundaries and other locations.
Thanks for the help.
check for the type of data your going to probe and ... check whether you use the point or the cell data values in paraview. try to convert from cell to point and compare again. asfaik there is not interpolation, the probing is searching for the closest CellCenter and takes the value.
You might want to check probes.H (not 100% sure about the name).
Any experts around?
I am using the point data in paraview and comparing it with probes function still there is slight deviation... For example, a case like plotting the parabolic profile of velocity across a cylindrical channel, I see symmetric profile while plotting the OF data in paraview while using the data from probes function does not give a parabolic profile but is more discrete and slightly asymmetric, though the number of points is same for plotting using both the methods.
May I know how to rectify this problem...
did u use mag(U) while probing or did you reconstruct the velocity-vector from itīs probed components (U=(u^2+v^2+w^2)^(1/2))?
This is how my controlDict file looks like..
// Type of functionObject
// Where to load it from (if not already in solver)
// Locations to be probed. runTime modifiable!
(1010 485 0)
(1010 485.6900991 0)
(1010 486.4354473 0)
(1010 487.2404679 0)
(1010 488.1099383 0)
(1010 489.0490182 0)
(1010 490.0632807 0)
(1010 491.1587447 0)
(1010 492.3419113 0)
(1010 493.6198018 0)
(1010 495 0)
(1010 496 0)
(1010 497 0)
(1010 498 0)
(1010 499 0)
(1010 500 0)
(1010 501 0)
(1010 502 0)
(1010 503 0)
(1010 504 0)
(1010 505 0)
(1010 506.3801982 0)
(1010 507.6580887 0)
(1010 508.8412553 0)
(1010 509.9367193 0)
(1010 510.9509818 0)
(1010 511.8900617 0)
(1010 512.7595321 0)
(1010 513.5645527 0)
(1010 514.3099009 0)
(1010 515 0)
Hope this is fine..
if you probe like this, i am wondering how you plot in paraview.
probing the fields U and p gives you 4 values. so if you plot in U paraview you actually plot mag(U) which hasnīt been probed.
Thatīs why i was asking about the reconstr. from u,v,w to U.
reconstruct the mag(U) from your probed values and then compare that to plot_over_line with pointData and mag(U) in paraview. I am pretty shure this is a paraView issue.
Could you attach some pictures?
I couldn't exactly get your point.
In the paraview, I do plot the U_x component that would be dumped at different time steps and comparing them with the U_x component obtained from the probed function across the channel height (from 485 to 515).
I am attaching the two plots where U_x is plotted in paraview (in m/s) and in other obtaining the value from probes function and plotting the same using MATLAB (NOTE: units for U is mm/s in this case).
Hope this helps.
it seems to me like your point data for the probing is not resolving the mesh density. there are similar entries for u_x for different coord.values. try to increase the sampling.
isnīt it possible to sample smth. like a line with the sample-tool?
Is it possible for you to elaborate on how to smooth the data.. I exactly wanted to know this,,,
The code you mentioned where should we include them, further should I have to run the case again.
try ploting the data with gnuplot...
you can set it as export format in the sampleDict and you can set the stepsize when you plot the data.
Thanks for the link. I will go through that.
I was wondering this sampleDict would be useful when we want to plot the steady state results. I have a case where I am running an AC signal and would like to plot the velocity averaged over one time period. For that we need to know the velocity values at each time. I usually use the probes function to do that. Is there an alternative to do that using sampleDict, since we can't dump all the time step folders as they take huge memory.
I looked at the SampleDict from the examples and found out how to implement them but as I had mentioned it would be useful for getting the final steady state values, is it possible to extract data for a periodic case.
Kindly let me know.
Is it possible to integrate a variable across the cross section using the probes function at every time. Kindly let me know.
|All times are GMT -4. The time now is 23:21.|