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

(x,y,z) of cell center

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2012, 15:11
Default (x,y,z) of cell center
  #1
Member
 
ak
Join Date: May 2011
Posts: 64
Rep Power: 15
newOFuser is on a distinguished road
Hello,

Does anyone know how we can get (x,y,z) of cell centers in the mesh?

I want to access cells whose center's x coordinate lies 10mm either side of xo = 0.05

Thank you,
amit
newOFuser is offline   Reply With Quote

Old   January 23, 2012, 17:22
Default
  #2
Member
 
ak
Join Date: May 2011
Posts: 64
Rep Power: 15
newOFuser is on a distinguished road
i think i got it
mesh.C[celli].component(0) should work... (for x location)
newOFuser is offline   Reply With Quote

Old   January 23, 2012, 17:40
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Yes that is true, however, if this limit is static throughout the simulation, then you should consider cellSets combined with setsToZones. This will give you access to a cellZone inside the simulation, where the cells, which fulfill your spatial requirement, are listed.

In this way you do not have to recompile your solver in case you decide to change x0 or any other parameter.

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   June 24, 2013, 16:37
Default
  #4
New Member
 
Andrej
Join Date: Jun 2013
Posts: 6
Rep Power: 13
Zvex is on a distinguished road
Quote:
Originally Posted by ngj View Post
Yes that is true, however, if this limit is static throughout the simulation, then you should consider cellSets combined with setsToZones. This will give you access to a cellZone inside the simulation, where the cells, which fulfill your spatial requirement, are listed.

In this way you do not have to recompile your solver in case you decide to change x0 or any other parameter.

Kind regards,

Niels
Hello,

does it mean, that I can control the center of cells during calculations? I want to experiment with algorithm for choosing cell centers to minimize the non-orthogonality effects.

I really need it, because i've constructed a mesh with triangle prisms, with acute triangles - so using Voronoy points as cell centers would solve problems with errors because of non-orthogonality.

Forcing OpenFOAM to use my custom cell centers in ALL calculations - is it possible?

regards,
Andrej
Zvex 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
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 22:58
How to determine the location of the cell center zmester Main CFD Forum 0 October 11, 2009 07:58
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15
Warning 097- AB Siemens 6 November 15, 2004 05:41
About Cell Center Harry FLUENT 0 December 3, 2000 05:33


All times are GMT -4. The time now is 12:56.