Question about F_UDMI
Hello all!
I'm back again... I have a question this time about F_UDMI. I'm trying to retrieve the values I've stored into the UDMI, which should be a constant across all the faces. I wonder if this implementation is ok. Does the F_UDMI have to be in the loop? Code:
DEFINE_PROFILE(desc_pressure_outlet,th,i) |
First comment: initialize your variables.
Code:
real Q_3D_desc = 0; Then, if t>0, you read the UDMI value at face f_final. You don't know which face this is, Fluent decides this. And then, you calculate a pressure based on this face f_final, and apply it to all faces. This can only do something reasonable if the UDMI is the same for all faces, because then it does not matter which face Fluent chooses to visit last. You say that for you this is the case. Still, I would change it, because if six months from now you use this code again, and the UDMI can have more values, you will have a bug that is hard to detect. I think that the easiest way to fix this is to put the loop into the if-statement: Code:
if (t == 0) { |
Hi pakk!
Thank you for your help! I have another issue, would be great if I could get your ideas on how to implement this. As you can see in my udf, I have computed the flow for the outlet in DEFINE_PROFILE, but this works only for 1 outlet... I have another case where I need to compute the flow from two different outlets and sum them together. I'm not sure what's the best way. My idea is to use a DEFINE_ADJUST and some global variables. |
All times are GMT -4. The time now is 09:31. |