CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

volumetric energy source problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2014, 19:46
Question volumetric energy source problem
  #1
New Member
 
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13
kouroshp is on a distinguished road
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;
}
kouroshp is offline   Reply With Quote

Old   August 18, 2014, 11:55
Default
  #2
New Member
 
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13
kouroshp is on a distinguished road
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;
}
kouroshp is offline   Reply With Quote

Old   August 18, 2014, 15:41
Default
  #3
New Member
 
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13
kouroshp is on a distinguished road
any suggestions guys? thanks
kouroshp is offline   Reply With Quote

Old   October 26, 2014, 00:40
Default
  #4
New Member
 
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13
kouroshp is on a distinguished road
any help guys?
kouroshp is offline   Reply With Quote

Old   October 31, 2014, 18:33
Default
  #5
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
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; 
}
macfly is offline   Reply With Quote

Old   October 31, 2014, 19:47
Default
  #6
New Member
 
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13
kouroshp is on a distinguished road
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.



Quote:
Originally Posted by macfly View Post
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; 
}
kouroshp is offline   Reply With Quote

Old   October 31, 2014, 19:53
Default
  #7
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
Have you tried with both interpreted and compiled udf?
macfly is offline   Reply With Quote

Old   October 31, 2014, 20:25
Default
  #8
New Member
 
kourosh
Join Date: Aug 2013
Posts: 10
Rep Power: 13
kouroshp is on a distinguished road
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 .

Quote:
Originally Posted by macfly View Post
Have you tried with both interpreted and compiled udf?
kouroshp is offline   Reply With Quote

Old   November 5, 2014, 04:24
Default
  #9
Member
 
Jim Knopf
Join Date: Dec 2010
Posts: 60
Rep Power: 15
JimKnopf is on a distinguished road
And you did specify the source term in the cell zone?
JimKnopf is offline   Reply With Quote

Old   November 6, 2014, 07:34
Default
  #10
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
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
mvee is offline   Reply With Quote

Old   November 6, 2014, 07:37
Default
  #11
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
Again, if your source is constant value then you need not to define it through UDF. You can implement it through cell zone conditions.
mvee is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 03:30.