|
[Sponsors] |
How to get boundary values using graph post-process function? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 69
Rep Power: 15 ![]() |
Hi all,
To exemplify my question I will use a 1D steady state conduction case, presented here in section "1.1 Part A: Steady-State conduction" (case attached in OF 12). What I want is to plot the temperature, T, along x axis from one boundary to the other (y and z position doesn't matter here). Using the graphCell post-processing function, I get the exact cell center values inside the domain. But, I want also to get the values on the boundaries, i.e., T at x=0 m and x=0.2 m. For this, I thought I should use graphCellFace function which says: "One graph point is generated on each face and in each cell that the line intersects.". However, using the following configuration for graphCellFace, I can't get the correct values for the temperature at the boundaries, as shown bellow. Code:
start (0.0 0.5 0.005); end (0.2 0.5 0.005); fields (T); axis x; // The independent variable of the graph. Can be "x", // "y", "z", "xyz" (all coordinates written out), or // "distance" (from the start point). #includeEtc "caseDicts/functions/graphs/graphCellFace.cfg" Code:
# x T 0 390.535 0.005 390.5 0.01 388 0.015 385.5 0.02 383 0.025 380.5 intermediate values ommited for simplicity... 0.175 305.5 0.18 303 0.185 300.5 0.19 298 0.195 295.5 0.2 295.465 The question is, how to get the correct values on the boundaries? P.S.: I don't want to use paraview.
__________________
Field of interest: heat transer. OpenFOAM Foundation's distribution user. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 792
Rep Power: 14 ![]() |
You need to adjust the interpolationScheme from cellPoint to cellPointFace, and the line type from lineCell to lineFace.
You had already pretty much done the second of these by including graphCellFace.cfg, but this also includes graph.cfg which sets interpolationScheme to cellPoint. I understand OF's use of include files, but sometimes its just easier to have all the parameters visible and in one file, eg: Code:
type sets; libs ("libsampling.so"); writeControl writeTime; start (-0.1 0.5 0.005); end (0.2 0.5 0.005); fields (T); axis x; //interpolationScheme cellPoint; interpolationScheme cellPointFace; setFormat raw; sets ( line { //type lineCell; type lineFace; axis $axis; start $start; end $end; } ); Code:
# x T 0 393 0.01 388 0.02 383 ... 0.16 313 0.17 308 0.18 303 0.19 298 |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 69
Rep Power: 15 ![]() |
Hi Tobermory,
Thank you for the answer. You are right. I think this should be corrected since when we choose for graphCellFace we want this face values at boundaries. In a more complex case this error could result in many problems, for example, when trying to validate results near walls. Here is a corrected version of the graphCellFace, still using the include files. Code:
start (-1e-6 0.5 0.005); //setting the start point a bit before 0.0 end (0.200001 0.5 0.005); //setting the end point a bit after 0.2 fields (T); axis x; // The independent variable of the graph. Can be "x", // "y", "z", "xyz" (all coordinates written out), or // "distance" (from the start point). #includeEtc "caseDicts/functions/graphs/graphCellFace.cfg" interpolationScheme cellPointFace; //this line MUST be after the #includeEtc command Code:
# x T 0 393 0.001 392.5 0.002 392 0.003 391.5 ... 0.197 294.5 0.198 294 0.199 293.5 0.2 293
__________________
Field of interest: heat transer. OpenFOAM Foundation's distribution user. Last edited by thiagopl; January 29, 2025 at 07:55. Reason: Add results |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
../externals/cgns/hdf5/H5public.h:63:10: fatal error: mpi.h: No such file or director | Mohsin1 | SU2 | 8 | November 25, 2023 04:46 |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 18:38 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 01:00 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |