|
[Sponsors] |
Edge alignment in Boundary Layer y+ adaptation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 8, 2020, 08:26 |
Edge alignment in Boundary Layer y+ adaptation
|
#1 |
New Member
Join Date: Dec 2018
Posts: 6
Rep Power: 7 |
Hi everyone!
This is my very first post in the forum! I hope you can help me out with the problem I'm facing at the moment. (If my post is not in the correct forum channel, let me know ) NOTE: If you are not really interested on the explanation, at the bottom is the real question I am writing a functionObject which adapts (no refinement) the first layer cell thickness at runtime given a target y+ value. For this I impose a displacement on the first layer cells based on a ratio, and solving the cell displacement based on a custom equation. Currently, I have achieved to displace the first cell successfully, and adapting the rest of the cells in the far field with a smoothing algorithm. However, when I displace the cells towards the wall, the edges which originally were normal to the wall become a bit tilted. The problem is when the fist cell really close to the wall, since a small bit of distortion causes a big non-orthogonality on those cells, making my simulation crash. To this end, I implemented an edge correction for the first layer of cells which guarantees that the edges of the layer remain normal to the wall. But, then the layers above get distorted. Question: Is there a straightforward way to get the edges above (e.g. the next 5 layers), or keep the edges aligned? I have tried looking in the SnappyLayerDriver.C to come up with an analogy, but no success so far. I attach an image so the problem is better understood. Thanks in advance!!! Guillermo |
|
May 12, 2020, 21:47 |
|
#2 |
New Member
Fan
Join Date: Apr 2020
Posts: 5
Rep Power: 5 |
Hi GBarraza,
I'm sorry I don't have the ability to answer your question, but I have a question similar to yours. I want to know, can you modify the grid points by judging the speed in the grid points? for example, when the speed reaches a certain value, Increase the position of the grid point in the z direction. I would be very grateful if you could answer me. Best wishs for you! Fann |
|
May 13, 2020, 07:17 |
|
#3 | |
New Member
Join Date: Dec 2018
Posts: 6
Rep Power: 7 |
Hi Fann,
with regards to your question : Quote:
I'll leave you an example: Code:
//Interpolation of velocity field U const volVectorField& U = mesh_.lookupObject<const volVectorField>("U"); interpolationCellPoint<vector> UInterp(U); //Reference to mesh points field pointField& points = mesh_.points(); //Probably you iterate over boundaries, cell points, etc... //Example iterating over every cell's points forAll(cellPointLabels, pointI) { if (mag(UInterp[pointI]) > 10.0) { //Displacing your point by one unit in the z-direction points[pointI] = points[pointI] + vector(0,0,1) } } //Move the points mesh_.movePoints(points); I hope that helps you. Guillermo |
||
May 13, 2020, 07:21 |
|
#4 |
New Member
Join Date: Dec 2018
Posts: 6
Rep Power: 7 |
||
May 13, 2020, 16:47 |
|
#5 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12 |
Hi
- Is it possible to elaborate how you had managed to solve the issue, if possible? Many thanks.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 14, 2020, 04:53 |
|
#6 |
New Member
Join Date: Dec 2018
Posts: 6
Rep Power: 7 |
Sure,
As for how I managed to get the off-plane edges of the layers above the first I: 1. iterate over all patch faces, get the cell corresponding to the face and the opposing face of the boundary face. 2. Iterate over all edges of each cell and get those which are not contained neither in the boundary face nor in its opposing face. 3. Use faceOwner (or faceNeighbour) to get the cell at the other side of the opposing face. 4. Repeat the procedure for all the layers wanted. Important to notice, it has the assumption that all the cells on the boundary are hex (or boundary layer cells). To keep the edges aligned, I simply did a vector projection from the edges of the new mesh into the edges of the old one. I hope it helps of something. Guillermo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 58 | July 3, 2020 01:13 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 05:15 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 17:44 |
[snappyHexMesh] Boundary layer in a pipe | Clementhuon | OpenFOAM Meshing & Mesh Conversion | 6 | March 12, 2012 12:41 |