|
[Sponsors] |
How to put the wind-profile in inlet (depends on height) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 19, 2019, 22:34 |
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 |
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! |
|
February 20, 2019, 03:08 |
|
#3 |
Member
Join Date: Mar 2016
Posts: 73
Rep Power: 10 |
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. |
|
February 20, 2019, 05:23 |
|
#4 |
New Member
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7 |
pls give me anywhere I can study about this one? thank you!
|
|
February 20, 2019, 05:28 |
|
#5 |
Member
Join Date: Mar 2016
Posts: 73
Rep Power: 10 |
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.
|
|
February 21, 2019, 03:28 |
|
#6 |
Senior Member
Join Date: Sep 2017
Posts: 130
Rep Power: 8 |
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! |
|
February 21, 2019, 21:55 |
|
#7 |
New Member
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7 |
Thank Roh!
I thought it's better if I define a UFD, the main thing here, I'm not so familiar with C language! |
|
February 22, 2019, 04:37 |
|
#8 | |
Member
Baris PULAT
Join Date: Sep 2016
Location: Italy
Posts: 59
Rep Power: 9 |
I believe if you read what LuckyTran linked in the previous answers you can pretty much do it yourself.
Quote:
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. |
||
February 22, 2019, 05:50 |
|
#9 |
New Member
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7 |
#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? |
|
February 22, 2019, 05:54 |
|
#10 |
New Member
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7 |
Btw, thank all of you so much!
|
|
February 22, 2019, 06:29 |
|
#11 |
Member
Baris PULAT
Join Date: Sep 2016
Location: Italy
Posts: 59
Rep Power: 9 |
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. |
|
February 22, 2019, 09:49 |
|
#12 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,677
Rep Power: 66 |
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. |
|
February 22, 2019, 21:43 |
|
#13 |
New Member
Michael Fily
Join Date: Feb 2019
Posts: 24
Rep Power: 7 |
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? |
|
|
|
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 |