## Fluids

#### Determination of nearest wall distance of a point in the inlet of an artery

• mkizhisseri
Subscriber
Hi there, I need to find a way to determine the nearest wall distance of a point in the face of an arterial inlet. I think writing UDF will be the best option, is anyone have a UDF or any leads so that it can be helpful for me? Are there any other options to determine the nearest wall distance for a point?n
• YasserSelima
Subscriber
The straightforward way to do it through UDF is to have outer loop over the walls threads, and inner loop over the nodes, and calculate the distance between the two. nHowever, there might be an easier way depending on; Is it a fixed point, or moving? Are you using dynamic mesh? What is the shape of your wall?n
• mkizhisseri
Subscriber
Hi Yasser thanks for your comments. Points are fixed, and actually, I need to find the nearest wall distance of each and every points in the face of my inlet. The shape of the wall will be irregular circular in shape resembling artery cross-section, and I'm not using dynamic meshing.n
• YasserSelima
Subscriber
So, the walls are fixed. I am not sure how the artery look like. But now, you don't need to run the UDF every time step.nYou can use Define on demand and save the values to a UDM ... so you can access it whenever you want during simulation. nBasically you will need to do the following in your functionnGet_DomainnLookup thread (The inlet thread) nLoop over the faces of the thread Outer outer loopndistance = Large_numbernUse the outer and inner loops described above .. every time you find the new_distance < distance , make distance = new_distancenFind the minimum distance in all nodes ..nSave it to UDMnEnd of outer outer loopn
• mkizhisseri
Subscriber
Hi Yasser, Really appreciate your detailed explanation of this question. I have attached an image showing the possible shape of the face of the artery wall.nn
• YasserSelima
Subscriber
So, it's not simple. n
• mkizhisseri
Subscriber
Ok..I will try n
• Rob
Ansys Employee
Remember Fluent is a cell based solver so the point will be the facet centre. What do you want to do with the data, knowing that might help find an alternative. n
• mkizhisseri
Subscriber
Actually I wanted to give a fully developed velocity profile at the inlet of the artery.n
• Rob
Ansys Employee
OK, easier approach is to extrude the inlet section for 10-15 diameters and model just that part in a separate model. Use a uniform velocity inlet and write out a profile. Make sure the outlet of that model is in the same plane and orientation as the inlet to the main model and all good. Otherwise you need to re-orient the profile and that might be complicated given the shape. n