Applying a heat source inside a fluid domain
Hello,
I am essentially trying to make a simple model of a hot wire inside a fluid domain, I'm starting with very simple geometry (pic below). I'm only interested in the heating from the wire, so my first thought was to use a UDF to define an energy source in a region in the fluid zone. However, this doesn't seem to work. I am new to UDF's so most likely my code is wrong (attached below).
Is there a better way to go about the problem?
#include "udf.h" DEFINE_SOURCE(sourceterm,c,t,dS,eqn) { real x[ND_ND]; real source; C_CENTROID(x,c,t); if(x[0]>=5 && x[0]<=10 && x[1]>=0 && x[1]<=12) { source=50000; } else { source=0; } return source; }
Tagged:
Answers
Hello,
What issue do you get when you compile this UDF? Can you share the error message here?
Also, why don't you use the Fluent Expressions directly here? Here is a link that might help you with the expression. Please go through this chapter in the Users Guide.
Thank you.
Karthik