|
[Sponsors] |
load moving heat flux by using DEFINE_SOURCE UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2020, 09:24 |
load moving heat flux by using DEFINE_SOURCE UDF
|
#1 |
New Member
qujiaqi
Join Date: Jul 2020
Posts: 2
Rep Power: 0 |
hey guys,i am trying to define source term of energy eqution,like using DEFINE_SOURCE to define moving heat flux,it can be interpreted but there is nothing change with temperature.my UDF is:
#include "udf.h" DEFINE_SOURCE(flux_profile,c,t,ds,eqn) { real d[ND_ND]; real x; real y; real z; real flow_time = RP_Get_Real("flow-time"); real source; C_CENTROID(d,c,t); x = d[0]; y = d[1]; z = d[2]; source = 7e18* exp(-3 * (pow((x- 0.03 * flow_time),2)+pow((y-0.003),2)+(pow((z-0.0015),2)))/0.0003/0.0003); ds[eqn] = 0.0; return source; } i hope you can help me ,thank you so much~~ |
|
July 8, 2020, 04:35 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
#include "udf.h" DEFINE_SOURCE(flux_profile,c,t,ds,eqn) { real d[ND_ND]; real x; real y; real z; real flow_time; real source; C_CENTROID(d,c,t); flow_time = RP_Get_Real("flow-time") x = d[0]; y = d[1]; z = d[2]; source = 7e18* exp(-3 * (pow((x- 0.03 * flow_time),2)+pow((y-0.003),2)+(pow((z-0.0015),2)))/0.0003/0.0003); ds[eqn] = 0.0; return source; }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 07:00 |
Space- and time-dependant heat flux via UDF | flotus1 | Fluent UDF and Scheme Programming | 4 | September 10, 2012 08:00 |
UDF to calculate average heat flux | dynamics | Fluent UDF and Scheme Programming | 0 | July 21, 2012 18:54 |
Laser Heat Flux & UDF | Dominick | FLUENT | 3 | February 12, 2004 15:46 |
Heat flux UDF problem | Paul | FLUENT | 1 | September 11, 2003 06:13 |