|
[Sponsors] |
January 17, 2013, 21:33 |
How to get the cells coordinate
|
#1 |
New Member
Wang Han
Join Date: May 2012
Location: Shanghai China
Posts: 21
Rep Power: 13 |
Hi,foamers
Recently I get some troubles.The reslut store in the time file,e.g. 100,200. The value store the cell's value.But in the polyMesh folder,the points file store the point's coordinate.I don't find the cells file,only the cellZone file. I want to know, How can I get every cells coordinate?I can only see the point's coordinate, not the cell's. Thanks |
|
January 18, 2013, 10:32 |
|
#2 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18 |
Hi,
The cells file is not necessary to run the OpenFOAM applications. I don't understand what exactly you mean by the cell's coordinate, but you can access the coordinates of cell centers using the mesh.C(): Code:
forAll(U, cellI) { Info<< mesh.C()[cellI] << endl; //cell center coordinate of cellI } Hope that helps, Fumiya |
|
February 3, 2015, 23:53 |
Here's a utility I wrote to write the cell centers to a file at each specified time.
|
#3 |
Member
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11 |
Download, instructions, usage, and examples are here:
https://bitbucket.org/peterjvonk/cellcenters You can use the utility in the standard way, i.e.: Code:
$ cellCenters -latestTime Code:
$ mpirun -np <num-processors> cellCenters -parallel -latestTime Regards, Peter Last edited by opedrofunk; February 4, 2015 at 02:38. |
|
March 21, 2015, 15:05 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Peter: I've created a basic wiki page to help getting your cellCenters utility known to the community that uses OpenFOAM technology: http://openfoamwiki.net/index.php/Contrib/cellCenters May you or anyone else feel free to update that wiki page! Best regards, Bruno |
|
October 25, 2017, 03:51 |
|
#5 |
New Member
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 11 |
Hello,
I am trying to get cellCenters working for the past couple of days, but unfortunately I am having problems using it. I have attached the output here. Would be glad for any help! -------------------------------------------------------------------------------------- /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 4.1 Exec : cellCenters Date : Oct 25 2017 Time : 03:44:04 Host : "Ayush-Work" PID : 19641 Case : /media/ayushmorx/HD2/lownu_mine nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 5 Time = 5 --> FOAM FATAL IO ERROR: error in IOstream "/media/ayushmorx/HD2/lownu_mine/5/cellCenters" for operation Ostream& operator<<(Ostream&, const char) file: /media/ayushmorx/HD2/lownu_mine/5/cellCenters at line 18. From function virtual bool Foam::IOstream::check(const char*) const in file db/IOstreams/IOstreams/IOstream.C at line 96. FOAM exiting ---------------------------------------------------------------------------------------------------------------- |
|
March 21, 2022, 02:25 |
|
#6 | |
New Member
ZhuangLi
Join Date: Jan 2022
Posts: 13
Rep Power: 4 |
Quote:
Hi, Sorry to bother. I want to make sure that after using the cellcnter tool ,the order of cell center coordinate in OpenFOAM file is as same as the cellZones ' s order, what my think is right or not? Thanks in advance. _________________ Best regards Zhuangli |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 09:38 |
[Netgen] Import netgen mesh to OpenFOAM | hsieh | OpenFOAM Meshing & Mesh Conversion | 32 | September 13, 2011 05:50 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 21:11 |
[snappyHexMesh] snappyHexMesh aborting | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 10, 2010 03:23 |
physical boundary error!! | kris | Siemens | 2 | August 3, 2005 00:32 |