CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

patchIntegrate in OF-6 & previous versions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2018, 14:13
Default patchIntegrate in OF-6 & previous versions
  #1
New Member
 
Join Date: Dec 2018
Posts: 1
Rep Power: 0
my101 is on a distinguished road
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?
my101 is offline   Reply With Quote

Old   August 30, 2019, 12:15
Default
  #2
New Member
 
Rodrigo Miranda
Join Date: Aug 2019
Posts: 1
Rep Power: 0
rodrigo_barret0 is on a distinguished road
Hello,


I am having the same trouble. Did you find the solution?
rodrigo_barret0 is offline   Reply With Quote

Old   May 13, 2020, 05:25
Default
  #3
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 117
Rep Power: 3
otaolafr is on a distinguished road
Quote:
Originally Posted by rodrigo_barret0 View Post
Hello,


I am having the same trouble. Did you find the solution?
hello, I am facing a similar issue (without the experience of using past versions)
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
otaolafr is offline   Reply With Quote

Old   May 13, 2020, 16:43
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 900
Rep Power: 10
HPE is on a distinguished road
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.
HPE is offline   Reply With Quote

Old   May 13, 2020, 18:34
Default
  #5
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 117
Rep Power: 3
otaolafr is on a distinguished road
Quote:
Originally Posted by HPE View Post
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.
hi HPE,
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....
otaolafr is offline   Reply With Quote

Old   May 18, 2020, 17:02
Default
  #6
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 900
Rep Power: 10
HPE is on a distinguished road
Hi,

Can't you compile these function objects of OF1912 into OF7?
HPE is offline   Reply With Quote

Old   May 20, 2020, 05:15
Default
  #7
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 117
Rep Power: 3
otaolafr is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

Can't you compile these function objects of OF1912 into OF7?
hello, just to clarify, I found the function objects in OF7 the issue is that the "writeControl" options are differents and OF7 does not recognize the options from 1912.

best regards, franco
otaolafr is offline   Reply With Quote

Reply

Tags
boundary, integrate field, patch, patchintegrate

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 03:31
Kernel for new CPUs Simbelmynë Hardware 22 January 5, 2018 16:41
[OpenFOAM.org] Problem installation OpenFOAM-dev FlyingCat OpenFOAM Installation 15 December 31, 2017 11:53
interFoam pressure miscalculation in 2.3 (wrt previous versions) Phicau OpenFOAM Bugs 6 November 25, 2015 09:42
OpenFOAM v.2.x Courant Number 4 time higher then in previous versions makaveli_lcf OpenFOAM Running, Solving & CFD 8 February 18, 2012 21:28


All times are GMT -4. The time now is 23:01.