|
[Sponsors] |
Extracting a probe value after a simulation run |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 22, 2010, 05:36 |
Extracting a probe value after a simulation run
|
#1 |
New Member
Frank Whittle
Join Date: Aug 2010
Posts: 12
Rep Power: 16 |
This should be really easy to answer, but I couldn't find any information myself.
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? Cheers! |
|
December 22, 2010, 05:58 |
|
#2 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
Hi Frank!
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: Code:
$FOAM_UTILITIES/postProcessing/sampling/sample Code:
sample I hope this can help you. Best regards, Cyp |
|
December 22, 2010, 06:22 |
|
#3 |
New Member
Frank Whittle
Join Date: Aug 2010
Posts: 12
Rep Power: 16 |
Thanks a lot Cyp,
I completely overlooked sample. Merry X-Mas and a Happy New Year. |
|
January 27, 2011, 19:09 |
|
#4 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Dear Foamers,
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. |
|
January 28, 2011, 04:38 |
|
#5 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
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? neewbie |
|
January 28, 2011, 11:55 |
|
#6 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Hi newbee,
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... |
|
January 28, 2011, 11:59 |
|
#7 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
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))?
|
|
January 31, 2011, 18:15 |
|
#8 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Dear newbee,
This is how my controlDict file looks like.. application eofFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 8e6; deltaT 100; writeControl runTime; writeInterval 2e6; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; functions ( probes1 { // Type of functionObject type probes; // Where to load it from (if not already in solver) functionObjectLibs ("libsampling.so"); // Locations to be probed. runTime modifiable! probeLocations ( (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) ); fields ( U p ); } ); Hope this is fine.. |
|
February 1, 2011, 03:59 |
|
#9 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
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? Last edited by mvoss; February 1, 2011 at 12:10. |
|
February 1, 2011, 11:50 |
|
#10 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Dear newbee,
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. |
|
February 1, 2011, 12:15 |
|
#11 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
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? how about Code:
type uniform; axis y; start ( 0 0.5 0.25 ); end ( 0 2 0.25 ); nPoints 100; |
|
February 1, 2011, 12:18 |
|
#12 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Is it possible for you to elaborate on how to smooth the data.. I exactly wanted to know this,,,
|
|
February 1, 2011, 12:20 |
|
#13 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
The code you mentioned where should we include them, further should I have to run the case again.
|
|
February 1, 2011, 12:20 |
|
#14 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
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. |
|
February 1, 2011, 12:21 |
|
#15 |
Senior Member
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20 |
||
February 1, 2011, 12:28 |
|
#16 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
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. |
|
February 1, 2011, 13:23 |
|
#17 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Dear newbee,
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. Thanks |
|
February 1, 2011, 17:44 |
|
#18 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Dear Foamers,
Is it possible to integrate a variable across the cross section using the probes function at every time. Kindly let me know. thanks |
|
June 11, 2020, 20:56 |
|
#19 | |
Senior Member
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7 |
Quote:
|
||
February 27, 2024, 18:32 |
|
#20 | |
New Member
Masoud Rvn
Join Date: Sep 2023
Posts: 9
Rep Power: 3 |
Quote:
You do not need to rerun the case, you just need to include your probe file in ControlDict and execute this command: foamPostProcess -solver <your solver> |
||
Tags |
probe location, probe position |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
do anyone use solidwork 2009 to run simulation | kacee | FloEFD, FloWorks & FloTHERM | 8 | June 2, 2010 06:11 |
Replacing mesh while running a simulation | akultane | CFX | 1 | November 15, 2009 14:46 |
Synthetic (pulsatile) jet transient simulation | aero | CFX | 0 | November 6, 2009 02:10 |
3D data extracting from Fluent simulation | unknown | FLUENT | 0 | October 11, 2009 14:15 |
Procedure to run unsteady simulation? | STN | Main CFD Forum | 2 | February 16, 2002 05:37 |