|
[Sponsors] |
December 4, 2017, 21:40 |
UDF velocity
|
#1 |
New Member
Part
Join Date: Dec 2017
Posts: 3
Rep Power: 9 |
I am not familiar with ansys so it keeps getting error.
I am going to make simulation about winecellar. I want to change inlet velocity according to other plane temperature. But 'Divergence detected in AMG solver: temperature' appears please #include "udf.h" DEFINE_ADJUST(center_temp,domain) { real A[2]; real temper; int ID=12; Thread *t; face_t f; t = Lookup_Thread(domain,ID); begin_f_loop(f,t) { F_CENTROID(A,f,t); temper = F_T(f,t); } end_f_loop(f,t) F_UDMI(f,t,0) = temper; } DEFINE_PROFILE(inlet_y_velocity, t, i) { real y[ND_ND]; face_t f; real current_time; current_time=CURRENT_TIME; begin_f_loop(f,t) { if(current_time>1 && F_UDMI(f,t,0)>290) F_PROFILE(f,t,i)=8; else if (current_time>1 && F_UDMI(f,t,0)<288 && F_UDMI(f,t,0)>200) F_PROFILE(f,t,i)=0.1; else if (current_time>1 && F_UDMI(f,t,0)<=290 && F_UDMI(f,t,0)>=288) F_PROFILE(f,t,i)=4; } end_f_loop(f,t) } |
|
December 5, 2017, 04:08 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
This UDF does not change temperature. It only reads the temperature from the simulation.
You simulation complains it has a problem with temperature. I don't see how this UDF can cause this. Does it also happen if you don't use this UDF, but a simpler velocity boundary condition? |
|
December 5, 2017, 06:50 |
|
#3 | |
New Member
Part
Join Date: Dec 2017
Posts: 3
Rep Power: 9 |
Quote:
No using constant velocity did not make any problem. |
||
Tags |
udf, velocity bc |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2D UDF for inlet y velocity | Keyu | Fluent UDF and Scheme Programming | 1 | April 26, 2016 06:01 |
Having trouble adapting serial UDF to work in parallel | muyuntao | Fluent UDF and Scheme Programming | 1 | November 10, 2015 14:42 |
Velocity boundary condtion UDF help | victoryv | Fluent UDF and Scheme Programming | 2 | October 9, 2012 16:27 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
UDF component in Cyliderical Velocity? | Hongchan Kim | FLUENT | 3 | April 24, 2001 13:20 |