Changing Heat source with position (UDF)
Hi everybody,
I have a heat source that is changing within the distance of my model. I would like to know which is the best way to program it. I have tried with DEFINE_PROFILE and DEFINE_SOURCE but I'm still not getting satisfactory results. I am new in C langauge. Thank you for your help, Luis 
Quote:

Thank you Ilrr,
Yes, in fact I am using DEFINE_SOURCE function but I still don't have good results. My UDF is like follows: Quote:
Luis 
Could you be a bit more specific about the results being "not good"?
Or maybe even provide some details about your setup. 
Well my model is a simple 2D heat simulation with microwave (heat generates directly in the liquid)
I am using Lambert's equation to model the heat generated. This equation says that heat generated decreases exponentially with distance. I am getting the opposite results (the temperature is lower next to the wall). There is a negative exponential in the equation, so I don't know what I am defining wrong in my UDF code. 
Quote:

Quote:

How can I define a local coordinate system for a specific UDF?

Quote:
if (0.1<x[1]<0.5) source=... 
Quote:
Thank you for your suggestion, but what I really need is that the heat source function starts calculating from the wall (Like if the wall was heating the fluid) instead of the center of the fluid (where my (0,0) coordinate is located). Like if the heat was generated from the wall to the center, not from the center to the wall Any idea how to solve this?. Here is my code with some small changes Quote:

Nobody? :(

Quote:
source = (85714*(exp((yy_wall)/0.1245))); where y_wall is the yposition of the wall 
Quote:
Maybe I have to make operations with vectors?. Like if I want that my point [0 0] is in fact my point [0 0.04]. 
So your wall is at a yposition of 0.04 and you want your source term to decrease away from the wall, where the yposition is SMALLER than 0.04?
Then there is just a wrong sign in your equation. source = (85714*(exp(+(yy_wall)/0.1245))); 
Quote:
But the heat source is supposed to decrease from the wall to the center hence the negative sign. A positive sign would make it increase. Rght? 
exp(y) increases with INCREASING y, thats right.
But what I got from the information you gave so far is that your yposition DECREASES away from the wall. Hence you need the positive sign for your heatsource to decrease. Could you post a few images for clarification? 
All times are GMT 4. The time now is 20:19. 