CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

a variable/expression to calculate water depth

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2015, 09:23
Question a variable/expression to calculate water depth
  #1
Senior Member
 
hmasenger's Avatar
 
hamed
Join Date: Apr 2009
Posts: 148
Rep Power: 17
hmasenger is on a distinguished road
hi all;
i am modeling a free surface flow over a spillway. in the attached picture the green line refers to water surface(z@polyline1) and the blue one refers to spillway bottom elevation(z@polyline2). i am looking for an expression to calculate water depth among spillway length (y axis in the picture).actually i need something like ( z@polyline1-z@polyline2) but ofcourse this turns to an error saying unrecognized z. i don't know how to define the expected expression. any help would greatly appreciated .
best regard.
Attached Images
File Type: jpg 2015-01-28_17-41-49.jpg (42.1 KB, 17 views)
File Type: jpg 2015-01-28_17-52-23.jpg (30.3 KB, 21 views)
hmasenger is offline   Reply With Quote

Old   January 28, 2015, 16:31
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I would export the surface and spillway polyline objects from CFD-Post and do the calculation yourself in matlab/python/excel/whatever.
ghorrocks is offline   Reply With Quote

Old   January 31, 2015, 11:14
Unhappy
  #3
Senior Member
 
hmasenger's Avatar
 
hamed
Join Date: Apr 2009
Posts: 148
Rep Power: 17
hmasenger is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
I would export the surface and spillway polyline objects from CFD-Post and do the calculation yourself in matlab/python/excel/whatever.
i did this but some problem emerges .pleas do me a favor checking out the exported data i have attached.
two problem exists after exporting results to a csv file.
1-i don't know why number of data points are not equal for polylines?! there is about 2600 data point for one polyline while there is only 1000 for the other one!
2-the exported data are in a revers order for polylines i mean for one polyline data points starts from -1.5 to -4 [for y axis] but for the other polyline it starts from -4 to -1.5 !! why this happens?
Attached Files
File Type: zip depth2.zip (32.3 KB, 5 views)
hmasenger is offline   Reply With Quote

Old   January 31, 2015, 16:46
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The polyline (and all other objects for that matter) export data when the object crosses a control volume boundary. This means the number of points can vary quite a bit. It also means there is no specific order, it can be any order.

You can make the polyline using sampling rather that slicing and then you can control the points. But my preferred way forward is to use a more sophisticated routine in python which can handle any point order and different point resolutions. It is not difficult to do, but will keep you happily occupied for a morning to develop the code.
ghorrocks 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
Water Surface Evaporation sunggun1212 FLUENT 3 January 11, 2020 04:12
how to calculate water average velocity in free surface models hmasenger CFX 22 October 30, 2019 19:28
help!!! fluid machanics in water pool wanglzhy Main CFD Forum 0 February 28, 2012 02:29
How to calculate dynamic viscosity for sea water? James L. Main CFD Forum 5 October 7, 2003 18:05
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 11:15.