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

Sum velocity fields over time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 25, 2017, 13:49
Default Sum velocity fields over time
  #1
Senior Member
 
Join Date: Jan 2015
Posts: 150
Rep Power: 11
Svensen is on a distinguished road
I have a series of time steps, i.e. t = 0; 1; 2; 3; 4.
I want to create a new vector field like U_sum = U(0) + U(1) + U(2) + U(3) +U(4).

Is it any way to do it using postProcess utility or ParaView ?
Svensen is offline   Reply With Quote

Old   December 28, 2017, 16:21
Default
  #2
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13
HakikiCanakkaleli is on a distinguished road
Hi,

I haven't tested below, yet may hopefully give some ideas:

1. In Paraview, Filters -> Alphabetical -> Calculator might be a help.

2.
Code:
postProcess -func add <fields>
might be used.

In addition, Python libraries could be very useful, which I prefer over any other post-processing tools.
HakikiCanakkaleli is offline   Reply With Quote

Old   January 20, 2023, 05:29
Default any progress
  #3
Member
 
Jo Mar
Join Date: Jun 2015
Posts: 54
Rep Power: 10
KingKraut is on a distinguished road
Hey,

did you find a solution for the problem?

The add-function Object only allows the summation of different fields at the same time.

I am currently looking for a tool or trying to implement it myself, which does time integration of a particular field during run time. I am quite amazed that I cannot find such a function object in the OpenFOAM-libraries. I am not sure, if I am just too blind to find ist...

Anyway. I thought by finding a tool, which does additions of the same field for different times, i guess such a tool could easily be modified into a time integration function object.

Of course a proper time integration function object from OpenFOAM would be something I would like much more!

Thanks for any hints or suggestions!!

PS: Still cant believe, such a function object does not exist yet...

Edit: I would like something, that I can use during the simulation run, which is why I am looking for afunction object!

Last edited by KingKraut; January 20, 2023 at 05:46. Reason: forgot some Info :-)
KingKraut is offline   Reply With Quote

Old   January 23, 2023, 14:18
Default
  #4
New Member
 
Join Date: Apr 2015
Posts: 15
Rep Power: 11
Numericer is on a distinguished road
You can modify the solver by creating a new field that reads the previous time value of velocity and writes the sum of that value and the new velocity to the present time folder. This will be done each during each time step, so that in the end you will have sum of all velocties at all times.


You can do the same without modifying the solver if you know how to work with bash.
Numericer is offline   Reply With Quote

Reply

Tags
functionobject, openfoam, paraview, post-processing


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
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 5, 2023 23:48
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09


All times are GMT -4. The time now is 19:33.