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/)
-   -   F_UDMI how to postprocess? (https://www.cfd-online.com/Forums/fluent-udf/40509-f_udmi-how-postprocess.html)

Kanarya January 19, 2013 19:17

Quote:

Originally Posted by dmoroian (Post 402904)
You store values in C_ UDMI's next to the outlet, and then use other C_ UDMI's next to the inlet to set the inlet b.c. The two sets of C_ UDMI's are different, so there is no surprise that it ' does not work'.

hi
thanks for the answer!

I am saving in outlet memory 0 and then using it in inlet..what is wrong in it?

thanks again!

Kanarya January 19, 2013 19:30

Quote:

Originally Posted by dmoroian (Post 402904)
You store values in C_ UDMI's next to the outlet, and then use other C_ UDMI's next to the inlet to set the inlet b.c. The two sets of C_ UDMI's are different, so there is no surprise that it ' does not work'.

so it means that I can not use saved data from outlet in the inlet?

dmoroian January 23, 2013 01:16

I suspect you did not understand how to use the C_UDMI feature.
For each cell in the computational domain you can allocate extra storage room, like extra pockets.
Each cell will be identified by a cell index "c" and a thread pointer "t", and each pocket with another index "i". To access these pockets, fluent provides you with a macro C_UDMI(c,t,i).
To simplify the understanding, let us consider your domain composed only from 2 cells, one next to the inlet and the second one, next to the outlet. Each cell has only one pocket that you call "memory 0". If you put data only in the pocket that belongs to the cell at the outlet, how do you expect to find anything in the pocket that belongs to the cell at the inlet?

Kanarya March 18, 2013 08:57

Hi

post #17 is working for serial but now I have a problem with parallel.
i put at the beginning #if !PR_HOST and at the and #ifend but still not working. I try other variations but it seems not trivial.

any help?

thanks in advance!

dmoroian March 20, 2013 01:43

Quote:

Originally Posted by Kanarya (Post 414683)
Hi

post #17 is working for serial but now I have a problem with parallel.
i put at the beginning #if !PR_HOST and at the and #ifend but still not working. I try other variations but it seems not trivial.

any help?

thanks in advance!

Please be more specific towards your problem, not your attempts to solve it! Think what we can understand from your message when you say "I have a problem with parallel".

The code at post #17 will not calculate correctly the mass flow in parallel (not to mention what you put in the F_UDMI, which looks wrong to me even in serial). After your face loop is finished, you will need a global summation for that variable. Please check the Fluent UDF Manual for this information.

As a begin for a better, more disciplined way of programming, you could use Message0, instead of Message, otherwise you will get as many mass flow values as processes you use.

Kanarya March 20, 2013 05:31

Hi dmoroian,

you are right I have a problem parallel. I have already tried global summation (e.g. PRF_GSUM1(velocity_s) or PRF_GIHIGH1(velocity_s) it works but first one sum all values and second one choose the highest one so I need exact values from outlet which I can get in serial!
do you have any other suggestions about global summation?
thanks in advance!!
Quote:

Originally Posted by dmoroian (Post 415162)
Please be more specific towards your problem, not your attempts to solve it! Think what we can understand from your message when you say "I have a problem with parallel".

The code at post #17 will not calculate correctly the mass flow in parallel (not to mention what you put in the F_UDMI, which looks wrong to me even in serial). After your face loop is finished, you will need a global summation for that variable. Please check the Fluent UDF Manual for this information.

As a begin for a better, more disciplined way of programming, you could use Message0, instead of Message, otherwise you will get as many mass flow values as processes you use.


dmoroian March 20, 2013 08:32

Then post #17 is not what you have in mind, because there you sum up in the mass_flow variable all the fluxes through a certain boundary. In parallel this should be completed by a PRR_GRSUM1 command.

So, once again: what do you mean by "problem in parallel"?

Kanarya March 20, 2013 09:04

ok there was lack of info!it was my fault!sorry about that!
so I change it little bit instead of mass flow rate I am saving velocity and volume fraction of solid phase. and after that I am using this values in inlet to keep mass flow rate constant in the system. But in the serial it works perfect but in parallel I have in the inlet always zero! which means it doesnt takes saved values!you can give me e mail adress I can send you the code!

thanks for your help!
Quote:

Originally Posted by dmoroian (Post 415267)
Then post #17 is not what you have in mind, because there you sum up in the mass_flow variable all the fluxes through a certain boundary. In parallel this should be completed by a PRR_GRSUM1 command.

So, once again: what do you mean by "problem in parallel"?


dmoroian March 22, 2013 05:15

I would prefere for you to post your code instead, so everybody will benefit from the discussion. If this is not possible, then you can use: http://www.cfd-online.com/Forums/members/dmoroian.html
to send me a private message, and I will try to have a look at it when I get some spare time.

Kanarya March 22, 2013 06:12

thanks a lot!
I will try to find out the problem first!
To save your time!
thanks again!
Quote:

Originally Posted by dmoroian (Post 415654)
I would prefere for you to post your code instead, so everybody will benefit from the discussion. If this is not possible, then you can use: http://www.cfd-online.com/Forums/members/dmoroian.html
to send me a private message, and I will try to have a look at it when I get some spare time.



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