|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
ashkan
Join Date: May 2013
Posts: 2
Rep Power: 0 ![]() |
Dear all
I have one problem in fluent udf.I want to write one temperature-dependent source term.I want my temperature increase up to 350K because of source term,and when it reach to 350K ,source term is stop and because of free convection the temperature come back to initial values and again this cycle continue.I write one udf but I have really problem in this,please help me. I sent the my UDF, #include "udf.h" DEFINE_SOURCE(cell_source, cell, thread) { real source; real temp = C_T(cell, thread); if(temp <350.15) { source=20000000*(1+.02*(temp-250.15)); } if(temp>=350.15) { while(temp>=250.15) { temp = C_T(cell, thread); source=0; } } return source; } |
|
|
|
|
|
|
|
|
#2 | |
|
Senior Member
Join Date: Aug 2011
Posts: 113
Rep Power: 6 ![]() |
You should have a clear definition of the point when the source terms should be switch on, and you should tell us whether such switch is global or cell-wise.
Quote:
|
||
|
|
|
||
|
|
|
#3 |
|
New Member
ashkan
Join Date: May 2013
Posts: 2
Rep Power: 0 ![]() |
Thanks for your answer,
The temperature of the center of channel is important for me where the cordinate axis is (0,0,0). I have problem in second loop,when source==0,because of free convection the cell is cooled and temperature is decrease.I want when temperature reach to initial value again repeat the cycle. |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| swak4Foam-groovyBC build problem | zxj160 | OpenFOAM | 17 | January 15, 2013 11:14 |
| UDF Source term problem | natantyt | FLUENT | 1 | July 27, 2011 14:07 |
| UDF Source Term | Christian | FLUENT | 4 | August 1, 2009 05:53 |
| DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
| UDF for energy source | mauricio sanchez | FLUENT | 0 | August 30, 2005 15:56 |