|
[Sponsors] |
February 10, 2023, 15:20 |
Information & Useful utilities
|
#1 |
New Member
Nico
Join Date: Feb 2018
Location: Turin
Posts: 8
Rep Power: 8 |
Dear All,
i've a relatively simple question for the Openfoam community: Is it possible to loop over a specified set of faces and cells that have specified coordinates? I mean: Suppose i have a rectangular grid and suppose that i want to iterate over specified cells and faces that have specific coordinates : At my knowledge one should loop over the the cells, over the INTERNAL faces and over the BOUNDARY FACES and then he should check the coordinate singularly. Now, does someone know if there is a tool more specific for that? Thank you. |
|
February 11, 2023, 04:20 |
|
#2 |
Member
Join Date: Aug 2017
Location: Algeria
Posts: 98
Rep Power: 8 |
You may need to use:
Code:
mesh.findCell(position) For faces, you probably need to use: Code:
mesh.findNearestFace(position) // for boundary faces, use: mesh.findNearestBoundaryFace(position)
__________________
"When in doubt, use brute force." -- Ken Thompson |
|
February 11, 2023, 12:41 |
|
#3 |
New Member
Nico
Join Date: Feb 2018
Location: Turin
Posts: 8
Rep Power: 8 |
Thank you for your answer!
In general i'm looking for a way to get a "slice" of some points of the domain during the solution process: imagine that you have a rectangular mesh and for every ltime-step you must initialize the vertical field in a certain manner: The problem is that OpenFoam will loop over all the cells and faces with that function and i think that is not so computationally cheap. Maybe it will be worth to renumber the cells and the faces ( or creating a sort of key-value which maps my indexes to the indexes of openfoam). Anyway thanks for your reply |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 21:00 |
[General] Acces to information tab data | badoumba | ParaView | 0 | August 8, 2017 10:20 |
script for export particle information | archetype | CFX | 2 | August 8, 2017 09:57 |
OpenFOAM 2D simulation - Freelancer Job- Information will be provided | sanjar | CFD Freelancers | 0 | March 7, 2017 09:45 |
information from saved data files:Unsteady flow | Atul | FLUENT | 5 | July 27, 2008 20:05 |