|
[Sponsors] |
December 19, 2023, 22:05 |
Simple UDF Example
|
#1 |
Senior Member
Brett
Join Date: May 2013
Posts: 216
Rep Power: 14 |
Hey guys,
Standard post here, UDF help. No idea where to start. I'm using Fluent I've got a model where I'm calculating the velocity through a slice in the domain, that's a report def called "slice velocity" The outlet to my model is a mass flow rate outlet. What I would like to do is adjust the mass flow rate outlet after every iteration to target a specific slice velocity. Any ideas?? |
|
December 21, 2023, 02:24 |
|
#2 |
Member
Thamilmani M
Join Date: Sep 2017
Location: IIT Bombay, Mumbai
Posts: 52
Rep Power: 9 |
If I understood correctly, you are changing your outlet boundary condition specifications after every iteration based on a value?
Try creating DEFINE_PROFILE() may be, and change the boundary condition (massflow rate in your case) and calculate the value based on the slice velocity?
__________________
Always Thedal |
|
December 21, 2023, 08:19 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
that is not that trivial task
depends on the difference in geometry of slice and outlet approaches could be different in case you need average value from slice -> its relatively easier I don't member exactly, but you may try to make and interior instead of slice, than you would be able to get data from that interior inside UDF to make an interior you need to split your mash in advance -> you would have 2 zones with same material and a boundary between them with type interior other option is to write profile of report def called "slice velocity" and attach it to the outlet you would need TUI script to do that (and it would work smoothly only in case your slice has the same geometry with outlet)
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 30, 2023, 23:38 |
|
#4 |
Senior Member
Brett
Join Date: May 2013
Posts: 216
Rep Power: 14 |
Thanks guys,
yep looking to change every iteration. I'm super new to UDFs so I'm completely in the dark, any examples? I suppose I'm trying to "target" a velocity through the "slice" which is through an internal part of the domain, in this case the area around cooling fins in an electric motor. There is an outlet downstream that I'm setting as mass flow rate. Any help much loved. |
|
Tags |
c code, fluent, programmable, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simple UDF for piston movement | NicolasCheshire | Fluent UDF and Scheme Programming | 1 | October 7, 2016 11:36 |
Simple parabolic velocity UDF with symmetry - what am I not understanding!?! | NPGrad | FLUENT | 1 | September 30, 2016 12:42 |
Error in Simple UDF! | Abhya | Fluent UDF and Scheme Programming | 1 | March 14, 2013 09:36 |
FLUENT UDF Simple error. | startup0820 | Fluent UDF and Scheme Programming | 0 | August 14, 2012 04:54 |
simple rigid body motion UDF | Dan | FLUENT | 0 | January 11, 2006 06:48 |