|
[Sponsors] |
January 24, 2023, 03:51 |
minimum particle wall distance
|
#1 |
New Member
NewtonianGuy
Join Date: Jun 2020
Posts: 10
Rep Power: 6 |
I have the following method using the wallDist Class to compute the minimum distance to a wall from a particle position with a correction factor based on particle position within a cell. However, I want to know which PatchID is the closest ? There is a member function of the WallDist Class named PatchIDLists but it has all wall patchIDs...
Code:
//Minimum distance to wall from cell position const scalar yw_cell = wallDist::New(this->owner().mesh()).y()[p.cell()]; //Cell position const vector cell_pos = this->owner().mesh().C()[p.cell()]; // Particle position const vector p_pos = p.position(); // Wall normal in const vector normal_wall = -wallDist::New(this->owner().mesh()).n()[p.cell()]; const scalar projection = (p_pos - cell_pos) & normal_wall; scalar distanceWall = 0; if (projection >0) { distanceWall = yw_cell + projection; } else { distanceWall = yw_cell - mag(projection); } |
|
Tags |
lagrangian, particles |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Particle Wall Distance | Joseph19 | FLUENT | 0 | July 21, 2022 12:16 |
[Commercial meshers] Fluent3DMeshToFoam | simvun | OpenFOAM Meshing & Mesh Conversion | 50 | January 19, 2020 16:33 |
Particle tracking error | alchem | OpenFOAM Bugs | 5 | May 6, 2017 17:30 |
Dimensionless wall distance | messik | Main CFD Forum | 4 | March 15, 2014 07:55 |
forced to sticking of soot particle | kmgraju | CFX | 0 | November 27, 2012 10:08 |