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

Creating arbitrary surfaces in meshed domain

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By CedricVH
  • 1 Post By newOFuser

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2011, 04:17
Default Creating arbitrary surfaces in meshed domain
  #1
suh
New Member
 
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 21
Rep Power: 14
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 04:38.
suh is offline   Reply With Quote

Old   July 21, 2011, 19:01
Default
  #2
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 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 offline   Reply With Quote

Old   July 22, 2011, 08:51
Default
  #3
suh
New Member
 
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 21
Rep Power: 14
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, 05:33
Default
  #4
Member
 
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 16
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
        );
    }
)
manoj_nav likes this.
CedricVH is offline   Reply With Quote

Old   August 5, 2011, 08:31
Default
  #5
suh
New Member
 
Suhas
Join Date: Jul 2011
Location: Pune
Posts: 21
Rep Power: 14
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, 15:56
Default
  #6
Member
 
ak
Join Date: May 2011
Posts: 64
Rep Power: 14
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
manoj_nav likes this.
newOFuser is offline   Reply With Quote

Old   December 20, 2017, 22:14
Default
  #7
New Member
 
Bingchuan
Join Date: Dec 2017
Posts: 16
Rep Power: 8
bingchuan is on a distinguished road
Quote:
Originally Posted by newOFuser View Post
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
Have you solved this problem?
I am facing the same issue now, Could you please share your experience?
Thanks.

Bests,
Bingchuan
bingchuan is offline   Reply With Quote

Old   August 20, 2019, 13:27
Default pressure area average over a plane
  #8
New Member
 
Join Date: Aug 2011
Location: Toronto
Posts: 1
Rep Power: 0
Behtash is on a distinguished road
Hello all,

I tried the function recommended by CedricVH to obtain the area averaged pressure over a plane and it did not work

I want to define a plane in the fluidized bed to obtain the area average pressure over an arbitrary plane either on the fly or at the end of the simulation. I have tried to define a Function object and also tried TopoSet but could not figure it out. Can you please guide me to an example or explain the best approach to do this. I imported the mesh from workbench Ansys and using OpenFOAM v6.

Thanks!
Behtash is offline   Reply With Quote

Reply

Tags
create arbitrary surface


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


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