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

How to extract data from specific domain instead of whole domain

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2023, 04:07
Red face How to extract data from specific domain instead of whole domain
  #1
New Member
 
Mach
Join Date: Jun 2023
Posts: 4
Rep Power: 3
MachEpoch is on a distinguished road
Hell everyone!
I would like to extract data near airfoil for particular study rather than to work on full domain data because it is too much resource consuming. Can you help me with any function present in openfoam for this particular task or in paraview.
Attached Images
File Type: jpg Screenshot from 2023-08-28 12-34-14.jpg (88.7 KB, 10 views)
MachEpoch is offline   Reply With Quote

Old   August 28, 2023, 04:26
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,200
Rep Power: 28
Yann will become famous soon enough
Hello,

In ParaView you can use the clip filter, with a "clip type: box" for instance to clip your domain and keep only the part you want to work with.

Cheers,
Yann
MachEpoch likes this.
Yann is offline   Reply With Quote

Old   August 28, 2023, 13:32
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by MachEpoch View Post
Hell everyone!
I would like to extract data near airfoil for particular study rather than to work on full domain data because it is too much resource consuming. Can you help me with any function present in openfoam for this particular task or in paraview.

One option would be to specify the restricted region and generate output files during the simulation. Would normally recommend the ensightWrite functionObject (for small output sizes with a static mesh), but the vtkWrite functionObject would work equally well.


If you check the documentation of ensightWrite, you will see that it supports a geometric selection mechanism:
Code:
        selection 
        { 
            box 
            { 
                action  use; 
                source  box; 
                box     (-0.1 -0.01 -0.1) (0.1 0.30 0.1); 
            } 
            dome 
            { 
                action  add; 
                shape   sphere; 
                origin  (-0.1 -0.01 -0.1); 
                radius  0.25; 
            } 
            centre 
            { 
                action  subtract; 
                source  sphere; 
                origin  (-0.1 -0.01 -0.1); 
                radius  0.1; 
            } 
            blob 
            { 
                action  add; 
                source  surface; 
                surface triSurfaceMesh; 
                name    blob.stl; 
            }

        }
Since these are also very much like topoSet, you can add/subset cellZones, cellSets etc.
With these functionObjects, you can specify which fields you wish to output as well.
saeed jamshidi likes this.
olesen is offline   Reply With Quote

Old   August 30, 2023, 03:04
Default
  #4
New Member
 
Mach
Join Date: Jun 2023
Posts: 4
Rep Power: 3
MachEpoch is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello,

In ParaView you can use the clip filter, with a "clip type: box" for instance to clip your domain and keep only the part you want to work with.

Cheers,
Yann
Thank You Yann, I got the desired result through this first applying clip then slice over it. Now I am trying get the data of every snapshot in one csv file , do you know any command for that or we have to write a python script?
MachEpoch is offline   Reply With Quote

Old   August 30, 2023, 03:09
Default
  #5
New Member
 
Mach
Join Date: Jun 2023
Posts: 4
Rep Power: 3
MachEpoch is on a distinguished road
Quote:
Originally Posted by olesen View Post
One option would be to specify the restricted region and generate output files during the simulation. Would normally recommend the ensightWrite functionObject (for small output sizes with a static mesh), but the vtkWrite functionObject would work equally well.


If you check the documentation of ensightWrite, you will see that it supports a geometric selection mechanism:
Code:
        selection 
        { 
            box 
            { 
                action  use; 
                source  box; 
                box     (-0.1 -0.01 -0.1) (0.1 0.30 0.1); 
            } 
            dome 
            { 
                action  add; 
                shape   sphere; 
                origin  (-0.1 -0.01 -0.1); 
                radius  0.25; 
            } 
            centre 
            { 
                action  subtract; 
                source  sphere; 
                origin  (-0.1 -0.01 -0.1); 
                radius  0.1; 
            } 
            blob 
            { 
                action  add; 
                source  surface; 
                surface triSurfaceMesh; 
                name    blob.stl; 
            }

        }
Since these are also very much like topoSet, you can add/subset cellZones, cellSets etc.
With these functionObjects, you can specify which fields you wish to output as well.
Thanks, I tried vtkWrite for this. I got some result butI was unable to verify that i am choosing correct region for my study. i am still looking over this. thanks for suggestion.
MachEpoch is offline   Reply With Quote

Reply

Tags
airfoil, domain, postprocess


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
[Commercial meshers] Problem with Mesh conversion from FLUENT Meshing to OpenFOAM mn17jyf OpenFOAM Meshing & Mesh Conversion 3 November 1, 2023 10:49
Extract data at a specific depth reespanau OpenFOAM Post-Processing 1 May 15, 2023 07:45
Turbomachinery Mass imbalance sheaker CFX 12 September 5, 2019 09:09
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 15:06
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 13:02


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