CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   sliding User-Defined Memories along the mesh (https://www.cfd-online.com/Forums/fluent-udf/76572-sliding-user-defined-memories-along-mesh.html)

ludohorion May 29, 2010 09:09

sliding User-Defined Memories along the mesh
 
Hi all,

I am modelling mass transfer in a domain. The system is composed of a porous medium, and a gas flowing through it.

I defined 10 UDM in my system. Each UDM represents a discretization point of the concentration profile.

To be clear: I have written an UDF that takes as an argument 10 points of a concentration profile, calculates a mass transfer, and gives out the new concentration profile. Each cell of the domain has then its own concentration profile (i.e. its own 10 UDM's).

Now, I would like to simulate of uniform downward motion of all the UDM's in the domain. If you imagine that the mesh is a (50x5 cells) rectangle for example, this means it contains 250 cells, and each cell has an associated concentration profile (i.e. 10UDMs per cell). At time step t=0+dt, I update all UDM's. Then at t = 0+2*dt, I would like to suppress all UDM's of the line 50 of my mesh, I would like to add a new line (line 1) of UDM's with given initial values, and finally I would like to shift all other 48 lines of UDM from one position down.

So now, I have 50x5 new concentration profiles, and then I do the same at the next time step, and so forth...

My question is: how to implement this into FLUENT? I guess I should take advantage of the EXECUTE_AT_END() macro, to do the algorithm at the end of each timestep. But how can I refer explicitly to the UDM's of the top line of the mesh, or to the UDM's of the bottom line of the mesh?

Thank you very much.

Ludovic.


All times are GMT -4. The time now is 07:58.