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, 16:19
Default Boundary Distance
  #1
New Member
 
Pietro
Join Date: Jul 2015
Posts: 9
Rep Power: 11
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, 19:34
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
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, 20:53
Default
  #3
New Member
 
Pietro
Join Date: Jul 2015
Posts: 9
Rep Power: 11
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, 06:11
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
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, 08:06
Default
  #5
New Member
 
Pietro
Join Date: Jul 2015
Posts: 9
Rep Power: 11
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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Implementation of boundary conditions for FVM Tom Main CFD Forum 7 August 26, 2014 06:58
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 02:54


All times are GMT -4. The time now is 05:50.