|
[Sponsors] |
November 13, 2012, 11:39 |
Interface contour - interFoam
|
#1 |
New Member
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 17 |
Hello Everybody,
I'm using OF 2.1.1 and interFoam for the flow simulations with the free surface. Thanks to swak4Foam I'm able to write out some results during the run. What I'm interseted in is the alpha1 field at a given cutting plane. My controlDict: libs ( "libOpenFOAM.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" ); functions { cuttingPlane_vtk { type surfaces; functionObjectLibs ("libsampling.so"); outputControl outputTime; surfaceFormat vtk; fields ( alpha1 ); interpolationScheme cellPoint; surfaces ( cuttingPlane { type cuttingPlane; planeType pointAndNormal; pointAndNormalDict { basePoint (0 0 0); normalVector (0 0 1); } interpolate true; } ); } Once I get .vtk files I can load them into paraview, plot the contour alpha1=0.5 and save the contour data as .csv file. So, my question is if steps which I perform in paraview can be added to the swak4foam procedure? Thanks in Advance for any help!!! |
|
November 13, 2012, 13:49 |
|
#2 |
Member
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 16 |
I think you can set your surfaceFormat to 'raw' and export the cutting plane with alpha1=0.5
I don't know exactly how this cutting plane works, but the code below will export just x,y,z locations for the alpha1=0.5 surface Code:
DropSurface { type surfaces; functionObjectLibs ( "libsampling.so" ); outputControl timeStep; outputInterval 150; surfaceFormat raw; fields ( //alpha1 ); surfaces ( constantIso { type isoSurfaceCell; // always triangulated isoField alpha1; isoValue 0.5; interpolate false; regularise false; // do not simplify } ); interpolationScheme cellPoint; } |
|
November 14, 2012, 09:48 |
|
#3 |
New Member
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 17 |
@michielm, thank you for your answer.
Your method works, but it gives the cooordinates of the whole surface. The question is how to do it for a particular cutting plane? :-) So far, I use this method to export isoSurface (.raw or .vtk) during the run and use some other software (i.e., matlab) to get the free surface contour at a given plane. Integrating these steps into the sampling functions would save me a lof of work :-) thanks! |
|
November 20, 2012, 21:04 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I'm afraid you can't do that with swak4Foam. I'm not quite sure whether there are methods in OF that support that (cutting two surfaces) out-of-the-box
__________________
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 |
||
January 30, 2013, 15:09 |
|
#5 |
Senior Member
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17 |
Hi
Do you know maybe how to extract isosurface of the field (e.g. field T, isosurface for T = 0) during runtime ? I would need it coordinate in my solver. Thanks ZM |
|
Tags |
contour, free surface, interfoam, swak4foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
How to have sharp interface in nano scale two phase flow problem using interFoam | hosseinfathi | OpenFOAM Programming & Development | 10 | April 9, 2017 10:07 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
the interface reconstruction in InterFoam | young_Cao | OpenFOAM Running, Solving & CFD | 3 | June 13, 2012 07:45 |