|
[Sponsors] |
October 1, 2003, 11:31 |
first time with UDMI
|
#1 |
Guest
Posts: n/a
|
I am trying to use UDM for the first time. I have written the part of the code shown below, where eta(f) is a function in another part of the code. I would have assumed the same value that is printed for over_pot in the printf line would be the value that appeared in my xy plots in fluent. When I make the xy plot I only get a value of 0.00000. Any reason why this is occuring?
DEFINE_PROFILE(tile_conc_spec, thread_sol, i) { face_t f; begin_f_loop(f, thread_sol) { real over_pot = eta(f); F_UDMI(f, thread_sol, 0) = over_pot; printf ("\nover_pot = %g, at face %d", over_pot, f); F_PROFILE(f, thread_sol, i) = c_bulk*concvar(f)/(concvar(f)+1); } end_f_loop(f, thread_sol) } |
|
October 1, 2003, 16:40 |
Re: first time with UDMI
|
#2 |
Guest
Posts: n/a
|
You're saving your values only on the boundary where you define your profile, so you should be able to plot it only there, by selecting the boundary in the XY-plot panel.
Hi ap |
|
October 2, 2003, 05:41 |
Re: first time with UDMI
|
#3 |
Guest
Posts: n/a
|
The thread that I am defining the profile on "thread_sol" is the same one that I am applying the UDM to, it is also the one I am trying to XY plot in fluent. I still get 0.000 for all face values on that face thread. Is it because all the values are negative?
|
|
October 2, 2003, 08:49 |
Re: first time with UDMI
|
#4 |
Guest
Posts: n/a
|
I don't think this has to do with the sign of values.
Hi ap |
|
February 29, 2012, 00:01 |
|
#5 |
New Member
Balakrishnan
Join Date: Feb 2012
Posts: 5
Rep Power: 14 |
Hi Andrew, I hope you would have solved this problem. I'm also facing the same problem can you please let me know the solution?
Thanks krishnan |
|
November 22, 2012, 11:17 |
|
#6 | |
Senior Member
Join Date: May 2011
Posts: 231
Rep Power: 16 |
Quote:
#include "udf.h" DEFINE_PROFILE(outlet_mf,t,i) { face_t f; real flow; begin_f_loop(f,t) { flow+=F_FLUX(f,t); F_UDMI(f,t,0)=flow; } end_f_loop(f,th); } thanks in advance!!! |
||
November 24, 2012, 00:30 |
|
#7 |
New Member
Balakrishnan
Join Date: Feb 2012
Posts: 5
Rep Power: 14 |
Hi Kanarya, I had the same problem. When I used C_UDMI instead of F_UDMI, it worked as expected. I dont know why.
|
|
November 24, 2012, 09:43 |
|
#8 |
Senior Member
Join Date: May 2011
Posts: 231
Rep Power: 16 |
||
November 25, 2012, 05:24 |
|
#9 | |
New Member
Balakrishnan
Join Date: Feb 2012
Posts: 5
Rep Power: 14 |
Quote:
how is it possible to read face and to save in cell? I have the same doubt, anyhow as I said earlier, C_UDMI solved the problem. If you find the answer, please let me know.... Balki |
||
November 25, 2012, 19:49 |
|
#10 |
Senior Member
Join Date: May 2011
Posts: 231
Rep Power: 16 |
Hi,
which function is suitable to save mass flow at outlet..do you think, is define_execute_at_end OK for it? thanks for advance..! |
|
November 30, 2012, 11:54 |
|
#11 | |
Senior Member
Join Date: May 2011
Posts: 231
Rep Power: 16 |
Quote:
#include "udf.h" DEFINE_EXECUTE_AT_END(measure_mass_flow) { real mass_flow; real mass_flow_g; Domain *d=Get_Domain(1); cell_t c; face_t f; Thread *mixture_thread = Lookup_Thread(d,4); Thread **pt = THREAD_SUB_THREADS(mixture_thread); Thread *tp = pt[0]; Thread *ts = pt[1]; mass_flow=0.; //mass_flow=0.; mp_thread_loop_f(mixture_thread,d,pt) if( THREAD_ID(mixture_thread) == 4 ) { begin_f_loop(f,mixture_thread) { mass_flow+=F_FLUX(f,ts); if(N_UDM > 0 && BOUNDARY_FACE_THREAD_P(ts)) C_UDMI(f,ts,0)=mass_flow; } end_f_loop(f,mixture_thread) } Message("mass_flow:%g/n",mass_flow); } I am trying to save mass flow at outlet. but it gives always zero, could you give me a hint? thanks a lot in advance!!! |
||
July 24, 2015, 11:12 |
|
#12 |
Member
Farzin
Join Date: Jul 2014
Posts: 42
Rep Power: 12 |
I also came up with this problem. I think its just not enough to have only Face User-Defined memory of a cell to make plots. Considering that Fluent calculates and stores variables on cell Centers, it is needed to store the value of both Cell and it's Face within a single User-Defined Memory Location.
|
|
October 4, 2017, 05:21 |
Dear freiends
|
#13 |
New Member
Join Date: Jan 2017
Posts: 25
Rep Power: 9 |
Can you please explain how to make a C_UDMI in fluent.
i tryed to read the manual but still no clue what im doing. I want to store reaction product and give it back as mass source. please help |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
Time step size and max iterations per time step | pUl| | FLUENT | 31 | October 23, 2020 23:50 |
calculation diverge after continue to run | zhajingjing | OpenFOAM | 0 | April 28, 2010 05:35 |
Problems with simulating TurbFOAM | barath.ezhilan | OpenFOAM | 13 | July 16, 2009 06:55 |
Modeling in micron scale using icoFoam | m9819348 | OpenFOAM Running, Solving & CFD | 7 | October 27, 2007 01:36 |