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

Internal faces for monitoring

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 23, 2010, 16:40
Default Internal faces for monitoring
  #1
New Member
 
Jason Ryon
Join Date: Oct 2009
Posts: 17
Rep Power: 7
jason.ryon is on a distinguished road
I would like to know how to monitor at an internal face (faceZone or faceSet). I want to know p, U, etc... for every point in the faceZone, as well as the mass flow through the entire face.

This is what I have tried so far, but can't seem to get things to work:
1. Import mesh (with "interior" surfaces) from Fluent using:
>fluentMeshToFoam mesh.msh -writeSets -writeZones
2. I see the name (interior_001) in faceZones of the faceZone that I want to monitor
3. Now, I have tried using the "surfaces" functionObject which works for slice planes or patches, but is it possible to use this to output a faceZone or faceSet?
4. I also tried even using the libfieldFunctionObjects.so but this seems to only work on a faceZone that is a patch and not an internal one.
5. Also, I have used libsimplefunctionobjects to work very well for mass flow at patches (i.e. pressure_inlet) but I don't know if this works for internal faceZones too.
http://openfoamwiki.net/index.php/Co...unctionObjects

I am sorry if this has been posted before, I searched through the Forum but keep hitting dead-ends.

Thanks,
Jason
jason.ryon is offline   Reply With Quote

Old   April 24, 2010, 07:48
Default
  #2
Member
 
Johan Spång
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 35
Rep Power: 8
josp is on a distinguished road
(Assuming OpenFOAM-1.6.x) insert this into your controlDict and update according to your case:

Code:
functions
(
//=========================================================//
Meas-outlet  // Name also used to identify output folder
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled         true;
        outputControl   timeStep;
        outputInterval  1;
        log             true;
        valueOutput     false;
        source          faceZone;  // Type of face source: faceZone, patch
        sourceName      meas-outlet;
        operation       sum;
        fields
        (
            phi
        );
    }
This should integrate massflow (or volume flow for incompressible flow). I'm unsure about the other scalars as they are not defined at the faces so they have to be interpolated..

OpenFOAM-1.6.x/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H:

- if the field is a volField the faceZone can only consist of boundary faces.

You could write something yourself like:
Code:
surfaceScalarField test = fvc::interpolate(field);
label q = mesh.faceZones().findZoneID(surfaceName);
const labelList& faces = mesh.faceZones()[q];

forAll(faces, j)
{
label facei = faces[j];
result+= test[facei]
...
}
Or check if surfaceInterpolateFieldsFunctionObjects can help you.

Last edited by josp; April 24, 2010 at 09:05.
josp is offline   Reply With Quote

Old   April 26, 2010, 16:56
Default
  #3
New Member
 
Jason Ryon
Join Date: Oct 2009
Posts: 17
Rep Power: 7
jason.ryon is on a distinguished road
josp,

Thanks for your response. I think this sum(phi) is close to what I am looking for, but not quite right. I am wondering though if this is "mass flow" or "mass flow rate"? I am looking for "mass flow rate".

I tried the sum(phi) at an inlet patch, and it is giving me results that are not the same as "mass flow rate" from Fluent or from the libsimpleFunctionObjects mass-flux calculations (both of which match up reasonably well to each other):

Thanks again for your help,
Jason
jason.ryon is offline   Reply With Quote

Old   April 27, 2010, 05:31
Default
  #4
Member
 
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 7
CedricVH is on a distinguished road
sum(phi) is the mass flow rate trough the patch. However, in incompressible solvers, phi has the dimension m^3/s and not kg/s. You will have to multiply this value with rho to have the same results as Fluent.
CedricVH is offline   Reply With Quote

Old   June 20, 2010, 15:21
Default surfaceScalarField
  #5
New Member
 
Nadeem
Join Date: Mar 2009
Location: München, Bavarian, Deutschland
Posts: 24
Rep Power: 8
ubaid is on a distinguished road
Hello everybody,

I am new to openfoam but have a similar question. I am wondering what I will get as an output if i have the following case.

surfaceScalarField abc

Info<<"Whats this"<<abc[100];

will it give me output of abc at the face number 100?

If I have faceSets, and get the facenumbers out of these facesets, could i get the value of abc at the putting the face number inside the brackets as following
Info<<"value at the required facenumber"<<abs[facenumber];

Thanks in advance.
ubaid is offline   Reply With Quote

Old   May 10, 2012, 08:35
Default
  #6
New Member
 
Michal
Join Date: Apr 2012
Location: Czech Republic
Posts: 27
Rep Power: 5
majkl is on a distinguished road
Quote:
Originally Posted by josp View Post
surfaceScalarField test = fvc::interpolate(field);
label q = mesh.faceZones().findZoneID(surfaceName);
const labelList& faces = mesh.faceZones()[q];

forAll(faces, j)
{
label facei = faces[j];
result+= test[facei]
...
}
[/CODE]Or check if surfaceInterpolateFieldsFunctionObjects can help you.
Well, it must be implemented in faceSource.H file? Thank you for your response. Majkl
majkl is offline   Reply With Quote

Reply

Tags
internal monitoring

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
How to store the variable on internal faces to calculate UDS_FLUX? bigfans FLUENT 0 October 28, 2009 15:22
Problem in IMPORT of ICEM input file in FLUENT csvirume FLUENT 2 September 9, 2009 01:08
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 10:37


All times are GMT -4. The time now is 11:54.