CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Interface contour - interFoam - swak4foam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 13, 2012, 11:39
Default Interface contour - interFoam - swak4foam
  #1
New Member
 
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 7
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: 6
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: 7
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: 3,915
Rep Power: 40
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: 129
Rep Power: 8
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

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 34 October 16, 2014 05:27
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 18:55.