CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Runtime Integration and using the result to correct a field

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Egge

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2018, 05:25
Default Runtime Integration and using the result to correct a field
  #1
New Member
 
Join Date: Apr 2018
Posts: 3
Rep Power: 8
Egge is on a distinguished road
Hello,


I am calculating a pipe flow with heat transfer (Neumann-BC) using cyclic boundary conditions.


I modified the solver pimplefoam to solve for the "modified Temperature field", so the temperature stays more or less constant over the time. This has to be done due to the cyclic boundary conditions.


But unfortunately the temperature changes a little bit. The definition of the "modified temperature field" implies that the modified bulk temperature is zero, which appears to be not the case according to my post-processing



As a solution I want to substract the "modified bulk temperature" from each time step from the "modified temperature" at each time step.



And here is were my question occurs. I clicked through several threads but did not find the exact answer I was looking for, maybe one of you had a similiar problem in the past.


Def. Bulk Temp.: \frac{\int U_z \cdot T dA}{\int u_z dA}


So I need to do a surface integral to get the Bulk temperature, which is in my case the pipe cross section.
My algorithm so far would be:
1. average along the axial direction of the pipe (here z-direction)
2. integrate above the cross section and get a scalar value
3. read the bulk temperature in a vector corresponding to the length of uncorrected

temperature field
4. substract the bulk temperature


Step 3 and 4 I at least guess it would not be a problem, the opposites holds for 1 and 2.


My Problems are:
1. How can I average along the axial-direction. Can I tell openfoam to average all elements along the axis?

2. I know there is something like patchIntegrate from swak4foam, BUT I guess it cannot handle the averaged Values, because there is not patch which contains the information. Or can I define one? I mean it could be arbitary, because Only the face integral is important not the axial position anymore. But it must have the same geometric characteristics of the e.g. inlet or outlet or any cross section in the pipe.

3. is there a already existing face integration option in openfoam, because the way over swak4foam could be more complicated than using an existing option.


Thanks in advance for you comments


best regards
egge
superkelle likes this.
Egge is offline   Reply With Quote

Old   May 5, 2020, 11:11
Default
  #2
Member
 
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6
superkelle is on a distinguished road
Did you find a solution? I am tackling a similar problem.
superkelle is offline   Reply With Quote

Reply

Tags
average field, face integral, runtime, surface integral, swak4foam


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



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