(x,y,z) of cell center
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
i think i got it
mesh.C[celli].component(0) should work... (for x location)
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.
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?
|All times are GMT -4. The time now is 03:03.|