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

Calculation for a given plane possible in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By santos

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2007, 20:07
Default Hello! I know that it is po
  #1
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
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
mm.abdollahzadeh likes this.
santos is offline   Reply With Quote

Old   February 26, 2007, 02:35
Default Hi Jose, Maybe sampleSurface
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hi Jose,
Maybe sampleSurface is what you want!

Dragos
dmoroian is offline   Reply With Quote

Old   February 26, 2007, 04:12
Default Hi Dragos Thanks for your r
  #3
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
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
santos is offline   Reply With Quote

Old   October 3, 2007, 05:49
Default Hi, I would be interested in
  #4
Member
 
ville vuorinen
Join Date: Mar 2009
Posts: 67
Rep Power: 17
ville is on a distinguished road
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
ville is offline   Reply With Quote

Old   October 3, 2007, 09:51
Default It is possible, but not readil
  #5
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
It is possible, but not readily.
eugene is offline   Reply With Quote

Old   October 3, 2007, 10:11
Default Thank you for the reply! Wha
  #6
Member
 
ville vuorinen
Join Date: Mar 2009
Posts: 67
Rep Power: 17
ville is on a distinguished road
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 time-resolved 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/OpenFOAM-1.4.1/tutorials/
solidDisplacementFoam/plateHole/system
ville is offline   Reply With Quote

Old   October 3, 2007, 10:21
Default You would have to integrate th
  #7
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
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.
eugene is offline   Reply With Quote

Old   February 26, 2008, 12:21
Default will it work in parallel if we
  #8
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
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.
maka is offline   Reply With Quote

Old   February 27, 2008, 04:32
Default sampleSurface works in paralle
  #9
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
sampleSurface works in parallel.
eugene is offline   Reply With Quote

Old   February 27, 2008, 05:15
Default Saving a cell set that interse
  #10
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Saving a cell set that intersects a plane at runtime is presented here: cuttingPlane
It works in parallel, too.

Dragos
dmoroian is offline   Reply With Quote

Old   October 10, 2008, 04:00
Default Hi, Since OpenFOAM already
  #11
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
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 post-processing, why not it is included?

It would be nice to see post-processing has the ability of Graphic showing and spectrum analysis etc.

Just a thought. \Daniel
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email
lakeat is offline   Reply With Quote

Old   June 4, 2010, 13:59
Default
  #12
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 16
Pascal_doran is on a distinguished road
Hi Daniel,

It seem that OpenFOAM 1.6 has FFT utility. See /usr/local/OpenFOAM/OpenFOAM-1.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
Pascal_doran is offline   Reply With Quote

Old   December 2, 2010, 15:47
Default
  #13
New Member
 
Bertrand Delvaux
Join Date: Apr 2010
Posts: 29
Rep Power: 16
Bertrand is on a distinguished road
I would be interested in this use as well, if anyone has information on how to implement a FFT on OpenFOAM probes.

Thanks!
Bertrand is offline   Reply With Quote

Old   January 9, 2011, 21:12
Default
  #14
New Member
 
Join Date: Jan 2011
Posts: 1
Rep Power: 0
mani_v is on a distinguished road
Quote:
Originally Posted by santos View Post
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

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.
mani_v is offline   Reply With Quote

Old   August 5, 2011, 06:09
Default
  #15
Member
 
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 16
CedricVH is on a distinguished road
Quote:
Originally Posted by mani_v View Post
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.
You can better calculate the massflux through a boundary through a functionObject. Add this to your controlDict file to calculate the massflow through the inlet at write time.

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
        );
    }
);
You can also achieve the same by post-processing the data using the command:

Code:
patchIntegrate -latestTime phi inlet
CedricVH is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forces viscous calculation in VWT with OpenFOAM 15x terrybarnaby OpenFOAM Running, Solving & CFD 0 November 28, 2008 08:39
Turbine stage mixing plane calculation Knut FLUENT 0 December 4, 2007 12: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 04:48


All times are GMT -4. The time now is 08:07.