CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

2 dimension temperature profile as boundary condition in FLUENT

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2017, 12:58
Default 2 dimension temperature profile as boundary condition in FLUENT
  #1
kzf
New Member
 
hujek
Join Date: Jun 2014
Posts: 25
Rep Power: 12
kzf is on a distinguished road
hello

I want to define on some surfaces, 2-dimension temperature profile on pipe surface as boundary conditions, profile will be a simply linear gradient. Someone know how can I do this in fluent?

I try to define it on Setup boundary conditions in wall, when energy calculation is on, Can i add this as new input parameter on position temperature?? Maybe some one know how can I load to fluent properly script or where I can find one?

as i think I have to write equation where input temperature will be a surface function?
kzf is offline   Reply With Quote

Old   September 26, 2017, 17:52
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,735
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
This can be done with a PROFILE. Check the tutorial in the user's guide for more info. You can quite easily generate a linear profile if you understand the syntax but for higher fidelity I recommend to do the following...

Go to Boundary Conditions and click the profiles button. Choose your wall and write a profile for any temperature field. This will create a .prof file that you can use as an example and also edit! Remember to initialize your case so that there is a temperature field to write.

The file has some easy to understand syntax.

Code:
((arbitraryProfileName point #####)
(x
list of mesh x locations
)
(y
list of mesh y locations
)
(z
list of z locations
)
(temperature
list of temperatures
)
)
You need only replace the temperatures with your boundary condition (use excel/matlab/or a strong text editor). The benefit of writing the .prof first is that you get the list of cell locations, which minimizes interpolation errors.

For a plane bounded in the z=0 plane you could get away with something like this and rely on Fluent's interpolation. Here I just specify the four corners (0,0,0) = 300K,(1,0,0) = 1000K, (0,1,0)=300K, & (1,1,0)=1000K

Code:
((myName point 4
(x
0
1
0
1
)
(y
0
0
1
1
)
(z
0
0
0
0
)
(temperature
300
1000
300
1000
)
)
For a generalized 3D surface you need to supply the x,y,z-coordinates also so it is recommended to write the .prof as-is.

Once you read the .prof again, you will be able to select it as the boundary condition.
LuckyTran is offline   Reply With Quote

Old   September 28, 2017, 12:04
Default
  #3
kzf
New Member
 
hujek
Join Date: Jun 2014
Posts: 25
Rep Power: 12
kzf is on a distinguished road
Hello

Thank you for good advice.

Last edited by kzf; October 8, 2017 at 04:54.
kzf is offline   Reply With Quote

Old   October 8, 2017, 06:56
Default
  #4
kzf
New Member
 
hujek
Join Date: Jun 2014
Posts: 25
Rep Power: 12
kzf is on a distinguished road
I decide to use UDF for set boundary condition in wall as profile temperature.

#include "udf.h"

DEFINE_PROFILE(gradient_temp,thread,nv)
{
face_t f;
real x[ND_ND];

{
F_CENTROID(x,f,thread);
F_PROFILE(f,thread,nv) = 300x[1];

}
end_f_loop (f,thread)
}

Can somene tell me where is the begin local cordinates where F_PROFILE starting a temperature profile?

How can i check coordinates on face?

(0,0) point is in the Centroid of face?

I try to control this temperature profile, because i want to make it as a simply linear gradient, but it is difficult.

Can someone have an idea how can i set temperature what i want on the begining face and on the end of face?

How can I find direction of local X axis?
kzf is offline   Reply With Quote

Old   October 9, 2017, 21:58
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
x[0] is X axis
x[1] is Y axis

Best regards
AlexanderZ is offline   Reply With Quote

Old   October 11, 2017, 13:37
Default
  #6
kzf
New Member
 
hujek
Join Date: Jun 2014
Posts: 25
Rep Power: 12
kzf is on a distinguished road
thanks alexander,
looks like for me the best way to control profile was to wrote correct logical expression, finally i understand UDF syntax

But i wonder how can i use method LuckyTrain, this looks more difficult than use a UDF.

The main difficult what I see is when I have a lot of faces, typing temperature for each cell will be very time consuming.

so is there any simpliest way than manually edit .prof file? Maybe someone have some good ideas to write a macro for this?
kzf is offline   Reply With Quote

Old   October 12, 2017, 00:49
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,735
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by kzf View Post
The main difficult what I see is when I have a lot of faces, typing temperature for each cell will be very time consuming.

so is there any simpliest way than manually edit .prof file? Maybe someone have some good ideas to write a macro for this?
That's why I said to use excel/matlab or a high level text editor. I've used this approach to generate perturbed initial conditions for LES simulations on a 96million+ grid. So to me, I don't see where the complexity is. Again, I like this approach because you can see what you are doing and you literally give a column of values. It requires no knowledge of how to do UDF's and the syntax of the profile is easy to show by a simple example. I don't deny that a UDF can work.

I don't like the UDF route for any problem because it is not a simple solution in my opinion. And quite honestly, in my 10 years of CFD have never explicitly needed to use a UDF (that couldn't be solved via more simple and obvious means) except for when using personalized models like fudging the eddy viscosity or building custom solvers. You can call it a personal preference and prejudice against UDF's.
LuckyTran is offline   Reply With Quote

Old   March 12, 2018, 11:51
Default
  #8
New Member
 
Jimmy Lee
Join Date: Jun 2017
Posts: 19
Rep Power: 9
jimmy871013 is on a distinguished road
Dear LuckyTran:

Thanks for your reply in this post. I used your method to map temperature results from other simulation software to my Fluent mesh boundary. I got the .prof file from Fluent, I choose one boundary then use profile button to get X-coordinate, Y-coordinate,Z-coordinate and wall temperature. When I open the .prof file I found there are not only 4 kinds of data in file, but also other 3 kinds of data (X,Y,Z).



So can you explain what is the X,Y,Z data? THX~~~And I use the The X-coordinate, Y-coordinate,Z-coordinate to make the point in the model making software. I found the points is a little be away from the surface(not on the surface). I do't know what are the points? Do the points represent the center of cells on the boundary? THX for your answer.

I change the wall temperature data based on other simulation. I rewrite .prof file then use Fluent let the boundary read the new .prof file. But after I initialized the simulation, I cannot see the temperature distribution on the boundary , can you give me some advise? THX~~~
jimmy871013 is offline   Reply With Quote

Old   June 1, 2021, 06:28
Post
  #9
Member
 
Raj
Join Date: Jan 2020
Posts: 92
Rep Power: 6
Rajkool is on a distinguished road
Hello Mr. Kzf, Mr. Luckytran, and Mr.Alexander,

I am working on a similar model. But in my case, the profile editing approach suggested did not work. So I would like suggestions for my issue.

I am working in Ansys fluent. In my 3D model, I have a wall that has 4000 points or nodes of the mesh. I would like to give temperature only for some mesh coordinates for the wall (say around113 nodes) for my model. But, as I am giving temperature to some nodes, Ansys fluent showing an error (which can be seen in the image).

But, if I give temperature to all points or nodes (See the screenshot). Ansys is taking it as a forced boundary condition, which is not at all acceptable. I need the surrounding temperature of the profile to be varied according to my provided temperture. So, I would like to take suggestions like is there any option in Fluent or any other approach for limiting the temperature to some nodes and other nodes that can show temperature variation. Please let me know if you need any other information.

Thank you in advance
Raj
Attached Images
File Type: png Capture.PNG (14.0 KB, 7 views)
File Type: png S5.PNG (53.2 KB, 11 views)
Rajkool is offline   Reply With Quote

Old   June 1, 2021, 21:02
Default
  #10
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
User defined boundary condition for profile of wall
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
transient pressure and temperature boundary condition profile inicialization Aurora23 FLUENT 2 April 21, 2015 16:01
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
problem about periodic boundary condition in Fluent winnawinna FLUENT 0 December 28, 2010 23:32
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 15:31.