|
[Sponsors] |
variable Heat Source for Solid Region with UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 4, 2015, 10:10 |
variable Heat Source for Solid Region with UDF
|
#1 | |
New Member
Join Date: Oct 2014
Posts: 7
Rep Power: 12 |
Hello everybody,
as I am still quite new to UDF-scripting I do have problems creating a UDF for a variable heat source term. Here is my issue. I have three coincident cylinders which do have the same axial length. The middle cylinder is my heat source. For my problem I assume a axial profile for the heat power Q, which means Q changes with z. This results in a heat source profile in z direction. I want to define a UDF which tells Fluent, that my heat source term changes due to z. Here is what I wrote so far: Quote:
Thank you for any Help. .... |
||
February 4, 2015, 10:23 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
1) VOL = 1.256637061*10^(-5) is wrong
real VOL = 1.256637061e-5 is correct 2) "real source" means a real variable, source(x,c,t) is a function you haven't defined anywhere. 3) is not DEFINE_PROFILE, is DEFINE_SOURCE 4) DEFINE_SOURCE macro has implicit a loop over cells (check the arguments). If you are also looping over faces, the code will loop over all faces in every cell. The computational cost will be huge. 5) DEFINE_SOURCE needs a "return" 6) "dS" and "eqn" must be defined somewhere, as "dS[eqn] =0.0" at least I guess I am even missing something Last edited by upeksa; February 4, 2015 at 10:30. Reason: I had not finished |
|
February 6, 2015, 15:00 |
|
#3 | |
New Member
Join Date: Oct 2014
Posts: 7
Rep Power: 12 |
Hi,
sorry that my answer took so long ... I tried to insert the changes you suggested, though I am not quite sure if thats totally correct now. Besides I get an Error when I am interpreting it within FLUENT, it tells me that in line 15 (which is the line with source(x,c,t)=0 ''no function prototype'' ? What does that mean ? ... As I said earlier I am completly new to UDF .... Thanks a lot for support. Quote:
|
||
February 24, 2015, 12:24 |
|
#4 | |
New Member
Join Date: Oct 2014
Posts: 7
Rep Power: 12 |
Hey there,
i tried to make this udf work, I really need it as I am writing my final thesis at university right now. So here is the CODE I am using currently. Quote:
Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 14: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 16: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 18: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 20: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 22: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 24: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 26: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 28: parse error. Error: C:/Users/LOCAL_~1/AppData/Local/Temp/HeatSource.c.22320.3.c: line 30: parse error. I tried to figure that out, but somehow I really do not quite understand where the problem is. If anyone is able to help ... i would appreciate it ... Thanks alot ... Alex |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for heat source in Soldification and melting model | karthik82 | Fluent UDF and Scheme Programming | 6 | June 30, 2014 03:45 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
[swak4Foam] swak4Foam-groovyBC build problem | zxj160 | OpenFOAM Community Contributions | 18 | July 30, 2013 14:14 |
variable heat source | John | Phoenics | 3 | April 8, 2003 12:12 |
variable heat source simulation | LI Y | FLUENT | 1 | April 8, 2003 00:46 |