|
[Sponsors] |
September 5, 2020, 07:27 |
3D Inlet Profile UDF
|
#1 |
New Member
Join Date: Sep 2020
Posts: 2
Rep Power: 0 |
Hi everyone,
I am currently trying to create a UDF that creates an inlet profile that mimics the equation (x^2 + z^2), but will also need to have other profiles which change the apex of the parabola (i.e. shift apex up or down a select height). I have gone through various ANSYS manuals to try and understand and create one. However, I have had no success thus far. Attached are the codes which I have used based on various research into this matter as well as photo's of the vectors that come out from each respective code once the simulation was run and the global coordinate (for reference to the axis directions). Any help is greatly appreciated. |
|
September 10, 2020, 12:08 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
The easiest way does not requiere UDF:
Create some extra mesh at the entrance of your geometry, meaning that you can extrude the mesh in your inlet, creating an "auxiliar cilinder" before your inlet. This "pre inlet" will develop your flow, and by the time it reaches your inlet, velocity flow will be already developed in a parabolic flow. This cilinder (I see from your pictures your inlet is a circle, so your "pre inlet will be a cilinder) must be long enough to develop your fluid. Theoretically, you can obtain an estimation of the lenght of the entrance region using the number of Graetz, for example, but I will recomend you to just use a lenght of around 5 or 10 times the diameter of your inlet. You can use the same idea in your outlet. If you don't like my solution, another way for your particular case is to make your velocity profile as a function of the distance to the wall, with the function C_WALL_DIST(c,t). Note this is a function of a cell, and not a face like you want in your code. Just make it work. Greetings. |
|
September 13, 2020, 21:52 |
|
#3 | |
New Member
Join Date: Sep 2020
Posts: 2
Rep Power: 0 |
Quote:
Thanks for your response upeksa. Your first solution seems ideal, however, I was asked to use UDF's, so I can not use the first solution. I will try your second solution soon when I get the chance and post the results. Thanks. |
||
September 16, 2020, 10:00 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
logic in your second UDF is correct.
Just find equation which fits with your coordinate system
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OLAFLOW] The OLAFLOW Thread | Phicau | OpenFOAM Community Contributions | 459 | September 12, 2024 12:47 |
(ask) how to create UDF for inlet velocity profile | sincity | Fluent UDF and Scheme Programming | 83 | May 16, 2022 14:04 |
UDF - Inlet Velocity Profile (Ansys Fluent) | vinayak4399 | Fluent UDF and Scheme Programming | 3 | August 25, 2020 15:15 |
UDF parbolic inlet velocity profile for 3D channel flow. | srv537 | FLUENT | 0 | August 6, 2016 03:21 |
How to apply an outlet velocity profile to another inlet? | siw | FLUENT | 4 | April 10, 2013 12:19 |