|
[Sponsors] |
May 20, 2014, 12:19 |
Vof udf
|
#1 |
Senior Member
ahmad
Join Date: Feb 2012
Posts: 101
Rep Power: 14 |
what the problem on my udf ?
I want find summation of VOF /************************************************** ****************** UDF for VOF summation and displaying it in the console ************************************************** *******************/ #include "udf.h" #include "sg_mphase.h" DEFINE_ADJUST(my_adjust,d) { Thread *t; /*VOF sum. */ real sum_vof=0.; cell_t c; thread_loop_c(t,d) { begin_c_loop(c,t) sum_diss += C_VOF(c,t); end_c_loop(c,t) } printf("VOF summation : %g\n", sum_vof); } |
|
May 21, 2014, 06:48 |
|
#2 |
New Member
Igor
Join Date: Mar 2012
Posts: 13
Rep Power: 14 |
And what the problem with your udf ?
What's wrong? |
|
May 21, 2014, 11:40 |
|
#3 |
Senior Member
ahmad
Join Date: Feb 2012
Posts: 101
Rep Power: 14 |
when i did iteration . i had a problem and fluent restart
|
|
May 21, 2014, 18:38 |
|
#4 |
New Member
Igor
Join Date: Mar 2012
Posts: 13
Rep Power: 14 |
sum_diss overflow?
You wrote sum_diss=0 earlier? Why do you need DEFINE_ADJUST? |
|
May 22, 2014, 02:31 |
|
#5 |
Senior Member
ahmad
Join Date: Feb 2012
Posts: 101
Rep Power: 14 |
||
May 25, 2014, 08:04 |
|
#6 | |
New Member
Frode Yu
Join Date: May 2014
Posts: 1
Rep Power: 0 |
Quote:
if you use C_VOF(c,t), the "t" should primary_phase or second_phase, not the mixture_phase. but when you hooking the udf, "t" was mixture_phase. |
||
May 26, 2014, 10:27 |
|
#7 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Hi malay,
As DaddySpeleo pointed out, sum_diss is not defined before the loop. (your answer to him looks like you may not have modified this problem) |
|
May 26, 2014, 13:48 |
|
#8 |
Senior Member
ahmad
Join Date: Feb 2012
Posts: 101
Rep Power: 14 |
||
May 26, 2014, 14:10 |
|
#9 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Yes, at the same place where you define sum_vof.
You talked about a condition [C_VOF (c,t)>0.5 && C_VOF(c,t) <1.0] and it looks like it's not included in your udf. Maybe you should start over with a summation example from the UDF Manual, make sure a copy-pasted example works with no error in your model, and then modify it gradually. |
|
May 26, 2014, 14:13 |
|
#10 | |
Senior Member
ahmad
Join Date: Feb 2012
Posts: 101
Rep Power: 14 |
Quote:
thanks |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VOF UDF unsteady inlet/outlet | danielvhm | Fluent Multiphase | 1 | January 30, 2014 11:32 |
VOF condensation udf | foolstop | Fluent UDF and Scheme Programming | 0 | May 8, 2012 10:15 |
Convert VOF droplet to DPM particle via UDF | TedBrogan | Fluent UDF and Scheme Programming | 1 | May 1, 2012 12:01 |
Vof, udf and mass transfer panel | Jay | FLUENT | 1 | March 15, 2005 01:29 |
UDF sourse term for VOF equation | ROOZBEH | FLUENT | 5 | April 22, 2003 07:56 |