CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Interface contour - interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2012, 11:39
Default Interface contour - interFoam
  #1
New Member
 
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 17
PrzemekPL is on a distinguished road
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!!!
PrzemekPL is offline   Reply With Quote

Old   November 13, 2012, 13:49
Default
  #2
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 16
michielm is on a distinguished road
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;
   }
michielm is offline   Reply With Quote

Old   November 14, 2012, 09:48
Default
  #3
New Member
 
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 17
PrzemekPL is on a distinguished road
@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!
PrzemekPL is offline   Reply With Quote

Old   November 20, 2012, 21:04
Default
  #4
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 PrzemekPL View Post
@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!
If I understand you correctly you want to cut an iso-surface with a plane to get a "string"/line?

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
gschaider is offline   Reply With Quote

Old   January 30, 2013, 15:09
Default
  #5
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
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
ziemowitzima is offline   Reply With Quote

Reply

Tags
contour, free surface, interfoam, swak4foam


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
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


All times are GMT -4. The time now is 16:09.