CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Problem / Misunderstanding with mesh.C() : get the cell centers

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2020, 18:55
Default
  #21
New Member
 
Join Date: May 2020
Location: India
Posts: 4
Rep Power: 6
Action.Kamen is on a distinguished road
Just an update (quite unrelated to question asked here)

C() is now --> cellCentres() [Link : ]

internalField() is now--> primitiveField() [Link : https://develop.openfoam.com/Develop...b062154026d34]


So mesh.c().internalField()[x][y] would now be mesh.cellCentres.primitiveField()[x][y]
Action.Kamen is offline   Reply With Quote

Old   June 15, 2020, 04:49
Default
  #22
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Action.Kamen View Post
Just an update (quite unrelated to question asked here)

C() is now --> cellCentres() [Link : ]

internalField() is now--> primitiveField() [Link : https://develop.openfoam.com/Develop...b062154026d34]


So mesh.c().internalField()[x][y] would now be mesh.cellCentres.primitiveField()[x][y]

Not quite I think. Using mesh.cellCentres() returns the centres for each cell, you cannot start addressing this as [x][y] and hope that it will work.
olesen 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
Cell Reynolds Number laliong Main CFD Forum 12 September 17, 2019 04:18
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
Cell face values computation un unstructured grids Sergio Rossi Main CFD Forum 2 May 28, 2006 11:04
May I use global coordinate of cell centers in subroutine Posdat H. Shen Siemens 4 March 29, 2000 10:20
extremely simple problem... can you solve it properly? Mikhail Main CFD Forum 40 September 9, 1999 10:11


All times are GMT -4. The time now is 22:00.