|
[Sponsors] |
December 15, 2018, 15:13 |
patchIntegrate in OF-6 & previous versions
|
#1 |
New Member
Join Date: Dec 2018
Posts: 1
Rep Power: 0 |
Hello Foamers,
I am doing a simulation for heat transfer in a CPU cooler using laplacianFoam. I want to calculate the integral of a field (e.g. gradTz) over a boundary/patch. In OF-2.1.1, patchIntegrate utility <patchIntegrate -latestTime gradTz EXCHANGE_SURFACE> gives the output: Time = 240 Area vector of patch EXCHANGE_SURFACE[0] = (-1.10854e-17 1.18664e-19 0.0013702) Area magnitude of patch EXCHANGE_SURFACE[0] = 0.0188973 Reading volScalarField gradTz Integral of gradTz over vector area of patch EXCHANGE_SURFACE[0] = (1.0814e-08 -7.43949e-08 -0.00792159) Integral of gradTz over area magnitude of patch EXCHANGE_SURFACE[0] = -2.36515 End In OF-6, patchIntegrate utility is replaced by a postProcess function <postProcess -latestTime -func 'patchIntegrate(name=EXCHANGE_SURFACE,gradTz)'> which gives the following output: surfaceFieldValue patchIntegrate(name=EXCHANGE_SURFACE,gradTz): total faces = 52131 total area = 0.0188973 Time = 240 Reading fields: volScalarFields: gradTz Executing functionObjects surfaceFieldValue patchIntegrate(name=EXCHANGE_SURFACE,gradTz) write: areaIntegrate(EXCHANGE_SURFACE) of gradTz = -2.36514 End My queries are: 1) How can I get integral-over-vector-area (xValue yValue zValue) along with the magnitude in OF-6 as it shows in OF-2.1.1? 2) Integral-over-area magnitude is not the magnitude of integral-over-vector-area vector. What is the relation b/w integral over vector area and integral over area magnitude? |
|
August 30, 2019, 13:15 |
|
#2 |
New Member
Rodrigo Miranda
Join Date: Aug 2019
Posts: 1
Rep Power: 0 |
Hello,
I am having the same trouble. Did you find the solution? |
|
May 13, 2020, 06:25 |
|
#3 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7 |
Quote:
I am using OF v7. and I can not succesfully achive to have integrate a field in a patch.... I have done a research in the forum and finish with this (averaged pressure over the boundary and this New Documentation: Field Function Objects) but I can not make them work, maybe because it is for 1912v? i dont know.... and I could not find any documentation in OF v7 to solve this... have any of you succesfully done it? I only want to extract the average T from a scalarTransport simulation for each time, and the mass flow average in inlet/outlet and pressure inlet at the last time in a simpleFoam simulation. I wanted to add them to the controlDict so they are all together in the same file . I have sepend at least two days looking only how to do this, without succes... best regards |
||
May 13, 2020, 17:43 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi
- Various functionalities do not exist within all the OpenFOAM variants. Therefore, one functionality may exist only in a single variant. Yet it is usually manageable to transfer them across. But the easiest solution is to install all variants at the same time. - You can use `fieldAverage` FO on `T` to obtain time-averaged T? - Or if you want to sample `T`, you can use various `sample` functionalities. - To monitor the mass flow through given patches, you can use various functionalities. One can be surfaceFieldValue function object. Hope this helps.
__________________
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 13, 2020, 19:34 |
|
#5 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7 |
Quote:
postProcess -latestTime -func 'patchIntegrate(name=inlet,p)' gived me the average as i was looking for, and also i can used with U but at least from my pre test it was not the correct answer as postProcess -latestTime -func 'patchIntegrate(name=inlet,U)' did not gave me the same value that i fixed in the inlet patch (was a fixed value in U file). I assume that postProcess -func 'patchIntegrate(name=inlet,T)' and postProcess -func 'patchIntegrate(name=outlet,T)' will give me what i am looking for (average T at inlet and outlet, as i am trying to measure an RTD and not temperature...). but this is for post process so I can use it only in the stocked writenTimes, when if I could use it at the same time as the solver, i could stock only this average T in the inlet and oultet at all times even if I decide not to write the rest of the information. And this https://www.openfoam.com/documentati...ieldValue.html was exactly what i was trying to do, i saw your original post, and find the field function, read it, but when i tried in V7. it didnot work, i found some surfacesFieldValue in etc folder, but it was quiet cryptic, and non information at all in the V7 guide user. sadly i need to develop in this version as we have a small server to run it and i can not install the other vr. but yes, surfaceFieldValue was exactly what i was trying to do.... |
||
May 18, 2020, 18:02 |
|
#6 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
Can't you compile these function objects of OF1912 into OF7?
__________________
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 20, 2020, 06:15 |
|
#7 |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7 |
||
Tags |
boundary, integrate field, patch, patchintegrate |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Using different MPI types and versions with OpenFOAM | spaceprop | OpenFOAM Installation | 2 | May 28, 2018 04:31 |
Kernel for new CPUs | Simbelmynë | Hardware | 22 | January 5, 2018 17:41 |
[OpenFOAM.org] Problem installation OpenFOAM-dev | FlyingCat | OpenFOAM Installation | 15 | December 31, 2017 12:53 |
interFoam pressure miscalculation in 2.3 (wrt previous versions) | Phicau | OpenFOAM Bugs | 6 | November 25, 2015 10:42 |
OpenFOAM v.2.x Courant Number 4 time higher then in previous versions | makaveli_lcf | OpenFOAM Running, Solving & CFD | 8 | February 18, 2012 22:28 |