CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Isolate Cells in Layers Based on Height (FLUENT UDF)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2024, 13:34
Default Isolate Cells in Layers Based on Height (FLUENT UDF)
  #1
New Member
 
Baptiste Oudon
Join Date: Dec 2023
Posts: 2
Rep Power: 0
Boudon is on a distinguished road
Good evening, everyone.

I'm currently working on a UDF in ANSYS Fluent to calculate the Longitudinal Length Scale of turbulence, L_{11} . I'm using the direct integration of correlation functions, which is expressed as:

\rho^x_u(\Delta x, y_j)=\frac{\overline{ u'_1(x; y_j) \cdot u'_1(x + \Delta x; y_j) }}{ \overline{u'_1(x; y_j)^2}}

L_{11}=\frac{\sum_{j=1}^{N_y}\rho^x_u(\Delta x, y_j)} {N_y}

Here, u'_1 is the longitudinal fluctuating velocity, \Delta x is the grid spacing along the x-axis, and y_j represents the y-coordinate level at a constant j for j \in [y_{\text{min}} , y_{\text{max}}] . In other word y_j corespond to every layer of cells in the y directions. With a number of layer j=1,2,...,N_y

The direct integration of correlation functions involves integrating u'_1(x) \cdot u'_1(x + \Delta x) for each layer of y-cells and I already have every value for u'_1(x) and u'_1(x + \Delta x)

So I need to isolate each cell based on its y-layer within a UDF. But am having trouble finding an efficient method to do this. Do you have any ideas on how I can achieve this effectively?

My mesh is structural with inflation layer.

Thanks for the help.
Boudon is offline   Reply With Quote

Old   August 9, 2024, 08:56
Default
  #2
New Member
 
Baptiste Oudon
Join Date: Dec 2023
Posts: 2
Rep Power: 0
Boudon is on a distinguished road
I am also considering integrating over a sphere of radius L, where L is the turbulent length scale.

\rho^r_u(\Delta r, y_j) = \frac{\overline{ u'_1(r; y_j) \cdot u'_1(r + \Delta r; y_j) }}{ \overline{u'_1(r; y_j)^2}}

L_{11} = \frac{\sum_{j=1}^{N_y} \rho^r_u(\Delta r, y_j)}{N_y}

Using this method, I would need to isolate all cells within a sphere of radius L and r + \Delta r. Do you have any ideas on how I can efficiently do this?

I was thinking of using a Boolean operation where the volume of the sphere at the current centroid point intersects the cells in the volume d inside the `get_domain` function. However, I’m having trouble finding an efficient way to implement this. If you have any suggestions, I would really appreciate it.
Boudon is offline   Reply With Quote

Old   August 23, 2024, 03:56
Default
  #3
New Member
 
Join Date: Jan 2024
Posts: 3
Rep Power: 2
tomsjerry is on a distinguished road
I'm having a similar issue, could you please share your workaround?
tomsjerry is offline   Reply With Quote

Reply

Tags
udf


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
cellZone not taking all the cells inside rahulksoni OpenFOAM Running, Solving & CFD 6 January 25, 2019 01:11
cellZone not taking all the cells inside rahulksoni OpenFOAM 0 January 16, 2019 02:16
[blockMesh] Create internal faces as patch in blockMesh m.delta68 OpenFOAM Meshing & Mesh Conversion 14 July 12, 2018 15:43
[snappyHexMesh] Problem airfoil snappyhexmesh add layer bye bye my blue OpenFOAM Meshing & Mesh Conversion 1 May 5, 2017 06:56
Problem with entire domain comprised of split hex cells Arzed23 Main CFD Forum 1 November 8, 2016 00:01


All times are GMT -4. The time now is 08:40.