|
[Sponsors] |
InterFoam freeSurface area calculation with sampleSurface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 28, 2007, 07:32 |
Dear Forum
Wish you all a v
|
#1 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Dear Forum
Wish you all a very nice day. I am using interFoam and for the post processing i need the surface area of the free surface. Using sampleSurface i could extract the isoSurface. Didn't know it was so easy !!!!! :-) This is how the sampleDict looks ------------------------------------------- interpolationScheme cellPointFace; surfaceFormat foamFile; surfaces ( interpolatedIsoSurface { name gammaSurface; field gamma; value 0.5; } ); fields ( gamma ); ----------------------------------------------- As a result i have the faces and points which correspond to this surface. Using the able given dict with the surfaceFormat vtk; I could see the surface in paraFoam. I sense that with points and faces available one can for sure calculate the area of this surface. Please share if someone knows about a utility or tool in openFoam to take the next step. Wishing you all Happy Holidays Jaswinder |
|
December 28, 2007, 10:38 |
Can't Paraview calculate the a
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Can't Paraview calculate the area?
|
|
December 28, 2007, 16:29 |
Hi Mattijs
Thanks for your
|
#3 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Hi Mattijs
Thanks for your reply. I tried various options under the filter section of paraview but couldn't get the job done. The isoSurface option in paraview shows the free surface corresponding to gamma lying in the interval [0,1] but no where i could find an option which could calculate its area. It seems from your question that it must be quite easy to do that. please give some tips where to look for or which filter does that. Best Regards Jaswinder |
|
December 29, 2007, 09:57 |
Try selecting the 'foamFile' t
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Try selecting the 'foamFile' type (sampleSurface/surfaceWriters/foamFile/foamFile.C).
Read in your pointField from an IFstream of the "points" file. Read in a faceList from the "faces" file. Sum all areas: scalar area = 0; forAll(faces, i) { area += faces[i].mag(points); } |
|
December 29, 2007, 12:42 |
It is very interesting to find
|
#5 |
Member
vof_user
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
It is very interesting to find the area of free surface, though I have never thought of it before doing with interFoam. I would appreciate giving details how to implement this.
|
|
December 29, 2007, 15:14 |
Hi Mattijs
Thanks once agai
|
#6 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Hi Mattijs
Thanks once again for your reply. Will try it and probably will need some more help if i would get some compiling errors. Best Regards Jaswinder |
|
June 26, 2008, 15:40 |
Jaswinder,
I have created a
|
#7 |
New Member
Scott Ford
Join Date: Mar 2009
Location: Pennsylvania, USA
Posts: 7
Rep Power: 17 |
Jaswinder,
I have created a sampleSurfaceDict 100% identical to yours, and when I execute it, my files for sampleSurface/15/gammaSurface/scalarField/gamma sampleSurface/15/gammaSurface/points and sampleSurface/15/gammaSurface/faces merely look like this: 0() Did you ever experience this sort of issue?? If so can you provide any insight?? |
|
December 9, 2009, 04:52 |
|
#8 |
New Member
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 17 |
Hi Jaswinder and other OF users,
Did you manage to calculate freeSurace area? I'm dealing with the same problem now. I'm using OF1.6 I understand Jaswinders way of thinking (first post in this thread) but I can't follow mattijs tips. Could anyone give me and other users more tips regarding to the freeSurface area calculation. Thanks Przemek |
|
December 10, 2009, 09:57 |
|
#9 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Hi Przemek
Please insert this into your code and it shall give you the correct free surface area. (this code snippet is available courtesy of Eugene De Villiers) volScalarField gradGamma = mag(fvc::grad(gamma)); scalar totalSurfaceArea = sum(gradGamma.internalField()*mesh.V()); For parallel runs, change sum to gSum. For a simple check for validation, try calculating area of circle or rectangle for cylindrical and cube geometries. In that way you will see that this formulation does gives you a very accurate calculation for surface area. Hope that helps Best Regards jaswi |
|
December 10, 2009, 12:07 |
|
#10 |
New Member
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 17 |
Hi Jaswi,
Thank you for your answer!! I'll apply your code before next simulation. This will give me area of the whole free surface but I need also to measure free surface area only in some particular locations. I just found how to make it in paraview without any additional coding. I write it here for others, hope this will help someone Step by step, how to measure free surface area in paraview:
Greetings Przemek |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculating Interface Area with InterFoam | gopala | OpenFOAM Running, Solving & CFD | 28 | December 23, 2021 03:51 |
What is the Finite Area Methodamphow to do the FAM calculation in FOAM | waynezw0618 | OpenFOAM Running, Solving & CFD | 5 | April 24, 2015 09:35 |
Frontal area calculation | Stefan | CFX | 1 | June 12, 2006 22:03 |
Numerical calculation interFoam never finishes | unoder | OpenFOAM Running, Solving & CFD | 9 | October 18, 2005 06:00 |
area volume calculation fundamentals | Ankur Kulkanri | Main CFD Forum | 0 | September 10, 2003 13:00 |