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

Measure the surface of the faces of a triangulated cutting plane

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 17, 2016, 11:07
Default Measure the surface of the faces of a triangulated cutting plane
  #1
New Member
 
Matteo Cerminara
Join Date: Feb 2012
Posts: 15
Rep Power: 7
Pagoda is on a distinguished road
Dear Foamers,
I am using the cuttingPlane class to evaluate integrals over a slice of the three-dimensional domain.

I need to use cuttingPlane itself, not function objects, because I have to take the slice only on a subset of the whole domain.

My problem is how to measure the surface of the portion of plane inside a prescribed cell.

To be more clear, given the cell indexes of the domain subset "subSetCells", and a field to be integrated "U", this is the code I use:
Code:
\\ plane base point and vector
point pt(0,0,1);                  
dir (0,0,1);
plane pln(pt, dir);

\\ cutting plane triangulated (true), over a mesh subset
cuttingPlane cutPln(pln, mesh, true, subSetCells); 
labelList cutLabels = cutPln.cutCells();


\\ loop over all the cut faces
scalar US(0);
scalar S(0);
forAll(cutLabels, labelI)
{
    scalar ui = U[cutLabels[labelI]];
    scalar Si = ???????     // this should be the surface of the triangulated plane
    US += ui*Si;
    S += Si;
}
US /= S;
Any idea?

Kind regards,
Matteo
Pagoda is offline   Reply With Quote

Old   May 12, 2017, 15:10
Default I have similar problem
  #2
New Member
 
Ashish Kumar
Join Date: Jun 2015
Posts: 7
Rep Power: 4
ashish.svm is on a distinguished road
I want to calculate the area of the plane of intersection in a grid block.

For example, if blockMesh is used then I want to find out the area of the plane of intersection with a cube.

ashish.svm 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 78 April 29, 2017 08:17
Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Native Meshers: snappyHexMesh and Others 50 March 7, 2016 03:35
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 10:37
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 00:38.