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

How to put the wind-profile in inlet (depends on height)

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By LuckyTran
  • 1 Post By sufjanst
  • 1 Post By sufjanst
  • 1 Post By Roh
  • 1 Post By bpulat
  • 1 Post By bpulat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2019, 22:34
Default How to put the wind-profile in inlet (depends on height)
  #1
New Member
 
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7
bietchetlien1995 is on a distinguished road
Hello every one! I'm a newbie in the using the Fluent.
Now I'm do my research about CFD - simulating the wind flow over the building and check the result with real wind tunnel test.
(I'm looking for anyone who now is doing, we can more discuss).

About my question.
How can I put the wind velocity in the Fluent if it changes depending on the height!

Thank you so much!
bietchetlien1995 is offline   Reply With Quote

Old   February 19, 2019, 23:53
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,677
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Using PROFILES


or UDF
bietchetlien1995 likes this.
LuckyTran is offline   Reply With Quote

Old   February 20, 2019, 03:08
Default
  #3
Member
 
Join Date: Mar 2016
Posts: 73
Rep Power: 10
sufjanst is on a distinguished road
You can create a Inlet Profile using matlab or python (or whatever language you want). The profile includes the x,y,z coordinates and the value. You can import it to fluent and set is as a BoCo.

Or you can use a UDF like LuckyTran said.
bietchetlien1995 likes this.
sufjanst is offline   Reply With Quote

Old   February 20, 2019, 05:23
Default
  #4
New Member
 
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7
bietchetlien1995 is on a distinguished road
pls give me anywhere I can study about this one? thank you!
bietchetlien1995 is offline   Reply With Quote

Old   February 20, 2019, 05:28
Default
  #5
Member
 
Join Date: Mar 2016
Posts: 73
Rep Power: 10
sufjanst is on a distinguished road
Just write a profile of an existing simulation in fluent and you can see the syntax of a profile. Try do adapt it to your profile and that's it.
bietchetlien1995 likes this.
sufjanst is offline   Reply With Quote

Old   February 21, 2019, 03:28
Wink
  #6
Roh
Senior Member
 
Join Date: Sep 2017
Posts: 130
Rep Power: 8
Roh is on a distinguished road
To export a profile and see how Fluent write a profile:


File>Export>Profile...


To import your profile after writing one of them and use it in your simulation:


Boundary conditions> Profiles...


After importing your profile, you can see the profile in the drop-down list of your parameter e.g. velocity and select it. For example I've showen in the below screenshot, the temperature profile that use in my project.









But if your profile varied depend on any other parameter, you need to write a UDF to change the profile. It's so simeple. Read this page:




https://www.sharcnet.ca/Software/Flu...udf/node42.htm




Hope this helps!
Attached Images
File Type: jpg sjdjhfsdkljgot.jpg (103.2 KB, 111 views)
bietchetlien1995 likes this.
Roh is offline   Reply With Quote

Old   February 21, 2019, 21:55
Default
  #7
New Member
 
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7
bietchetlien1995 is on a distinguished road
Thank Roh!
I thought it's better if I define a UFD, the main thing here, I'm not so familiar with C language!
bietchetlien1995 is offline   Reply With Quote

Old   February 22, 2019, 04:37
Default
  #8
Member
 
Baris PULAT
Join Date: Sep 2016
Location: Italy
Posts: 59
Rep Power: 9
bpulat is on a distinguished road
I believe if you read what LuckyTran linked in the previous answers you can pretty much do it yourself.
Quote:
Using PROFILES


or UDF
You don't need to fully understand C to work with fluent UDF.
I will give another link to you where you can try to adapt this to your case.
Example
If there is still a problem with your UDF, post here again with your code so we can help it.
bietchetlien1995 likes this.
bpulat is offline   Reply With Quote

Old   February 22, 2019, 05:50
Default
  #9
New Member
 
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7
bietchetlien1995 is on a distinguished road
#include "udf.h"
DEFINE_PROFILE(log_velocity,thread,index)
{
real y[ND_ND];
real x,z;
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(y,f,thread);
x = y[1];
z = y[2];
if (x<2)
{
F_PROFILE(f,thread,index) = 0.;
} else {
F_PROFILE(f,thread,index) = 26.22*log(x/2)/log(149.5/2);
}
end_f_loop(f,thread)
}
}



Here I found out in the internet and all ready modified and it worked.
By the way, I wanna ask about, what is the F_centroid mean? And if we create the geometry it will wrong if we move the central of axises. (x,y,z) Right?
bietchetlien1995 is offline   Reply With Quote

Old   February 22, 2019, 05:54
Default
  #10
New Member
 
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7
bietchetlien1995 is on a distinguished road
Btw, thank all of you so much!
bietchetlien1995 is offline   Reply With Quote

Old   February 22, 2019, 06:29
Default
  #11
Member
 
Baris PULAT
Join Date: Sep 2016
Location: Italy
Posts: 59
Rep Power: 9
bpulat is on a distinguished road
This link will help out with your first question : Face Macros
For the second question i didn't understand what you really meant about being wrong.
bietchetlien1995 likes this.
bpulat is offline   Reply With Quote

Old   February 22, 2019, 09:49
Default
  #12
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,677
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I am appalled that you went straight to the non-intuitive UDF instead of the intuitive PROFILE, which was only a few button clicks and you would have been done days ago. You're such a masochist! And you must love spending a lot of time doing things!

Btw I hope you know that y[0],y[1], and y[2] are the (1st,2nd,3rd) coordinates which are normally (x,y,z). Of course you are free to use whatever variable names you like.

F_CENTROID is a macro returning the coordinates at the centroids of the faces in the thread specified. These coordinates belong to the global system, so if you move the geometry around, they will follow it.
LuckyTran is offline   Reply With Quote

Old   February 22, 2019, 21:43
Default
  #13
New Member
 
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7
bietchetlien1995 is on a distinguished road
Oh man! LuckyTran!
I'm not that type, when I came here to ask, I already watched some video about UFD. So, my brain just wanted to finish them perfectly. And the code just in C language, so it made me hard, if ANSYS uses the mathlab, maybe be I've done long time ago. ^^
Btw, your answer was so great! are you a Vietnamese?
bietchetlien1995 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
Inlet wind velosity Profile sameera1st Fluent UDF and Scheme Programming 0 August 7, 2017 06:40
Inlet Boundary profile for compressible flow uday sarkar FLUENT 1 November 20, 2015 09:24
3D pipe flow :: how to create non uniform inlet profile. thess FLUENT 1 May 30, 2014 02:43
NON-UNIFORM VELOCITY INLET BOUNDARY PROFILE MURAT Main CFD Forum 0 December 30, 2003 21:08
create logarithmic wind profile for inlet Murat Main CFD Forum 0 December 30, 2003 00:45


All times are GMT -4. The time now is 23:48.