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

Write U components of cells on a cuttingPlane

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2014, 05:58
Default Write U components of cells on a cuttingPlane
  #1
New Member
 
Anoop
Join Date: Aug 2012
Posts: 1
Rep Power: 0
oopsi is on a distinguished road
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);
    }
    }
oopsi is offline   Reply With Quote

Reply


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
[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


All times are GMT -4. The time now is 05:29.