|
[Sponsors] |
interface reconstruction and point value access |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 12, 2015, 20:39 |
interface reconstruction and point value access
|
#1 |
Member
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 39
Rep Power: 11 |
Hello all,
Im looking to utilize interface reconstruction and require access to alpha.water, for a given cell, at all 8 points (assuming i'm using a hex). I have seen: http://www.cfd-online.com/Forums/ope...ize-x-y-z.html and it gets me close as I have dropped some "Info << stuff << endl;" lines in interfoam to see what all of the definitions are in the above link: Code:
const faceList & ff = mesh.faces(); const pointField & pp = mesh.points(); forAll ( mesh.C(), celli) { const cell & cc = mesh.cells()[celli]; labelList pLabels(cc.labels(ff)); pointField pLocal(pLabels.size(), vector::zero) forAll (pLabels, pointi) { pLocal[pointi] = pp[pLabels[pointi]]; scalar xDim = Foam::max(pLocal & vector(1,0,0)) - Foam::min(pLocal & vector(1,0,0)); Info << endl << "celli: " << celli << endl; Info << "pointi: " << pointi << endl; Info << "pLabels[pointi]: " << pLabels[pointi]<< endl; Info << "pLocal[pointi]: " << pLocal[pointi]<< endl; Info << "pLocal: " << pLocal<< endl; // And similar for yDim and zDim } } Code:
grep -n "0.146 0.289199 0.0146" ~/Desktop/damBreak/log" Code:
celli: 2265 pointi: 2 pLabels[pointi]: 6817 pLocal[pointi]: (0.146 0.289199 0.0146) pLocal: 8((0.146 0.282499 0) (0.146 0.289199 0) (0.146 0.289199 0.0146) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0)) ... celli: 2266 pointi: 5 pLabels[pointi]: 6817 pLocal[pointi]: (0.146 0.289199 0.0146) pLocal: 8((0.152636 0.282499 0) (0.152636 0.289199 0) (0.152636 0.289199 0.0146) (0.152636 0.282499 0.0146) (0.146 0.289199 0) (0.146 0.289199 0.0146) (0 0 0) (0 0 0)) So, I would like to gain access to alpha.water's point values during runtime in the same manner paraview would such that I can derive other fields based on the point values for alpha.water. Thanks for your time! PS any input on decoding the meaning of the definitions in the code snippet above is welcome ; ) James Last edited by wyldckat; May 18, 2015 at 15:57. Reason: fixed link |
|
Tags |
cell id, interface reconstruction, interfoam, point id |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reconstruction of the parallel case with dynamic mesh | makaveli_lcf | OpenFOAM Post-Processing | 7 | October 18, 2023 11:28 |
VOF: Trouble in interface reconstruction | alame005 | Main CFD Forum | 0 | February 14, 2013 15:52 |