CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Volume Average for magnitude U

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2012, 07:06
Default
  #21
Member
 
Simon Arne
Join Date: May 2012
Posts: 42
Rep Power: 14
simpomann is on a distinguished road
I never actually did any kind of wiki entry but I will try to find time at the weekend!

Okay:
I did a sum of the area as well and compared it to paraView: 99.71% identical size.

I triple checked using the same data and I put more of the function objects in line and compared them to the results from paraView (they showed the same behaviour in pressure loss, but the values differ).

Now its time to learn about the sample utility (that I so far avoided).

And thanks again! I know that this is not self understanding and appreciate it.
simpomann is offline   Reply With Quote

Old   October 18, 2012, 08:07
Default
  #22
Member
 
Simon Arne
Join Date: May 2012
Posts: 42
Rep Power: 14
simpomann is on a distinguished road
Next step:

I defined a sampleDict with a plane exactly like in the function object and made samples of U, magU, p.
Integrating the sampled surfaces in paraView leads me to 12 m/s, so different from the areaAverage provided by the function Object.

Maybe I defined something wrong in my use of the function object, but I have no clue.
Attached Files
File Type: gz master.tar.gz (23.6 KB, 5 views)
simpomann is offline   Reply With Quote

Old   January 14, 2015, 13:26
Default
  #23
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17
linch is on a distinguished road
Hi Benhard,

Quote:
Originally Posted by gschaider View Post
With the big brother of the simpleFunctionObjects: swak4Foam. Something like:

Code:
functions
{
  velAverage
  {
     type swakExpression;
     functionObjectLibs
     (
       "libsimpleSwakFunctionObjects.so"
     );
     verbose true;
     variables (
        "totalV=sum(vol());"
     );
     expression "vol()*mag(U)/totalV";
     accumulations (
        sum
     );
}
);
That would be the volume-weighted average.
If I understood it correctly, vol() corresponds to mesh.V() in the OF. What would be the swak-alternative for mesh.C()? What I want to do is to calculate the center of mass
Code:
centerMass = fvc::domainIntegrate(rho*mesh.C()) / fvc::domainIntegrate(rho)
using function objects.

Is there any documentation containing all functions available in libsimpleSwakFunctionObjects.so and libswakFunctionObjects.so? I've tried to search for something like that, but found just small peaces in the Wiki and in the forum.

Best regards,
Ilya
linch is offline   Reply With Quote

Old   January 14, 2015, 15:23
Default
  #24
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by linch View Post
Hi Benhard,



If I understood it correctly, vol() corresponds to mesh.V() in the OF. What would be the swak-alternative for mesh.C()? What I want to do is to calculate the center of mass
Code:
centerMass = fvc::domainIntegrate(rho*mesh.C()) / fvc::domainIntegrate(rho)
using function objects.

Is there any documentation containing all functions available in libsimpleSwakFunctionObjects.so and libswakFunctionObjects.so? I've tried to search for something like that, but found just small peaces in the Wiki and in the forum.

Best regards,
Ilya
The equivalent for mesh.C() would be pos()

The only reference documentation of swak4Foam (that I know of ) is the "Incomplete reference Guide" that comes with the sources. Expressions are fully documented. Also some other things but no listing of the functionObjects is yet present. This readable version is linked from the swak-page on the Wiki http://sourceforge.net/p/openfoam-ex...amReference.md
linch and sourav90 like this.
__________________
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
gschaider is offline   Reply With Quote

Reply


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


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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 06:07.