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

Modeling a turbine using momentum source udf

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2021, 19:22
Post Modeling a turbine using momentum source udf
  #1
Member
 
Mohammad Shafiee
Join Date: Apr 2021
Posts: 30
Rep Power: 7
Mohammad74 is on a distinguished road
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
Mohammad74 is offline   Reply With Quote

Old   August 17, 2021, 20:59
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
Mohammad74 likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 18, 2021, 14:08
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
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.
Mohammad74 likes this.
__________________
"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".
pakk is offline   Reply With Quote

Reply

Tags
actuator line, time dep. source term, udf and programming


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
Is it possible to plot momentum source defined using UDF? CaptainCombo Fluent UDF and Scheme Programming 9 February 20, 2023 17:04
Using PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 35 April 29, 2022 15:35
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


All times are GMT -4. The time now is 07:15.