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

Calculate interface curvature in interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2013, 14:26
Default Calculate interface curvature in interFoam
  #1
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 14
styleworker is on a distinguished road
Hi there,

actually I'm solving two phase flows with MRFInterFoam (OF 2.1.1) in a single rotating cylinder, which is half filled with a fluid.

I would like to calculate the resulting capillary pressure, which is connected with the interface curvature. Andrea allready wrote a script for calculating the curvature, but it seems not to work.

Does anybody have a idea?

Last edited by styleworker; January 11, 2013 at 14:59.
styleworker is offline   Reply With Quote

Old   January 15, 2013, 13:03
Default
  #2
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 14
styleworker is on a distinguished road
I've found that, if I add the following code to controlDict, I can extract the curvature to vtk and ascii format for a defined patch. So I can extract the coordinates in x and y.
If cyclic boundaries are involved, isoSurface has to be changed to isoSurfaceCell, but it isn't possible anymore to extract the surface for a defined patch.

But it is still possible to add a contour filter (alpha=0.5) and slice filter to the model in paraView. The coordinates can easily exported as *.csv.

HTML Code:
functions 
{ 
    elevationVTK 
    { 
        type            surfaces; 
        functionObjectLibs 
        ( 
            "libsampling.so" 
        ); 
        outputControl   outputTime; 
        surfaceFormat   vtk; 
        interpolationScheme cellPoint; 
 
        fields 
        ( 
            alpha1 
        ); 
        surfaces 
        ( 
            topFreeSurface 
            { 
                type        isoSurface; 
                isoField    alpha1; 
                isoValue    0.5; 
                interpolate true;
                exposedPatchName nameOfPatch;  
            } 
        ); 
    } 
 
    elevationRAW 
    { 
        type            surfaces; 
        functionObjectLibs 
        ( 
            "libsampling.so" 
        ); 
        outputControl   outputTime; 
        surfaceFormat   raw; 
        interpolationScheme cellPoint; 
 
        fields 
        ( 
            alpha1 
        ); 
        surfaces 
        ( 
            topFreeSurface 
            { 
                type        isoSurface; 
                isoField    alpha1; 
                isoValue    0.5; 
                interpolate true;
                exposedPatchName nameOfPatch; 
            } 
        ); 
    }
}

Last edited by styleworker; January 16, 2013 at 12:02. Reason: problem solved
styleworker 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
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
CFX13 Post Periodic interface EtaEta CFX 7 December 8, 2011 17:15
sharp interface and curvature yukn Main CFD Forum 0 October 12, 2011 12:54
Interface location problem in interFoam cfd_user2011 OpenFOAM 1 July 7, 2011 12:04
InterFoam - Measuring distance of interface from a precribed point/patch Ak_cfd OpenFOAM 0 May 27, 2010 18:41


All times are GMT -4. The time now is 13:59.