Heat flux profile UDF
Hi everyone, I want to write an UDF that allow me to change the profile of the heat flux on a solar PANEL, using an equation as shown in the attached image, and another shows the computational domain and the boundary conditions .
Well, I wrote a UDF but when I compiled present errors, I can not fix them. So please help me to find the right text of my UDF. Greetings. Code:
#include "udf.h" http://s23.postimg.org/x8oe0fep7/equation.jpg |
It would be helpful if you would add the errors that you get. The errors give hints about what is wrong.
Regardless: I immediately see there is a problem with your line "temp = F_T(f,t); ": you try to use face f where it has not been initialized yet. I think this line should be further down, just above your if-statement. |
Quote:
temp definition shadows previous definition Error: C:\Users\Mohamed\Desktop\prof.c: line 16: parse error. Error: C:\Users\Mohamed\Desktop\prof.c: line 20: temp: no function prototype |
These are the kind of errors you see when you interpret. In your question, you were talking about compile. Please be more accurate in the future.
In addition to the mistake I mentioned before, you made two mistakes: *In line 19 you missed one bracket ")". *In line 23 you missed one space (elseif should be else if) Some compilers might accept "elseif", but if it gives errors then just change it. If you change this, your code will compile (and be interpreted). I did not check if it will do what you expect from it. |
Quote:
|
All times are GMT -4. The time now is 23:51. |