|
[Sponsors] |
Write U components of cells on a cuttingPlane |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 31, 2014, 05:58 |
Write U components of cells on a cuttingPlane
|
#1 |
New Member
Anoop
Join Date: Aug 2012
Posts: 1
Rep Power: 0 |
hi,
I am trying to write U components of all cells on a given cuttingPlane. Apparently there are a few compilation errors. Any help would be greatly appreciated. Heres the code snippet I used: Code:
# include "setRootCase.H" # include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" runTime.setTime(timeDirs[0], 0); IOobject Uheader ( "U", runTime.timeName(), mesh, IOobject::MUST_READ ); if (Uheader.headerOk()) { mesh.readUpdate(); Info<< " Reading U" << endl; volVectorField U(Uheader, mesh); Info<< " Calculating mass flux" << endl; point xyz(0,0,1); vector dir(0,0,1); plane plane1(xyz,dir); Foam::cuttingPlane cutPlane(plane1, mesh, true); const labelList& planeCell = cutPlane.cutCells(); forAll(planeCell, cellI) { Info<<"\n"<<mesh.C()[cellI]<<"\t"<<U[cellI].component(0); } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with divergence | TDK | FLUENT | 13 | December 14, 2018 06:00 |
[Helyx OS] Helyx-OS (GUI for SnappyHexMesh | elvis | OpenFOAM Community Contributions | 210 | January 30, 2017 18:57 |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 08:54 |
[blockMesh] "hex" blocks that give prism and tet wedge cells | MaryBau | OpenFOAM Meshing & Mesh Conversion | 1 | January 30, 2013 13:46 |
[Netgen] Import netgen mesh to OpenFOAM | hsieh | OpenFOAM Meshing & Mesh Conversion | 32 | September 13, 2011 05:50 |