|
[Sponsors] |
[General] Depth-averaged quantities in ParaView (interFOAM simulation) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 27, 2019, 15:19 |
Depth-averaged quantities in ParaView (interFOAM simulation)
|
#1 |
New Member
Ali Habibzadeh
Join Date: Apr 2009
Location: Vancouver, Canada
Posts: 15
Rep Power: 17 |
Hi,
How can one generate maps of depth-averaged velocity in ParaView. I am post-processing a VOF simulation (air/water) done in interFOAM. What I am looking for is a 2D map of depth-averaged quantities such as velocity in the entire domain. Just integrating/averaging over a vertical line won't work (I need this done in the entire domain). Thanks |
|
May 2, 2023, 12:32 |
|
#2 |
New Member
Kate Bradbrook
Join Date: Nov 2015
Posts: 12
Rep Power: 11 |
First use calculator on results dataset to get vel=mag(U)
Then use ResampleToImage with default 100x100x100 The select programmableFilter, click "Copy Arrays" and paste in following code (also in attachment): # Code for 'Script'. #Note click "Copy Arrays" option to keep alpha.water to plot surface contour later import numpy as np #RequestData (First calc mag(U)-> vel, then ResampleToImage 100x100x100) input0=inputs[0] #set up variables dp = input0.PointData["p"]/9810 dv = input0.PointData["vel"] da = input0.PointData["alpha.water"] #Loop through x,y directions for i in range(0, 100): for j in range(0, 100):output.PointData.append(dp,"depth")#vertical averaging output.PointData.append(dv,"avVel") #Now can also use calculator to get Froude Number :-) Last edited by KateBradbrook; May 4, 2023 at 10:11. Reason: indents for code didn't copy properly so file added too |
|
Tags |
depth-averages, paraview, velocity map, vof |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interFoam simulation blowing up | mgdenno | OpenFOAM | 55 | November 2, 2018 21:20 |
depth averaged velocity from a CFX free surface flow | bolus13 | EnSight | 8 | November 21, 2016 11:22 |
paraview installation woes | vex | OpenFOAM Installation | 15 | January 30, 2011 08:11 |
Interfoam... free surface simulation urgent | lostin4ever | Main CFD Forum | 4 | October 12, 2010 09:29 |
Averaged quantities | otrebla | CFX | 0 | April 11, 2008 11:03 |