
[Sponsors] 
February 25, 2007, 21:07 
Hello!
I know that it is po

#1 
Senior Member

Hello!
I know that it is possible to calculate a given field on a boundary, such as: label inletPatchi = mesh.boundaryMesh().findPatchID(nameOfInlet); scalar massFlux = sum(phi.boundaryField()[inletPatchi]); It is also possible to get the field value of an arbitrary point as: vector probePoint(x,y,z); label probeCell = mesh.findCell(probePoint); But is it possible to get the values of a field for a given plane? I need to get field values only for y=0.002. Any hint on how to do this in OpenFOAM? Thank you! Best regards, José Santos 

February 26, 2007, 03:35 
Hi Jose,
Maybe sampleSurface

#2 
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 12 
Hi Jose,
Maybe sampleSurface is what you want! Dragos 

February 26, 2007, 05:12 
Hi Dragos
Thanks for your r

#3 
Senior Member

Hi Dragos
Thanks for your reply. Yes sampleSurface works, in fact I am using it now to export the values to Octave to do the calculations I need. But I think it would be better if I could do it all in OpenFOAM! José Santos 

October 3, 2007, 05:49 
Hi,
I would be interested in

#4 
Member
ville vuorinen
Join Date: Mar 2009
Posts: 67
Rep Power: 9 
Hi,
I would be interested in using the sampleSurface utility for sampling cutplanes to a directory during a simulation so that I would not have to save all the 3D data and sample the cutplanes as a postprocessing task since the 3D files take a lot of space. Is this readily possible? Thanks in advance! Ville 

October 3, 2007, 09:51 
It is possible, but not readil

#5 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13 
It is possible, but not readily.


October 3, 2007, 10:11 
Thank you for the reply!
Wha

#6 
Member
ville vuorinen
Join Date: Mar 2009
Posts: 67
Rep Power: 9 
Thank you for the reply!
What steps would be required to use the related sampling dictionary every dt intervals; would there be any possible piece of code for doing that? It would be quite wonderful to try out since visualizing transient phenomena in a timeresolved way becomes very time consuming if the animations are made out of large 3d data sets. Ville P.S. Since I couldn't find this on the forum: An example of using the sampleSurface as a postprocessing tool is found in ~/OpenFOAM/OpenFOAM1.4.1/tutorials/ solidDisplacementFoam/plateHole/system 

October 3, 2007, 10:21 
You would have to integrate th

#7 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13 
You would have to integrate the sampleSurface utility into an application, or for more general use, into a function object. A fair amount of work unfortunately and I am not aware of existing applications that perform this task.


February 26, 2008, 13:21 
will it work in parallel if we

#8 
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 10 
will it work in parallel if we did so? If so I can try to do it since, I've been looking for a way to average fields in a set of planes during parallel run and this can do it if the sampling period is long enough to not to make the code slow.


February 27, 2008, 05:32 
sampleSurface works in paralle

#9 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13 
sampleSurface works in parallel.


February 27, 2008, 06:15 
Saving a cell set that interse

#10 
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 12 
Saving a cell set that intersects a plane at runtime is presented here: cuttingPlane
It works in parallel, too. Dragos 

October 10, 2008, 04:00 
Hi,
Since OpenFOAM already

#11 
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 13 
Hi,
Since OpenFOAM already includes many third party software, why not add another one, say octave? I am thinking these days, is it possible to do FFT with OpenFOAM? Because FFT utility is very common and very useful and ver important for postprocessing, why not it is included? It would be nice to see postprocessing has the ability of Graphic showing and spectrum analysis etc. Just a thought. \Daniel
__________________
~ Daniel WEI  Boeing Research & Technology  China Beijing, China 

June 4, 2010, 13:59 

#12 
Member
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 9 
Hi Daniel,
It seem that OpenFOAM 1.6 has FFT utility. See /usr/local/OpenFOAM/OpenFOAM1.6/src/randomProcesses/fft And I was wondering if you were able to use it. If yes could you show me how? Thank you, Pascal 

December 2, 2010, 16:47 

#13 
New Member
Bertrand Delvaux
Join Date: Apr 2010
Posts: 29
Rep Power: 8 
I would be interested in this use as well, if anyone has information on how to implement a FFT on OpenFOAM probes.
Thanks! 

January 9, 2011, 22:12 

#14  
New Member
Join Date: Jan 2011
Posts: 1
Rep Power: 0 
Quote:
Jose I am new to openfoam. Can you tell where these lines can be added to calculate massflux at a boundary? It will be very helpful if you can show me an example. 

August 5, 2011, 06:09 

#15  
Member
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 8 
Quote:
Code:
functions ( mflow_inlet { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl outputTime; log true; valueOutput true; source patch; sourceName inlet; operation sum; fields ( phi ); } ); Code:
patchIntegrate latestTime phi inlet 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Forces viscous calculation in VWT with OpenFOAM 15x  terrybarnaby  OpenFOAM Running, Solving & CFD  0  November 28, 2008 09:39 
Turbine stage mixing plane calculation  Knut  FLUENT  0  December 4, 2007 13:46 
calculation average pressure in a plane with UDF  Vitalij  FLUENT  1  April 10, 2007 03:39 
Symmetry plane and force calculation  Roland  CFX  7  May 31, 2006 13:34 
Error in flux at Fluent´s mixing plane calculation  ales  FLUENT  0  February 9, 2005 05:48 