|
[Sponsors] |
May 27, 2022, 01:31 |
capturing cell center to center distances
|
#1 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5 |
Hi guys,
I added a code for getting cell center to center distance. And I want only the center to center distances on x direction. But i am not getting the expected result. I am attaching the code Code:
const unallocLabelList& neighbour = mesh.neighbour(); const unallocLabelList& owner = mesh.owner(); const volVectorField& C = mesh.C(); forAll(owner, facei) { vector delta = C[neighbour[facei]] - C[owner[facei]]; const dimensionedScalar len("len",dimLength,delta.component(vector::X)); Info << "len: " << len.value() << " m" <<endl; } But i am getting worng result. I am attaching the result Code:
len: 0.01 m len: -8.67362e-19 m len: 0.01 m len: 1.73472e-18 m len: 0.01 m len: 0 m len: 0.01 m len: 6.93889e-18 m len: 0.01 m len: 2.08167e-17 m len: 0.01 m len: 6.93889e-18 m len: 0.01 m len: 0 m len: 0.01 m len: -1.38778e-17 m len: 0.01 m len: 1.38778e-17 m len: 0.01 m len: 0 m len: 0.01 m len: 2.77556e-17 m len: 0.01 m len: -1.38778e-17 m len: 0.01 m len: 0 m len: 0.01 m len: -2.77556e-17 m len: 0.01 m len: -2.77556e-17 m len: 0.01 m len: -2.77556e-17 m len: 0.01 m len: 0 m len: 0.01 m len: -2.77556e-17 m len: 0.01 m len: 2.77556e-17 m len: 0.01 m len: -2.77556e-17 m len: 0.01 m len: -5.55112e-17 m len: 0.01 m len: -8.32667e-17 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 5.55112e-17 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: -5.55112e-17 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: -5.55112e-17 m len: 0.01 m len: 0 m len: 0.01 m len: 5.55112e-17 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 0 m len: 0.01 m len: 5.55112e-17 m len: 0.01 m len: -5.55112e-17 m Thanks in advance Last edited by saicharan662000@gmail.com; May 27, 2022 at 05:48. |
|
Tags |
openfoam, openfoam8 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use "translation" in solidBodyMotionFunction in OpenFOAM | rupesh_w | OpenFOAM Running, Solving & CFD | 5 | August 16, 2016 05:27 |
How can I define the cell centers without using writeCellCenters? | Taylorreihe | OpenFOAM Post-Processing | 4 | February 19, 2016 13:46 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 15:06 |
Using a custom algorithm for cell center calculations | Zvex | OpenFOAM Programming & Development | 7 | June 30, 2013 06:01 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |