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/)
-   -   How to set a cell or face property independent of BC (https://www.cfd-online.com/Forums/fluent-udf/77770-how-set-cell-face-property-independent-bc.html)

TDi July 2, 2010 17:22

How to set a cell or face property independent of BC
 
I am trying to simulate the deposition of layers of a powder under a heater. A layer is deposited at an initial temperature, then allowed to heat for a while. Then another layer is deposited at the initial temperature and allowed to heat, and so on. The boundary condition is mixed convection/radiation. I use a dynamic mesh UDF to add a layer of powder by deforming the geometry, but I need to set the temperature of the new layer.
I understand how to set the temperature using a DEFINE_PROFILE, but that would rely on having that specific property defined by the boundary condition, that is, I think I would have to have a constant temperature BC.
Is there a way to use something like
F_PROFILE(face_thread,boundary_thread,i)=temp
to set the cell temperature/density/thermal conductivity arbitrarily? How would I know which value of i to use, since that is supplied by the function hook?

Thanks in advance.

Hathaway October 19, 2010 19:59

Hey, I had to do a similar thing as you, I was looking to update my BC every iteration somehow using DEFINE_ADJUST, which isn't passed a property_id like DEFINE_PROFILE is.

My solution involved a UDF file that contained both a DEFINE_PROFILE portion to set the initial BC and also identify the property_id that will later be used to change the BC later on, and a DEFINE_ADJUST macro that changed the BC for each iteration thereafter. I posted my implementation code in another thread, the link to which is below.

http://www.cfd-online.com/Forums/flu...tml#post279878

I tested this code and it looks like my boundary conditions were indeed changing as desired with each iteration. Hopefully this helps you out.


All times are GMT -4. The time now is 18:53.