CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   On how to initialize a UDS (https://www.cfd-online.com/Forums/fluent/32503-how-initialize-uds.html)

Angelo Sozzi November 12, 2003 20:14

On how to initialize a UDS
 
Hello,

I am currently trying to simulate photolysis in an annular reactor. (H2O2+I --> 2OH).

I would like to fix a pre calculated gradient in a part of the grid. Eg. 2D case, rectangular RK: entry zone (square)- reaction zone (square)- outflow zone(square) where I is a mirrored gradient in the reaction zone. Water+H2O2 enters and is (partialy)converted to OH in the raction zone.

My understanding is that I should be able to Initialize a UDS using DEFINE_INIT, unhook the UDS from the solver and use I as a fixed source through a DEFINE_VR_RATE macro.

Question: I can't find out how to use DEFINIE_INIT on a UDS. Do I just loop over al the cells in the reaction_zone thread? is there a way to read the distance of the cell to the center of the square and write I as a function of that distance?

Sorry if I'm asking obvious stuff, and thanks for any help.

Angelo

ccc November 14, 2003 12:58

Re: On how to initialize a UDS
 
hi,

1. For the initialization, you understanding is fairly right. loop over all the cells and set the values with C_UDS(cell_t, thrad).

2. C_CENTROID(pos, cell_t, thread) will give the coordinates of the centroid of the cell.


Angelo Sozzi November 19, 2003 16:31

Re: On how to initialize a UDS
 
Thanks for the info, it helped and its working now! But I am using UDM now since UDS would only be needed to add the term to the flow.

Still gotta do some fancy footwork getting the vector calculation right

Thanks


All times are GMT -4. The time now is 23:59.