|
[Sponsors] |
April 6, 2022, 13:35 |
Access y coordinate next to a wall pach
|
#1 |
New Member
Kermit
Join Date: Jan 2021
Location: France
Posts: 19
Rep Power: 5 |
Hello everyone,
I'm having difficulties to access the y coordinate of the wall patches of my test case. Here is the code I use: Code:
const fvPatchList& patches = this->mesh_.boundary(); forAll(patches, patchi) { const fvPatch& curPatch = patches[patchi]; if (isA<wallFvPatch>(curPatch)) { forAll(curPatch, facei) { label celli = curPatch.faceCells()[facei]; const double y = curPatch.Cf()[facei].y(); // 0.0003; Info << "\n\n" << y << endl; epsilon_[celli] = 2.0 * nu_[celli] * k_[celli] / y / y; // epsilon_[celli] = 2.0 * nu_[celli] * k_[celli] / mag(y) / mag(y); } } } Despite the fact that no errors are detected during the compilation, the simulation crashes before it completes the first step. I found that the simulation crashes at the line where epsilon_[celli] is evaluated and that it is because y is equal to 0... Do you have any idea why my code isn't working? Thanks for your support! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Enhanced Wall Treatment | paduchev | FLUENT | 24 | January 8, 2018 11:55 |
Macros to access the laminar viscosity at wall boundary? | lgning | Fluent UDF and Scheme Programming | 0 | October 28, 2016 18:09 |
Node Coordinate and ID on Boundary Wall | phanh | STAR-CCM+ | 1 | September 25, 2014 08:32 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
Wall functions | Abhijit Tilak | Main CFD Forum | 6 | February 5, 1999 01:16 |