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

interpolated field at iso-surface 0.5

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 11, 2013, 12:03
Default interpolated field at iso-surface 0.5
  #1
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
Hi all,

I would like to interpolate a specified field on the iso-surface 0.5 of the color function alpha1 (interFoam) and then sum up all the contribution to get a kind of average value of that field at the interface. Is there a simple way to do that? I tried with sampling and function object but i didn't manage to get what i want.

any help is appreciated!

best
andrea
Andrea_85 is offline   Reply With Quote

Old   March 12, 2013, 05:26
Default
  #2
Member
 
Yogesh Bapat
Join Date: Oct 2010
Posts: 41
Rep Power: 6
ybapat is on a distinguished road
Hello,

You can take a look at isoSurface class in sampledSurface. I have not tried it, but I think it will help you.

Regards,
-Yogesh
ybapat is offline   Reply With Quote

Old   March 12, 2013, 06:50
Default
  #3
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
Hi,
thanks i solved it adding these lines in my sampleDict

constantIso
{
// Iso surface for constant values.
// Triangles guaranteed not to cross cells.
type isoSurfaceCell; // always triangulated
isoField alpha1;
isoValue 0.5;
interpolate false;
regularise false; // do not simplify
// mergeTol 1e-10; // Optional: fraction of mesh bounding box
// to merge points (default=1e-6)
}


best
andrea
Andrea_85 is offline   Reply With Quote

Old   March 13, 2013, 19:58
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 Andrea_85 View Post
Hi all,

I would like to interpolate a specified field on the iso-surface 0.5 of the color function alpha1 (interFoam) and then sum up all the contribution to get a kind of average value of that field at the interface. Is there a simple way to do that? I tried with sampling and function object but i didn't manage to get what i want.

any help is appreciated!

best
andrea
Depends on your definition of "simple". I lifted this from one of the examples in swak4Foam:
Code:
    createInterface
    {
        type createSampledSurface;
        outputControl timeStep;
        outputInterval 1;
        surfaceName interface;
        surface {
            type isoSurface;
            isoField alpha1;
            isoValue 0.5;
            interpolate true;
        }
    }
    height
    {
        type swakExpression;
        valueType surface;
        surfaceName interface;
        verbose true;
        expression "pos().y";
        accumulations (
            min
            max
        );        
    }
This gives you the minimum and maximum height of the surface, but other expressions (for instance "otherField*area()/sum(area())") and accumulations (sum) are possible (this should give you the area weighted average of otherField on that surface)
__________________
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

Reply

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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
grading in the BlockMesh Astarta OpenFOAM Native Meshers: blockMesh 1 May 23, 2011 15:39
Failed 5 mesh checks Astarta OpenFOAM Native Meshers: blockMesh 3 May 10, 2011 14:42
Iso Surface for a region FabioT FLUENT 0 December 9, 2010 07:05
Vorticity iso surface around propeller in CCM+ Dan CD-adapco 2 January 23, 2007 15:17


All times are GMT -4. The time now is 12:57.