|
[Sponsors] |
August 17, 2014, 19:46 |
volumetric energy source problem
|
#1 |
New Member
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13 |
Hi guys
i am trying to simulate a constant volumetric energy source in a specific zone in my domain in fluent so all the cells within that zone would have same source energy . i wrote the below udf but the problem is temperature wouldn't increase within the zone ....i have already applied the udf to the specific zone....any idea? thanks #include "udf.h" DEFINE_SOURCE(energy_source,c,t,dS,eqn) { real x[ND_ND]; real source; C_CENTROID(x,c,t); source = 50000000000 ; return source; } |
|
August 18, 2014, 11:55 |
|
#2 |
New Member
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13 |
Hey Guys
I changed the udf as below but still there is no change in the temperature inside my zone, any ideas? Thanks. #include "udf.h" DEFINE_SOURCE(energy_source,cell,thread,dS,eqn) { real source; source = 500000000.; return source; } |
|
August 18, 2014, 15:41 |
|
#3 |
New Member
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13 |
any suggestions guys? thanks
|
|
October 26, 2014, 00:40 |
|
#4 |
New Member
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13 |
any help guys?
|
|
October 31, 2014, 18:33 |
|
#5 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Did you try with the dS[eqn] line?
Code:
DEFINE_SOURCE(energy_source,cell,thread,dS,eqn) { real source; source = 500000000.; dS[eqn] = 0.; return source; } |
|
October 31, 2014, 19:47 |
|
#6 |
New Member
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13 |
no it doesn't work i tried it before. i am confused , when i go to my zone in fluent and define the same value as constant parameter it works fine but when i use the above udf nothing happens. i need to do this with udf since i need to make it change with time in the next step.
|
|
October 31, 2014, 19:53 |
|
#7 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Have you tried with both interpreted and compiled udf?
|
|
October 31, 2014, 20:25 |
|
#8 |
New Member
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13 |
I always interpret(not compiling) my udfs and they worked fine before .when I tried to compile this one it gave an error but I am not sure if this is the source of my problem since it interprets the udf without an error and I can choose it in my zone in fluent.
Thanks for your response . |
|
November 5, 2014, 04:24 |
|
#9 |
Member
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 15 |
And you did specify the source term in the cell zone?
|
|
November 6, 2014, 07:34 |
|
#10 |
Senior Member
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17 |
Your cell c and thread t should specifically refers to the zone on which you want to apply source.
You can trace the thread using lookup_thread macro. Best wishes Mvee |
|
November 6, 2014, 07:37 |
|
#11 |
Senior Member
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17 |
Again, if your source is constant value then you need not to define it through UDF. You can implement it through cell zone conditions.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] OpenFOAM Installation for navalFoam | sachinlb | OpenFOAM Community Contributions | 22 | July 28, 2017 06:26 |
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error | FerdiFuchs | OpenFOAM Community Contributions | 27 | April 16, 2014 16:14 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |
energy source problem | fluboy | Fluent UDF and Scheme Programming | 2 | January 10, 2010 09:56 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |