|
[Sponsors] |
February 18, 2015, 04:32 |
Froude Number in Paraview
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi all,
I am trying to get the Froude Number in my river simulation. Therefore I need the height of the water. The problem is that my geometry itself has different height (ramps etc.). Hence this I made the following steps:
Still now everything is fine but the waterheight is the difference between the Waterheight_1 and the bottom surface of the river. Therefore the real water height is: Code:
Waterheigth_1 - bottom_of_surface
But I will not get a new Field called "RealWaterHeigth". Also paraview does not give me an error.? Any suggestions?
__________________
Keep foaming, Tobias Holzmann |
|
May 9, 2017, 18:02 |
|
#2 |
Member
Honza Höll
Join Date: Mar 2016
Location: Brno, CZ
Posts: 37
Rep Power: 10 |
Hello Tobi, have you solved this problem about water height?
|
|
May 11, 2017, 10:17 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
this is a long time ago and was not really important for me. I am not sure if I got the problem solved using paraview or by some own application. So I am sorry not to give more advanced information. If you will find any solution, the community would be very thankful to you.
__________________
Keep foaming, Tobias Holzmann |
|
September 13, 2017, 11:16 |
|
#4 |
Member
Honza Höll
Join Date: Mar 2016
Location: Brno, CZ
Posts: 37
Rep Power: 10 |
Hi, I try to solve water surface elevation (depth) problem in Paraview.
According to this post p_rgh in OF 1.7, I evaluated depth (then Froude number) in calculator like h=(p_rgh-p)/(rho*g). Results seem to be reasonable, but water surface requires fine mesh. Can anybody confirm this approach? |
|
November 30, 2017, 04:58 |
|
#5 |
Member
Honza Höll
Join Date: Mar 2016
Location: Brno, CZ
Posts: 37
Rep Power: 10 |
Hi again,
approach I described above seems not work for geometry with bed elevation changing. For those who want to evaulate Froude number for any profile (slice) of river or channel, etc. I found better solution.
I think for channel flow is not necessary to know Froude number for every cell. |
|
July 23, 2021, 13:29 |
Follow up Questions: Calculating Froude Number in Paraview
|
#6 |
New Member
Alfa
Join Date: Apr 2021
Location: Germany
Posts: 3
Rep Power: 5 |
Hi everyone,
I am using 3D interFoam (water-air) and currently trying to calculate the Froude Number in Paraview. I have quite complex geometry comprising river channel, weir, piers and retention area. I have tried several options but still unable to get the desired correct way to do it. These are the options that I have tried: 1. Like the one did earlier by @Tobi (Froude Number in Paraview), so when trying to subtract the surface height to bottom height in order to get the water level (height) from inside the "Group Dataset", Paraview did not yield any subtracted value. Some guys in the forum (I forgot the link) have also recommended to use "Append Dataset" but it doesn't work (after choosing both datasets, when clicking filter, this "Append Dataset" filter doesn't show up). 2. Try to use "pressure" to indicate water level. I am able to extract the water level (height) approximated by the hydrostatic pressure which is also valid I think and requires less steps compared to No. 1 above. I use only the bottom/wall patches to obtain the hydrostatic pressure. However I need to combine this datasets with the surface velocity datasets since this is obtained from the "Internal Mesh" (not from bottom patches like the pressure). As usual, when trying to combine the height datasets with velocity datasets, again failed to operate (calculate) variables inside the grouped datasets like in No. 1 above. 3. Trying to estimate the mean velocity from bottom/shear stress. I am not sure if this is a correct way to do this since there will be many assumptions and approximation. However in order to calculate without needing to combine several datasets, I can do this since I only need to load the base/wall patch in Paraview where all of these variables are included in these patches hence no need to combine several datasets. Has someone tried something similar to this? The principle is trying to obtain all needed variables from same patches e.g. use only bottom patches without using "internal mesh" so that no need to combine different datasets. 4. Further question regarding how to integrate/average velocity over depth? Integrate variables filter only works to integrate all variables regardless of direction, components, etc. so it only yields single value whereas I need to integrate certain position (x,y) over z coordinate. I therefore invite you to add comments and advise regarding to this Regards, Alfa |
|
August 27, 2021, 09:47 |
|
#7 |
Member
Honza Höll
Join Date: Mar 2016
Location: Brno, CZ
Posts: 37
Rep Power: 10 |
Hi,
I've tried several ways but crucial thing is to obtain depth because you need that to compute Fr. To compute depth you need distance between point in internal mesh and point at boundary which have the same x,y coordinate. And I haven't found a way to get that. You can measure distance between two datasets with cells that have the same id (ie deformation). Therefore the group dataset can't work because paraview doesn't know which of z-coordinates from several datasets he should count in. Maybe there is a way how to join attributes from another dataset based on coordinates but I haven't found that. In conclusion it would be great to have depth variable for datasets like Flow-3D has but I think it is not possible. You can use several slices in your geometry and compute Fr in these slices acording my reply above. Honza |
|
May 2, 2023, 12:20 |
Paraview Programmable Filter to depth-average
|
#8 |
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 as indents don't seem to show up properly below): # 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): #vertical averaging dmax=0 vsum=0 asum=0 for k in range(0, 100): id=(k*10000)+(j*100)+i vsum=vsum+dv[id]*da[id] asum=asum+da[id] if dp[id]>dmax: dmax=dp[id] #assign vertical averages throughout depth vAv = 0 if dmax>0: vAv = vsum/asum for k in range(0, 100): id=(k*10000)+(j*100)+i dp[id]=dmax dv[id]=vAv output.PointData.append(dp,"depth") output.PointData.append(dv,"avVel") #Now can use calculator to get Froude Number :-) Last edited by KateBradbrook; May 2, 2023 at 12:43. Reason: indents for code didn't copy properly so file added too |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
[mesh manipulation] Mesh Refinement | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Meshing & Mesh Conversion | 42 | January 8, 2017 13:55 |
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library | aylalisa | OpenFOAM Installation | 23 | June 15, 2015 15:49 |
Stable boundaries | marcoymarc | CFX | 33 | March 13, 2013 07:39 |
Unaligned accesses on IA64 | andre | OpenFOAM | 5 | June 23, 2008 11:37 |