|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Mohammad Shafiee
Join Date: Apr 2021
Posts: 30
Rep Power: 7 ![]() |
Hello,
I want to model a wind turbine in ansys fluent using actuator line theory and source term macros. I came across the questions below and I havent been able to find their answers: 1. How can I read the velocity at a point (with known coordinates) in the domain? I know that i can loop over all the cells to find the cell that I'm looking for, but Is this the only way? or is there another more straightforward macro that does not need a cell loop across all of my domain? 2. Also I'm using DEFINE_ADJUST macro to run my momentum source algorithm at every iteration. But since this is a transient simulation, how can I use different time steps in my UDF? I mean to read velocity at a point in different time steps or moving the location of momentum source terms in the domain. Thanks ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 ![]() ![]() |
1. I don't know other way, this is the most straightforward
2. To define source you you want use define_source macro, isn't it define_adjust is macro to be executed before each iteration/timestep you can read your velocity, modify coordinates and whatever at any moment
__________________
best regards ****************************** press LIKE if this message was helpful |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 ![]() |
1. CX_Find_Cell_With_Point used to work, but is undocumented and I really don't know if it still works.
Once you used this to find the cell in which the coordinate is, the rest is easier.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
![]() |
![]() |
![]() |
Tags |
actuator line, time dep. source term, udf and programming |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 36 | July 16, 2024 03:52 |
Is it possible to plot momentum source defined using UDF? | CaptainCombo | Fluent UDF and Scheme Programming | 9 | February 20, 2023 17:04 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 09:07 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 06:42 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 13:59 |