|
[Sponsors] |
Regarding udf for boundary conditions in transient. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 25, 2017, 05:24 |
Regarding udf for boundary conditions in transient.
|
#1 |
New Member
Ram Prakash
Join Date: Jun 2017
Posts: 3
Rep Power: 9 |
I want to write an udf to make use of the species mass fraction value at the outlet of the previous time step in inlet of the next time step continously in transient analysis. Since I am new in writing udf I read all the functions in the UDF manual of the fluent. Now I am clear in writing an udf for boundary condition profile. Can any tell me how to access the species mass fraction value of the outlet boundary when writing udf for the inlet boundary?
|
|
November 27, 2017, 08:34 |
|
#2 |
Senior Member
Join Date: Nov 2010
Posts: 103
Rep Power: 16 |
To write your UDF for the boundary condition, you can use:
Code:
DEFINE_PROFILE Code:
C_YI(c,t,i) Code:
C_YI_M1(c,t,i) |
|
November 28, 2017, 02:22 |
|
#3 | |
Senior Member
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9 |
Quote:
Maybe he could use EXECUTE_AT_END - macro to save the outlet values and then use DEFINE_PROFILE in inlet? |
||
November 28, 2017, 04:18 |
|
#4 |
Senior Member
Join Date: Nov 2010
Posts: 103
Rep Power: 16 |
Yeah I guess it does make sense to fill the outlet face at the end, and then using DEFINE_PROFILE.
|
|
December 28, 2017, 14:04 |
boundary condition in fluent, which is a function of density
|
#5 |
New Member
mohammad daneshmandi
Join Date: Dec 2017
Posts: 4
Rep Power: 8 |
Dear all
I want to add a boundary condition in fluent, which is a function of density. For this aim I wrote an UDF code to evaluate the density on the surface of boundary. But a segmentation error has occurred. I know what this error is but I do not know how to fix it and my algorithm is right or not? Thank you in advance for your help. #include "udf.h" DEFINE_PROFILE(inlet_pressure1,t,i) { real x[ND_ND]; real rr1; real vv; Thread *tf; face_t f; cell_t c; int n; begin_c_loop(c, t) /* loops over cells in a cell thread */ { rr1=C_R(c,t); c_face_loop(c, t, n) /* loops over all faces of a cell */ { f=C_FACE(c,t,n); tf=C_FACE_THREAD(c,t,n); vv=sqrt(pow (F_U(f,t),2)+pow (F_V(f,t),2)+pow (F_W(f,t),2)); F_PROFILE(f,tf,i)=40000000-0.5*rr1*pow (vv,2); } } end_c_loop(c, t) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help in understanding Transient Periodic & Non-Periodic Boundary Conditions | khattaksadia | FLUENT | 0 | May 5, 2017 01:01 |
UDF for transient pressure outlet boundary from data array | nathanblank | FLUENT | 1 | June 1, 2015 04:09 |
spatial and transient B.C. using UDF | Park | FLUENT | 0 | April 28, 2005 22:32 |
initial conditions with transient UDF | Antoine Pages | FLUENT | 4 | September 19, 2004 12:51 |
UDF for transient boundary condition? | Shankar | FLUENT | 1 | November 22, 2003 09:10 |