|
[Sponsors] |
How to extract variables at boundary and internal cells !! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 14, 2020, 09:07 |
How to extract variables at boundary and internal cells !!
|
#1 | |
Senior Member
|
Hello Foamers, Hope everyone doing good. Here in the attachment, the image contains nodal points at boundary and internal cells for 1D problem.
POINT 0 - Boundary node POINTS 1,2,3 - Internal nodes In order to extract variables at the boundary node (@ POINT 0), the below code was implemented, compiled good and end with reasonable results. Quote:
Kindly someone share some ideas. Thank you |
||
August 14, 2020, 14:52 |
|
#2 |
New Member
Jaganathan
Join Date: Sep 2019
Posts: 2
Rep Power: 0 |
I have similar issues with 3D model.
Cell-centred calculation for internal cells is optable in my case. |
|
August 14, 2020, 23:30 |
|
#3 | |
Member
Ran
Join Date: Aug 2016
Posts: 69
Rep Power: 10 |
Quote:
You can access the `k` value by referencing the cellId` `scalar k = turbulence->k()()[cellId];` Then interpolated it to the patch face. After that, interpolated it to the node of your interest. I never did this before, but I speculate there's mature functions to let you do this within native OpenFOAM.
__________________
Yours in CFD, Ran |
||
August 15, 2020, 12:49 |
|
#4 | |
Senior Member
|
Thank you for your response, Jaganathan and Ran.
Accessing the cellId may be required for specific purpose (for example, to imply the source term). Near the boundary, the cell ids are accessed through the boundary condition. So, I have created a patch based on boundaryMesh and obtained the values at the boundary. For obtaining values at internal cells, I tried accessing neighbor cells, as in code below. Quote:
Kindly share your thoughts. Thank you |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SimpleFoam & Theater | jipai | OpenFOAM Running, Solving & CFD | 3 | June 18, 2019 11:11 |
[blockMesh] Create internal faces as patch in blockMesh | m.delta68 | OpenFOAM Meshing & Mesh Conversion | 14 | July 12, 2018 15:43 |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 04:21 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[Netgen] Import netgen mesh to OpenFOAM | hsieh | OpenFOAM Meshing & Mesh Conversion | 32 | September 13, 2011 06:50 |