|
[Sponsors] |
volFlowRateSurface function - triangulated surface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 27, 2016, 22:03 |
volFlowRateSurface function - triangulated surface
|
#1 |
New Member
Igor Leonardo
Join Date: Jul 2016
Location: Brazil - SP - SJC
Posts: 20
Rep Power: 10 |
Hello everyone,
I'm trying to use the function object volFlowRateSurface described here: http://cfd.direct/openfoam/user-guid...#x31-2270006.2 Basically, i want to list the flow rate in some specific areas of my model. From the description on the link above, i can do that with this function, by using these "specified triangulated surfaces" right? My question is: How to make proper use of this function, and how to create these triangulated surfaces? So far i found out that i need to have this function called from my controlDict file like this: Code:
functions { #includeFunc volFlowRateSurface; } The file in the postProcessing/flowRate folder in openFOAM, looks like this: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Web: www.OpenFOAM.org \\/ M anipulation | ------------------------------------------------------------------------------- Description Calculates volumetric flow rate through a specified triangulated surface by interpolating velocity onto the triangles and integrating over the surface area. Triangles need to be small (<= cell size) for an accurate result. \*---------------------------------------------------------------------------*/ triSurface <triSurfaceFile>; #includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg" // ************************************************************************* // I would be happy if someone could give some example of how to use this function, specify these triangulated surfaces, or just point out some tutorial that uses this, so i can have some reference... Thanks everyone for the help. I'm new to OpenFOAM, sorry if this is a silly question, and if i'm posting this on the wrong section or something. But i could not find examples of usage of this function around, nor much information on the forum. Best regards, Igor L. Last edited by igor.leo93; July 29, 2016 at 21:07. |
|
July 29, 2016, 21:06 |
Progress1
|
#2 |
New Member
Igor Leonardo
Join Date: Jul 2016
Location: Brazil - SP - SJC
Posts: 20
Rep Power: 10 |
So i have made some progress and thought i would come and share in case someone looks for explanations on this function like i did...
So i found out the following: 1- On our volFlowRateSurface file in the system folder, we must declare a regionType, which can be of the following types: faceZone patch sampledSurface So if we choose patch, it will monitor the flow rate over a specified patch, same goes for faceZone and sampledSurface (Problem now is how exactly to create these facezones and sampledSurfaces on parts of the domain in which we want to monitor the flow rate...) To choose where exactly we want to monitor we must declare a name, as in facezone name, or sampledsurfaceDict or patch name. After declaring these, and running the simulation, a volFlowRateSurface folder will be created in the postProcessing folder, there will be a list of the flowrate on each timeStep. Here is an example of a volFlowRateSurface file, this uses a sampledSurfaceDict plane, to monitor the flowrate: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Web: www.OpenFOAM.org \\/ M anipulation | ------------------------------------------------------------------------------- Description Calculates volumetric flow rate through a specified triangulated surface by interpolating velocity onto the triangles and integrating over the surface area. Triangles need to be small (<= cell size) for an accurate result. \*---------------------------------------------------------------------------*/ triSurface <triSurfaceFile>; #includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg" regionType sampleadSurface; name sampleSurfaceDict; sampledSurfaceDict { type plane; basePoint (0.9 0 0); normalVector (1 0 0); interpolate false; } // ************************************************************************* // Code:
# Region type : sampledSurface sampleSurfaceDict # Faces : 4000 # Area : 3.138364e-02 # Time areaNormalIntegrate(U) 1 (1.686720e+00 0.000000e+00 0.000000e+00) 2 (1.832342e+00 0.000000e+00 0.000000e+00) 3 (1.859946e+00 0.000000e+00 0.000000e+00) 4 (1.735812e+00 0.000000e+00 0.000000e+00) 5 (1.672361e+00 0.000000e+00 0.000000e+00) 6 (1.693844e+00 0.000000e+00 0.000000e+00) 7 (1.701347e+00 0.000000e+00 0.000000e+00) 8 (1.712168e+00 0.000000e+00 0.000000e+00) 9 (1.720110e+00 0.000000e+00 0.000000e+00) 10 (1.724886e+00 0.000000e+00 0.000000e+00) 11 (1.728143e+00 0.000000e+00 0.000000e+00) 12 (1.730597e+00 0.000000e+00 0.000000e+00) 13 (1.731944e+00 0.000000e+00 0.000000e+00) 14 (1.730392e+00 0.000000e+00 0.000000e+00) 15 (1.724115e+00 0.000000e+00 0.000000e+00) 16 (1.720754e+00 0.000000e+00 0.000000e+00) 17 (1.719241e+00 0.000000e+00 0.000000e+00) Best regards, Igor L. |
|
August 16, 2016, 21:24 |
Solution
|
#3 |
New Member
Igor Leonardo
Join Date: Jul 2016
Location: Brazil - SP - SJC
Posts: 20
Rep Power: 10 |
Ok so i found out how to calculate the flow rate over a specified plane.
For this task, one can use sampledSurfaces, which will be created from setting a plane with 3 points -> 1-Origin, 2-3- Vertexes (See attachment) As simple as that, we can create many surfaces with any orientation and monitor the flow rate. The results will be listed for all the surfaces on the postProcessing dict as i mentioned before. Just remember to "call" the functions on the control dict. I leave here a example of a volFlowRateSurface for anyone who might need. By the way, OpenFOAM 4, being used. Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Web: www.OpenFOAM.org \\/ M anipulation | ------------------------------------------------------------------------------- Description Calculates volumetric flow rate through a specified triangulated surface by interpolating velocity onto the triangles and integrating over the surface area. Triangles need to be small (<= cell size) for an accurate result. \*---------------------------------------------------------------------------*/ triSurface <triSurfaceFile>; #includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg" regionType sampledSurface; name sampleSurfaceDict; sampledSurfaceDict { type cuttingPlane; planeType embeddedPoints; embeddedPointsDict { point1 (0.9 -0.2 -0.2); point2 (0.9 0.2 -0.2); point3 (0.9 0.2 0.2); } source cells; // sample cells or boundaryFaces interpolate false; } // ************************************************************************* // Best regards for everyone. Igor Carvalho. |
|
August 17, 2016, 03:16 |
|
#4 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Are you sure the plane will be bounded using embeddedPoints? Furthermore, when using a sampling plane perhaps you should use interpolated values.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
August 17, 2016, 09:36 |
interpolattion
|
#5 |
New Member
Igor Leonardo
Join Date: Jul 2016
Location: Brazil - SP - SJC
Posts: 20
Rep Power: 10 |
Hello akidess,
I used this exactly setup for my model, which was a simple tube, and the flow rate i obtained was indeed correct. I think this interpolation refers to where the plane crosses and the mesh (See attached image). I believe if interpolation is true, it is going to interpolate the value for the flow rate between the cells, regarding the plane location. If interpolation is false, i believe it is going to just take the nearest cell center's value. I decided to use false interpolation because my mesh was perfect hexaedral and all, so assuming cell center values would be better, because openFOAM calculates for cell centers. But i also think if i had choose to interpolate, values shouldn't change much, maybe i will try it later to confirm. Since my mesh was hex and good, i think it is ok, but things may be diferent for tet mesh, what do you think? Maybe for tet interpolation really should be necessary. Well at least this is what i think this is... correct me if i'm wrong please. Thanks for looking at this thread, Best regards, Igor Carvalho |
|
March 16, 2017, 09:00 |
|
#6 |
New Member
Join Date: Sep 2010
Posts: 11
Rep Power: 16 |
Very helpful, many thanks. Just to confirm with you the three points in embededPointsDict are on the tube.
Last edited by Gary; March 16, 2017 at 09:29. Reason: forgot to ask one more question |
|
June 9, 2017, 11:05 |
|
#7 | ||
Senior Member
|
Quote:
So how have you checked your flowrat? Quote:
Thanks Michele |
|||
August 9, 2017, 10:26 |
Surface report in single file
|
#8 | |
Member
Bruno Lebon
Join Date: Dec 2012
Posts: 33
Rep Power: 14 |
Quote:
|
||
February 1, 2018, 12:30 |
checking the results
|
#9 | |
New Member
Ali Mohammadi
Join Date: Oct 2017
Posts: 15
Rep Power: 9 |
Quote:
I checked the results of this utility with the result of flow rate in paraview and they were the same. |
||
May 26, 2018, 12:34 |
|
#10 |
New Member
Ameya
Join Date: Jan 2018
Posts: 5
Rep Power: 8 |
Hello Everyone,
I wish to calculate volumetric flow rates out of my control volume (which is rectangular shaped domain, with multiple circular outlets on one face) As the outlets are more that 100 in number I have included them into one zone called outlet. Now i wish to calculate flow rates through each individual outlet. I was wondering if there is a way to define sampledSurface (like the way a plane is defined in above posts), the centers of the circular outlets,Diameters are known). If anyone can refer to similar tutorial, sample file, that would be great. I basically want to know the correct syntax for defining a circular sample surface at a particular location in my geometry. Thanks in advance. Last edited by ameya2310; May 26, 2018 at 13:07. Reason: incomplete |
|
May 27, 2018, 04:00 |
flow rate in multiple outlets
|
#11 |
New Member
Ali Mohammadi
Join Date: Oct 2017
Posts: 15
Rep Power: 9 |
Hi ameya
I can suggest you a simple way which i have used it my self. my domain had 16 outlets which i named from outlet 1 to outlet 16. I wrote a for loop code and used the flow rate patch command to calculate the flow rate from outlet 1 to outlet 16. best regards Ali |
|
May 30, 2018, 13:17 |
|
#12 |
New Member
Ameya
Join Date: Jan 2018
Posts: 5
Rep Power: 8 |
Hello, Thanks for the reply Ali,
Your suggestions sounds great, I will try writing the code. Actually my problem is that, I have more that 100 outlets and defining 100 outlets seperately is tedious, so I was wondering if there is a way around that. Anyways Thanks a lot. |
|
March 15, 2019, 09:43 |
Using .stl file
|
#13 |
New Member
Matthieu ZUBIALDE
Join Date: Mar 2019
Posts: 2
Rep Power: 0 |
Hello all,
I am also trying to calculate the flow rate over a specified plane. But in my case, this specified plane is defined with a .stl file. I used the following code in the volFlowRateSurface file. My question is: how can I define multiples surfaces (corresponding to multiples .stl files) in this code to calculate flow rates through these surfaces ? Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Web: www.OpenFOAM.org \\/ M anipulation | ------------------------------------------------------------------------------- Description Calculates volumetric flow rate through a specified triangulated surface by interpolating velocity onto the triangles and integrating over the surface area. Triangles need to be small (<= cell size) for an accurate result. \*---------------------------------------------------------------------------*/ regionType sampledSurface; name mySurface; sampledSurfaceDict { type sampledTriSurfaceMesh; surface mySurface.stl; source cells; interpolate true; } #includeEtc "caseDicts/postProcessing/flowRate/volFlowRateSurface.cfg" // ************************************************************************* // |
|
Tags |
functionobjects, triangulated surfaces, volflowratesurface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 06:42 |
LiencubiclowRemodel | nzy102 | OpenFOAM Bugs | 14 | January 10, 2012 09:53 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 13, 2001 00:19 |