|
[Sponsors] |
Calculate Mass Flowrate at a faceZone with OpenFOAM4 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 31, 2016, 05:25 |
Calculate Mass Flowrate at a faceZone with OpenFOAM4
|
#1 |
Member
|
Hello,
in OpenFOAM2.4 to compute that mass flowrate at an arbitrary faceZone inside the fluid domain I used the METHOD reported below. Unfortunately if I use it in OpenFOAM4 I get error: Code:
[11] Unknown function type faceSource Valid functions are : 6 ( patchProbes probes psiReactionThermoMoleFractions rhoReactionThermoMoleFractions sets surfaces ) METHOD used in OF2.4 1) use topoSet to extract the faceZone where you want to compute the massflow. The topoSetDict will as follows: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * // actions ( { // Name of set to operate on name extractedFaces; // to create the faceZone required by the effectiveness module in fvOptions type faceSet; // One of clear/new/invert/add/delete|subset/list action new; source boxToFace; sourceInfo { // thin box to extract the faceZone where you want to investigate the massflow box (0.148 -0.265 -0.265) (0.151 0.265 0.265); } } // creation of the faceZone (from the above faceSet) { name massFlowSurface; type faceZoneSet; action new; source setAndNormalToFaceZone; sourceInfo { faceSet extractedFaces; normal (1 0 0); } } ); Code:
functions { #include "ProbeData" // massFlow computation massFlow { type faceSource; enabled true; outputControl timeStep; outputInterval 1; // Output to log&file (true) or to file only log true; // Output field values as well valueOutput false; // Type of source: patch/faceZone/sampledSurface source faceZone; // if patch or faceZone: name of patch or faceZone sourceName massFlowSurface; // Operation: areaAverage/sum/weightedAverage ... operation sum; surfaceFormat vtk; fields ( phi ); } } |
|
August 31, 2016, 22:13 |
|
#2 |
Member
|
I have found the solution to my error here
http://www.openfoam.com/documentatio...2.html#details I was forgetting the line Code:
functionObjectLibs ("libfieldFunctionObjects.so"); Code:
functions { //#include "ProbeData" // massFlow computation massFlow { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl timeStep; outputInterval 1; // Output to log&file (true) or to file only log true; // Output field values as well valueOutput false; // Type of source: patch/faceZone/sampledSurface source faceZone; // if patch or faceZone: name of patch or faceZone sourceName massFlowSurface; // Operation: areaAverage/sum/weightedAverage ... operation sum; surfaceFormat vtk; fields ( phi ); } } Code:
faceSource massFlow output: sum(massFlowSurface) of phi = 0.6364095 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Orientation of faceZone, mass flow sign convention | Awak | OpenFOAM Pre-Processing | 2 | August 1, 2016 22:28 |
calculate mass flow rate from velocity contour | hosein72 | FLUENT | 0 | June 10, 2016 11:37 |
To calculate area averaged species mass fraction from PDF | Bharadwaj B S | Fluent UDF and Scheme Programming | 3 | March 8, 2016 03:22 |
How to calculate particle mass flow rate in domain with respect to injection flowrate | Jeeloong | Fluent Multiphase | 0 | January 27, 2016 20:40 |
How does FLUENT calculate turbulent mass diffusivity (m2/s) for the granular phase | zhouwu | FLUENT | 0 | August 6, 2011 05:51 |