CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   how to extract properties in a patch at a certain time domain? (https://www.cfd-online.com/Forums/openfoam-solving/111396-how-extract-properties-patch-certain-time-domain.html)

 immortality January 6, 2013 03:44

how to extract properties in a patch at a certain time domain?

hi all
I need to obtain an average of pressure,velocity and temperature at a patch at last for example 100 time steps.how can i do this?i should add a sampledict at first before starting to run(if yes what codes should add to controldict?) or can it be done after running?if latter what are the codes?

 mkraposhin January 7, 2013 00:19

you can use patchAverage utility with keys -latestTime (for latest time slice) or key -time .... (to set time range)

 immortality January 7, 2013 03:34

thanks.could you give an example?is it correct? patchAverage rightside -time .003 .004
Then where the property is assign?

 mkraposhin January 7, 2013 06:46

--- "patchAverage -time '0.01,0.02' alpha1 heated" to see patch average 'heated' of field 'alpha1' for times 0.01 and 0.02

--- "patchAverage -time '0.01:0.02' alpha1 heated" to see patch average 'heated' of field 'alpha1' for times in range from 0.01 to 0.02 (including boundaries)

 immortality January 7, 2013 07:25

thanks alot!
So if we want average of for example pressure on all the cells of a patch only in one time step it's true:patchAverage -time '.01' p rightpatch
Isn't it?
What you mean about all boundaries in the case of time range?

 mkraposhin January 7, 2013 11:42

i mean: from from time t1 to time t2, including time points t1 and t2

 immortality January 7, 2013 12:21

grasped!thanks.is that correct what I said about one time step?does it give average of field over all the cells on the specified patch?
thanks again.

 mkraposhin January 7, 2013 16:23

no, it will return average of external faces values (not the same as cell values). but this is true for zeroGradient patches (because values at cell centres and face centres, belonging to patch are same)

 immortality January 7, 2013 17:16

thank you very much dear matvej.

 All times are GMT -4. The time now is 22:36.