Quote:
I will read the UDF manual again to find the right function for the problem. I have seen codes in which Define_Profile modifies heat flux or other boundry conditions in terms of time or geometry, but I did not find any example of defining temperature dependent heat flux with this function. I read somewhere that this function cannot define such a boundry condition. Thanks a lot, |
Modify
You can modify the following as per your requirement. I am writing it assuming heat flux is dependent upon a coefficient and temperature difference from a reference temperature.
#include "udf.h" #define sCoeff 0.276 /* This and next can also be defined inside the function */ #define sRefTemp 320.0 DEFINE_PROFILE(tBasedHFlux, th, id) { face_t f; begin_f_loop(f,th) { F_PROFILE(f, th, id) = sCoeff * (F_T(f, th) - sRefTemp) } end_f_loop(f,th) } You can apply it on any wall boundary. Actually, the code does not care. You can apply it on inlet, outlet, wherever you want. Do note that the output is not heat flux but a profile of some values. If applied to heat flux boundary, it behaves like heat flux and if applied to temperature, it behaves like temperature. F_T is the temperature of the boundary where this UDF is applied. Fluent provides this value. All values are in SI. |
Quote:
I do not know how to thank you for the time taking to respond me. I hope you good fortune in the projects to come. Regards, |
Hi Vinerm,
I tried your code and faced the same error. http://s7.picofile.com/file/83886695..._VIOLATION.JPG I am trying to find the solution for my errors. I found the below pdf file which I think is very useful. https://drive.google.com/file/d/1pQn...ew?usp=sharing Regards, |
Error
Where did you hook the code? Was it at a boundary? You seem to be using Fluent 6.3.26. Do note that you need to initialize the case before hooking the UDF.
|
Dear Vinerm,
The error was solved. Yes, I'm using Fluent 6.3 on Windows XP. Unfortunately, I do not have access to License Manager of Ansys Workbench and, therefore, I should think about mass transfer mechanism for evaporation and condensation phenomenon. However, now that the Access_Violation error has solved and the case has almost completed, I can go somewhere for running on newer version of Ansys Fluent. Again, thank you very much for the time and effort. Regards, |
Good
Nice to know that the issue got resolved. But could you also mention how it got resolved so that it could be helpful to others?
|
Thanks,
I think the initialization before interpreting the UDF was the solution. I do not know why this can affect ACCESS_VIOLATION error. I wonder whether the first code I used to run (Define_heat_Flux) can also work if I interpret it after initialization. It does not matter anymore, thogh. And finally, can I ask another question? Is it possible to read the temperature of a wall and insert it into another wall's boundary consition in UDF? In other words, we want to define a boundary conditioon that connects the temperature of two walls. How can we define a coupled boundary condition in a single UDF code? By the way, I should thank you again for all your advice. Hope you good fortunes in the projects to come. Regards, |
Coupling
Yes, you can read temperature from one boundary and use it to apply some condition at another. It could be same or after some modifications.
|
That is great.
Thanks, |
Another question about UDF and Thermoelectric:
I need to define Joul heating as a heat sourse as per: Q = I^2 * R ; I : electriccurrent , R : electric resistance Based on the Fluent UDF manual, I tried to use Define_Source function and apply it to the thermoelectric zone in my case. Since it is not for a wall or boundary condition, I did not use Define_Profile. Here is the UDF: --------------------------------------------------------------------- #include "udf.h" DEFINE_SOURCE(Joule_heating, cell, thread) { real Joule_h,I,R,V; I=5; R=2; V=0.0006; // The volume of TEC per unit depth [m^3/m] Joule_h = R*I*I/V; // Joule heating [W/m^3/m] return Joule_h; } ------------------------------------------------------------------------ I would appreciate it if anyone could let me know whether or not this is true. It should be noted that the code has been successfully interpreted by Fluent. Regards, |
UDF and value
The UDF as such is correct, but not needed. Since the value is not changing, you can apply a constant value within the cell zone.
For applying source terms, only DEFINE_SOURCE is applicable, DEFINE_PROFILE cannot be used. However, DEFINE_PROFILE can be used for profiles on boundary as well as cell zones. |
Hi Vinerm,
Thank you very much. The amount of heat source might vary versus temperature in my future studies. So I used Define_Source. For example, resistivity of the thermoelectric material might change with temperature. I think I should use "C_T(cell,thread)" to apply tempreature into the code. Regards, |
Quote:
Could anybody please inform me whether or not License Manager of Ansys can make problems for another software's License Manager like Amesim? |
Temperature
Yes, you can use C_T(cell, thread) to access temperature of a cell.
Newer license managers from Ansys are not based on FlexLM, so, the changes for conflict with others are less. However, if the port required is same, then it could cause trouble. Ansys uses 1055 and 2325. You can modify these in the license file, reread the license file, and then change these at client machine. |
Thanks again,
Amesim uses 5053 as I can recall. I have tried to define environment variable as 5053@localhost. But the problem was not solved. By the way, thank you for the time and effort. |
Hostname
Sorry, I have no idea about Amesim, however, localhost may not work with any license manager. License service requires the name of the host machine serving the license.
|
All times are GMT -4. The time now is 18:13. |