|
[Sponsors] |
April 22, 2017, 17:54 |
generating a random location in a cell
|
#1 |
New Member
Hesam
Join Date: Jun 2016
Posts: 6
Rep Power: 10 |
Good day to everyone.
I need to generating a random location in a certain cell. Is there anyone who can guide me? Thanks in advance. |
|
April 23, 2017, 07:08 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Take two (x,y) or three (x,y,z) random numbers around the cell center with s spread of slightly more than the "radius" of the cell. Chef if the point is in the inner of the cell. If not take another pair / tripel.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to determine the direction of cell face vectors on processor patches | sebastian_vogl | OpenFOAM Programming & Development | 1 | October 11, 2016 14:17 |
location of each cell | hawkeye321 | OpenFOAM | 6 | November 17, 2012 16:15 |
location of cell | hawkeye321 | OpenFOAM Running, Solving & CFD | 1 | October 4, 2012 03:48 |
ParaView and Qt 4.3.5 on Mac OS X 10.6 | Adrian | OpenFOAM | 3 | August 8, 2010 04:16 |
Ghost cell location for inclined cavity flow | zonexo | Main CFD Forum | 13 | September 9, 2005 03:00 |