|
[Sponsors] |
October 23, 2015, 08:07 |
UDF code for heat generating source
|
#1 |
New Member
yashar_aryanfar
Join Date: Oct 2015
Posts: 7
Rep Power: 10 |
hi dear friends
I am supposed to write a udf for heat generation rate which is a function at this form: I prepared this code for simulating : #include "udf.h" #define EPS 0.01 #define SIGMA 0.004 DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn) { real x[ND_ND]; real source; C_CENTROID(x,cell,thread); source=EPS*exp(((x[0]-0.4)*(x[0]-0.4)+(x[1]-0.004)*(x[1]-0.004))/(-SIGMA*SIGMA)); dS[eqn]=0; return source; } but is not work. this code dont have any effect in my results. dear friend I have less than 5 days for simulating this. please help me and I will thankfull of you... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] difficulties installing swak4foam | newbie29 | OpenFOAM Community Contributions | 120 | October 21, 2022 04:01 |
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc | ofslcm | OpenFOAM Community Contributions | 25 | March 6, 2017 10:03 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 11:44 |
Please help me run UDF code for source | Suga | FLUENT | 1 | February 3, 2006 03:40 |