|
[Sponsors] |
How to do UDF for temperature profile on a semi-disc? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 25, 2015, 17:13 |
How to do UDF for temperature profile on a semi-disc?
|
#1 | |
New Member
Xavier
Join Date: Mar 2015
Posts: 4
Rep Power: 11 |
Hello everyone,
I'm new in the world of CFD, started it for a school project and I'm struggling with UDFs right now. I've been through the Ansys Fluent UDF Manual (release 14.5 from October 2012) and I still don't get how it works. Here's my problem: I've got this model ; a fluid enter by the inlet and exit by the outlet, the other faces are walls except for the back which is defined as a symmetry. The upside Wall is set to a temperature of 700K and 270K for the downside. What I want to do is to apply a linear variation of the temperature to the front face following the radii. So whichever radius you chose the variation will be the same. I've seen there are define_profile function examples in the manual and managed to use one of theme for a simpler case, but I don't know how to adapt it to my present case. I was thinking of something like : for each point, measure the distance to the origin, using this value to find the equivalent point on a lane for wich I can easily write the temperature profile (for example y=0) and apply the same temperature. But I don't know how to proceed. Does anyone can help me ? Thank you in advance. Note Here the UDF I adapted from the manual for this geometry Quote:
|
||
March 25, 2015, 17:32 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The DEFINE_PROFILE macro is for defining custom boundary conditions, not initialising your domain. It sounds like you're trying to input the expected result into Fluent, whereas Fluent computes the temperature with the energy equation!
Set the inner and outer faces with constant temperatures (270 K and 700 K, respectively, as you've stated) and initialise the domain with the average temperature (485 K). Next, enable the energy equation and solve. If you're having convergence issues and/or really want to initialise the domain with the expected temperature profile, then look into patching. |
|
March 25, 2015, 17:39 |
|
#3 |
New Member
Xavier
Join Date: Mar 2015
Posts: 4
Rep Power: 11 |
Hi, thank you for your reply.
Actually I'm asked by my professor to set up a linear variation of the temperature as an input parameter. I know it's possible since I've done it in the simple case I talked about in my previous post but I don't know how to write properly the UDF for the present model. |
|
March 25, 2015, 17:58 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Well I suppose if you must initialise the temperature within the domain then you could use the DEFINE_INIT macro (set the temperature as you loop through all cells). Furthermore, if you want to force this temperature field at every iteration, then you could use the DEFINE_ADJUST macro (although forcing this temperature field could cause convergence issues).
|
|
March 26, 2015, 05:39 |
|
#5 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
The way I read Reivax' question, it is not an initialization problem, but he really wants a boundary condition.
This is possible, and conceptually not so difficult: instead of Code:
y = x[0]; Code:
y = sqrt(x[0]*x[0]+x[1]*x[1]); In your case, I would say it is much better to put a adiabatic boundary condition on the front wall. So that there is no heat flux through the wall. The outcome will be that the temperature profile is (nearly) linear. And it is much more logical to assume an adiabatic wall than to assume a linear temperature profile. |
|
April 7, 2015, 23:54 |
|
#6 |
New Member
Xavier
Join Date: Mar 2015
Posts: 4
Rep Power: 11 |
Thank you Pakk, your anwser help me solve the problem.
To anwser your question, we simulate a linear variation of the temperature on the to observe its impact on the fluid flow and the htc. |
|
Tags |
define profile, help needed, udf, udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing profile data from a UDF | ral007 | Fluent UDF and Scheme Programming | 1 | October 14, 2015 10:21 |
UDF : velocity, k and epsilon (radial profile) | cdiako | Fluent UDF and Scheme Programming | 23 | July 30, 2013 09:29 |
defining temperature profile with UDF | mohammadkm | Fluent UDF and Scheme Programming | 11 | July 3, 2013 01:15 |
Read profile file from UDF | DonQuijote | Fluent UDF and Scheme Programming | 0 | February 18, 2013 12:56 |
Help please! UDF for Temperature profile in 3D | subhankar_bhandari | Fluent UDF and Scheme Programming | 2 | August 16, 2010 09:37 |