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

Boundary Distance

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2015, 15:19
Default Boundary Distance
  #1
New Member
 
Pietro
Join Date: Jul 2015
Posts: 9
Rep Power: 10
Pietro Giorgio is on a distinguished road
Hi, someone can tell me if I can calculate the shortest distance of all domain cells to a specific boundary surface? I'm trying to use the variable "Boundary Distance", but it calculates the distance of each cell to the nearest boundary.
Pietro Giorgio is offline   Reply With Quote

Old   July 25, 2015, 18:34
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The "Wall Distance" parameter contains the distance to the nearest wall.

If you want to calculate the distance to a specific boundary object I can think of two possibilities:
1) If the object has a simple topology (ie just a plane or a sphere) then writing a CEL expression to give the distance from any point is pretty simple.
2) For an arbitrary shape things get a little more interesting. One approach which might be worth consideration is to define a diffusion only additional variable. Then define the surface you are interested in as a source term for the variable, give the fluid domain a constant diffusion coefficient, and put a source term sink somewhere far away. Then the diffusion pattern will automatically find the path from source to sink. If the source has a value of 1 and the sink a value of 0 and they are 10m apart, then where the variable has a value of 0.5 is half way from the source to sink and will therefore be 5m from the source.

I will leave it as an exercise for the enthusiastic reader to prove (or otherwise) whether the approach I describe in (2) is mathematically correct or not But it will be close regardless.
ghorrocks is offline   Reply With Quote

Old   July 25, 2015, 19:53
Default
  #3
New Member
 
Pietro
Join Date: Jul 2015
Posts: 9
Rep Power: 10
Pietro Giorgio is on a distinguished road
Hi! Thank you for your quick reply.
The approach (2) is great! But I believe that (1) is enough, taking into account the simplifed geometry. The problem is that I do not need the distance to any point, I need the distances from the wall until all the cells that define the domain. This information will be useful for added mass analysis due to the heave motion of a hull, which was what I simulated. Do you know how I can refer to the position of each cell? On the same idea as I refer to speed through the "Mesh Velocity", with that I would solve quite easily
Pietro Giorgio is offline   Reply With Quote

Old   July 26, 2015, 05:11
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
CEL variables can be field variables. So the CEL expression:

test = x+y+z

will define a scalar variable field set to the sum of the x, y and z coordinate values. If you want to write this variable to the results file then define an additional variable, set it to your CEL expression, and make sure your new variable is included in the results file.
ghorrocks is offline   Reply With Quote

Old   July 26, 2015, 07:06
Default
  #5
New Member
 
Pietro
Join Date: Jul 2015
Posts: 9
Rep Power: 10
Pietro Giorgio is on a distinguished road
Work Perfectly, my friend! Thank you for the support!
Pietro Giorgio 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Wind turbine simulation Saturn CFX 58 July 3, 2020 01:13
Implementation of boundary conditions for FVM Tom Main CFD Forum 7 August 26, 2014 05:58
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 01:54


All times are GMT -4. The time now is 13:24.