|
[Sponsors] |
March 8, 2012, 18:15 |
swakExpressions
|
#1 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Hi All,
First of all thanks to Bernhard Gschaider for swak4Foam (http://openfoamwiki.net/index.php/Contrib/swak4Foam), I am getting into some of the swakExpression stuff to calculate volumetric flow rate across planes. I have been using something like the example: Code:
planeAverage { type swakExpression; valueType surface; surfaceName middlePlane; surface { type plane; basePoint (0 0.00125 0); normalVector (0 1 0); interpolate false; } verbose true; expression "sum(pos().x*area())/sum(area())"; accumulations ( average ); } flowThrough { type swakExpression; valueType surface; surfaceName middlePlane; verbose true; expression "U & Sf()"; accumulations ( sum ); } to grab volumetric flow rate and then I will eventually use it for cup-mixing (or mixing-cup?) average (mass flow averaged of a variable) of a system. My question is...is the plane in question a cutting plane or the plane of faced of the cells parallel to the plane I am providing? I ask because I noticed a slight difference between the flowthrough that is stated above and patchMassFlow if I use a simpleFunctionObject on the outlet patch. It could be my mistake on the differences...since I just started messing with this today. Thoughts? Thanks for your help. |
|
March 8, 2012, 19:00 |
|
#2 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Therefor sampledSurfaces are computationally expensive and shouldn't be used excessively Quote:
If you want a control surface that is aligned with the mesh faces then a faceSet is a better choice (here the mass-flow should be exactly the one going in and out of the simulation ... if the run is converged. For specifying the faceSet you can use the setSet-utility. Either with one of the OF topoSources or the expressionToFace-topoSource that comes with swak (that one picks faces for the faceSet by evaluating a logical expression and taking all faces where the condition is true on one side and false on the other) For different approaches to control-surfaces have a look at the angledDuct-example that comes with swak |
|||
March 9, 2012, 17:06 |
|
#3 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Thanks for the reply, I believe I just wanted a confirmation that I was thinking correctly and my hunch was correct....and that is what you provided. For others, I will just post the code that I finally come up with. Thanks again.
|
|
November 15, 2013, 17:29 |
|
#4 | |
Member
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 15 |
Quote:
thanks for your help in advance. |
||
November 18, 2013, 18:28 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|