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

Add Variables Together

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By yambanshee

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2019, 12:43
Default Add Variables Together
  #1
New Member
 
RoWoM
Join Date: Jul 2018
Posts: 5
Rep Power: 7
RoWoM is on a distinguished road
Foam Gods: Can results files be added together and scaled easily?

As they are text files I'm wondering if it's easier to bodge together something in python (after hunting all afternoon on the forums) ... but there has to be a better way?

Looked in postProcess, but "add" and "scale" aren't there. funkySetFields isn't installed so would need compiling...

(Using blueCore openfoam 4.x)
RoWoM is offline   Reply With Quote

Old   July 9, 2019, 04:08
Default
  #2
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 7
yambanshee is on a distinguished road
Quote:
Originally Posted by RoWoM View Post
Foam Gods: Can results files be added together and scaled easily?

As they are text files I'm wondering if it's easier to bodge together something in python (after hunting all afternoon on the forums) ... but there has to be a better way?

Looked in postProcess, but "add" and "scale" aren't there. funkySetFields isn't installed so would need compiling...

(Using blueCore openfoam 4.x)
There is a postProcess function named add in OF5 and up.
Code:
postProcess -func "add(FIELD1, FIELD2)"
Alternatively, you can make use of the calculator filter in paraview, however the file format will differ from that used by openFoam.
HPE likes this.
yambanshee is offline   Reply With Quote

Old   July 9, 2019, 08:43
Default
  #3
New Member
 
RoWoM
Join Date: Jul 2018
Posts: 5
Rep Power: 7
RoWoM is on a distinguished road
Thanks so much ... will use that when I get to foam 5...
Until then it's python time...
RoWoM is offline   Reply With Quote

Reply


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
How to add a new material in the fluent Database MikeITA FLUENT 5 December 13, 2021 22:40
How to select some variables not to be written into files? ripperjack OpenFOAM Programming & Development 12 August 7, 2020 11:15
[snappyHexMesh] refineWallLayer vs add layer Astan OpenFOAM Meshing & Mesh Conversion 0 March 18, 2019 12:03
Add or subtract two variables in TUI Tarantino Fluent UDF and Scheme Programming 4 October 17, 2017 12:36
Saving variables on a user patch with physical coordinates Zoltan Turzo CFX 2 April 20, 2000 15:05


All times are GMT -4. The time now is 22:39.