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

who to find the cells with certain isoValue?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2016, 11:06
Default who to find the cells with certain isoValue?
  #1
New Member
 
jaming
Join Date: Dec 2010
Location: Berlin
Posts: 9
Rep Power: 15
jaming is on a distinguished road
Hi Foamers,

how to find the cells with certain isoValue?

Thanks
jaming is offline   Reply With Quote

Old   May 11, 2016, 17:33
Default
  #2
New Member
 
Clara
Join Date: Sep 2010
Location: Bruxelles
Posts: 16
Rep Power: 15
risku9 is on a distinguished road
Hi jaming,

You could loop over the cells if that's what you want, is this for post-processing? or for run time calculation, could you be more specific?

There might be a smarter way to do it depending on the scope.

Cheers
risku9 is offline   Reply With Quote

Old   May 12, 2016, 02:46
Default
  #3
New Member
 
jaming
Join Date: Dec 2010
Location: Berlin
Posts: 9
Rep Power: 15
jaming is on a distinguished road
Hi risku9

many thanks for your post!
I' m looking for cells containing the isoSurface while runTime.
For serial run I do it with :
after interpolating the alpha1 to the cellPoints in code (pValues)

Code:
Foam::List<int> IsoSurface50;
forAll(alpha1, celli){
    int a=0; b=0;
    labelList CellPoints = mesh.cellPoints()[celli];
    for (Foam::List<int>::iterator it = CellPoints.begin(); it != CellPoints.end(); it++){
        if (pValues[*it]<0.5 and a == 0){a++ ;}
        else if (pValues[*it]>=0.5 and b == 0){b++ ;}

                if (a==1 and b==1){count++; IsoSurface50.append(celli) ; break ;}
            }
        }
But for the parallel run I get some problems i.e. one cell on the ProcBoundaryPatch has a wrong value.

Many thanks
jaming is offline   Reply With Quote

Reply

Tags
cell, isosurface, isovalue, mesh


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
Problem with divergence TDK FLUENT 13 December 14, 2018 06:00
find the cell(s) related to maximum continuity residual enayath FLUENT 4 July 25, 2016 09:48
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 00:52
How to find adjacent cells evgenii OpenFOAM Running, Solving & CFD 3 September 27, 2008 02:03
a way to find out wall-neighboring cells? Christian FLUENT 4 May 10, 2002 08:30


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