|
[Sponsors] |
July 21, 2010, 18:08 |
Mass Flow rate through a plane
|
#1 |
Senior Member
|
Hi foamers,
I am starting to feel desesperate guys. I am trying to calculate the mass flow through a plane that it is not a patch, as the massCalcFlow does. Is there any way of this the easy way, say using foamCalc or some other utility that I am not aware of. If not possible to do that easily, I will do it in the code, and I will contribute it to the community, if I manage to do it. Can anyone help me out. Thanks in advance, António Martins PS: OpenFOAM really needs a good documentation, but it seems capitalism and common good do not mix very well... and the problems with the documentation site only helped the commercial software even more.... |
|
July 22, 2010, 03:20 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
Note that this is all much easier when sampling on a patch, since you can simply use the phi directly there. Nonetheless, this code fragment should give you a few ideas (I hope). Code:
// defined somewhere in the surrounding class: PtrList<sampledPlane> gammaPlanes_; void Foam::massFlowInfo::calculateAndWrite ( const volVectorField& U, const volScalarField& rho ) const { forAll(gammaPlanes_, planeI) { const sampledPlane& pln = gammaPlanes_[planeI]; label nFaces = pln.faces().size(); reduce(nFaces, sumOp<label>()); if (nFaces) { // the velocity normal to the plane scalarField Uproj = pln.project ( pln.sample(U) ); scalar U_mean = pln.average(Uproj); scalarField rhoU = pln.sample(rho) * Uproj; scalar massFlow = pln.integrate(rhoU); Info<< pln.name() << nl << " area = " << pln.area() << nl << " massFlow = " << massFlow << " (" << (massFlow * 3600) << " kg/h)" << nl << " U_mean = " << U_mean << endl; } else { Info<< pln.name() << nl << " area = " << 0 << endl; } } } |
||
July 22, 2010, 14:23 |
Thanks
|
#3 |
Senior Member
|
Thanks olesen. I will try the code and I will let you know if its worked.
Thanks, Titio |
|
October 26, 2010, 17:54 |
what happened with this?
|
#4 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Was this resolved? if so, please share how you made this possible.
|
|
October 26, 2010, 18:00 |
|
#5 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
try swak4Foam:
http://openfoamwiki.net/index.php/Contrib/swak4Foam to calculate flow rate through internal faceZone this works. i have tried it. to calculate the flow through a patch u can use calcMassFlow: http://openfoamwiki.net/index.php/Contrib_calcMassFlow |
|
March 25, 2012, 20:08 |
how to construct sampledPlane?
|
#7 | |
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 17 |
Quote:
The code is very helpful, but I wonder also how the parts related to construction of sampledPlane's is implemented. Normally sampledPlane's are constructed on runtime using the sampleDict with runtimeselectiontable. I don't know how to construct them in a regular way with the direction vectors and basepoints. Any suggestion would be a lot of help. Best, Asim |
||
March 25, 2012, 20:41 |
|
#8 |
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 17 |
Ok I found the answer. I have to create cuttingPlane's and construct sampledPlane's using those cuttingPlane's...
|
|
August 22, 2017, 03:22 |
solution?
|
#9 |
New Member
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 9 |
||
August 22, 2017, 04:46 |
|
#10 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mass Flow Rate Error | jallison | FLUENT | 1 | May 16, 2011 17:22 |
mass flow rate (CFX post) | sanchezz | CFX | 2 | January 14, 2010 07:54 |
Mass Flow Rate | student87 | CFX | 4 | January 2, 2010 05:45 |
Surface Integral - Mass Flow Rate | Venkatesh V | FLUENT | 3 | October 10, 2008 17:18 |
mass flow rate error | Masood | FLUENT | 0 | May 22, 2005 01:32 |