CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM

Creating arbitrary surfaces in meshed domain

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2011, 05:17
Default Creating arbitrary surfaces in meshed domain
  #1
suh
New Member
 
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 20
Rep Power: 5
suh is on a distinguished road
hi,

Please tell me that how to create arbitrary surfaces (or somthing like that) (other than predefined patches) to calculate area or mass weighted averages of any function for postprocessing in predefined+meshed+solved domain openfoam 1.7.1?

thanks in advance

Last edited by suh; July 21, 2011 at 05:38.
suh is offline   Reply With Quote

Old   July 21, 2011, 20:01
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,889
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by suh View Post
Please tell me that how to create arbitrary surfaces (or somthing like that) (other than predefined patches) to calculate area or mass weighted averages of any function for postprocessing in predefined+meshed+solved domain openfoam 1.7.1?
The sample-utility allows you to sample field data on so called sampledSurfaces (there is a file called sampleDict with the sources of the utility that shows which of these can be specified, I'm afraid that is all the documentation you're going to find - at least to my knowledge) and write them out for graphical postprocessing

The library swak4foam (search the board or google) allows you to do calculations on these surfaces (but it builds on the same mechanism, so sampleDict will give you an idea which surfaces are possible)
gschaider is online now   Reply With Quote

Old   July 22, 2011, 09:51
Default
  #3
suh
New Member
 
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 20
Rep Power: 5
suh is on a distinguished road
Thank you for replying..

Actually i done with that thing, but problem is that i want to use patchAverage <field> <requiredsurface> , so that i can directly know about mass or area weighted average on that particular surface (not a predefined boundary).

but how to get that individual surface from domain to calculate like this that i dont know.

or is there any way to calculate area or mass weighted averages on arbitrary surfaces in domain in any postprocessing software coming with openfoam.

thank you for your precious time.
plz reply..
suh is offline   Reply With Quote

Old   August 5, 2011, 06:33
Default
  #4
Member
 
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 7
CedricVH is on a distinguished road
You can use the patchAverage function as a funtionObject on a plane by adding some code to your controlDict. In the following code, an area weighted average of the pressure is calculated every outputTime (when the data is written) on a plane that is given by a base point and a normal vector.

In the sampledSurfaceDict, you can also use other types of planes (see examples in $FOAM_APP/applications/utilities/postProcessing/sampling/sample/sampleDict file)

Code:
functions
(
    new_plane
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled         true;
        outputControl   outputTime;
        log             true;
        valueOutput     true;
        source          sampledSurface;
        sampledSurfaceDict
        {
            type            plane;    // always triangulated
            basePoint       (0.0501 0.0501 0.005);
            normalVector    (0.1 0.1 1);
        }
        operation       areaAverage;
        fields
        (
            p
        );
    }
)
CedricVH is offline   Reply With Quote

Old   August 5, 2011, 09:31
Default
  #5
suh
New Member
 
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 20
Rep Power: 5
suh is on a distinguished road
Thank you.

I will try this and let u know.

Regards
Suhas
suh is offline   Reply With Quote

Old   July 4, 2012, 16:56
Default
  #6
Member
 
ak
Join Date: May 2011
Posts: 71
Rep Power: 5
newOFuser is on a distinguished road
Hi Suhas and Cedric,

I tried running the code and got the following error:
keyword sourceName is undefined in dictionary

Could you please suggest how to get rid of this error? I use OF 1.7.1

The code works when I define source as patch and sourceName as inlet. But I'd like to perform the calculations on an internal plane, within the mesh.

Thanks so much,
amit
newOFuser is offline   Reply With Quote

Reply

Tags
create arbitrary surface

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
Importing or Creating 2D Flat Surfaces into CFX Sam CFX 5 March 30, 2013 13:11
Vertical Axis Wind Turbine Rotating Domain Problems TWaung CFX 4 May 1, 2012 04:14
CFX - domain decomposition. Urgent!!!! Elena Saldaeva CFX 4 June 30, 2008 08:18
Help with creating a plane in the domain Tony CFX 2 September 14, 2004 19:12
meshing F1 front wing Steve FLUENT 0 April 17, 2003 13:37


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