Depth-averaged quantities in ParaView (interFOAM simulation)
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 |
1 Attachment(s)
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 :-) |
All times are GMT -4. The time now is 09:04. |