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

Modify parameter from scheme or UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2019, 06:47
Default Modify parameter from scheme or UDF
  #1
New Member
 
Théophile Schenker
Join Date: May 2019
Posts: 2
Rep Power: 0
theophile is on a distinguished road
Hello !

I am creating a database to train a deep neural network that will give lift and drag forces, knowing pressure measurements, for a simple 2D airfoil shape (proof of concept).

I am using DesignPoints to run the simulation with various angles of attack and velocity magnitudes. The simulations are sent to a remote solve manager.

The geometry is constant, and the direction of the flow varies (to change the angle of attack).

At first, I am doing this in steady state. Here the inputs (angle of attack, magnitude) are workbench variables, and the output (pressure profile, drag, lift, residuals...) are written to a file using a UDF. This all works fine.

My problem comes when going to transient: I want to read input files to define the transient input velocity for each time step. I think I can do this easily with the DEFINE_PROFILE function. But I also need to change the gravity as a function of the angle of attack. How can I change the gravity (the option in fluent general tab) from the UDF ? In steady state I use a workbench parameter. But in transient it should change during the simulation.

More generally, is it possible to modify a workbench input parameter from fluent during a simulation ? (using udf or scheme)

Thank you very much in advance !
theophile is offline   Reply With Quote

Old   May 22, 2019, 22:41
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
I don't know about UDF, seems its not available , but in scheme:
Code:
(format #f "define operating-conditions gravity yes 0 0 1")
for journal:
Code:
(ti-menu-load-string (format #f "define operating-conditions gravity yes 0 0 1"))
It will make gravity in Z-direction 1[m/s2]

best regards
AlexanderZ is offline   Reply With Quote

Old   May 24, 2019, 18:45
Default
  #3
New Member
 
Théophile Schenker
Join Date: May 2019
Posts: 2
Rep Power: 0
theophile is on a distinguished road
Thank you very much ! I'll try this.
theophile is offline   Reply With Quote

Old   April 14, 2021, 11:54
Default
  #4
New Member
 
saeed akhavan
Join Date: Aug 2016
Posts: 4
Rep Power: 9
saeedakhavan is on a distinguished road
Hi Théophile.
You can disable gravity and use momentum source term instead.
saeedakhavan is offline   Reply With Quote

Reply


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
UDF input parameter "unable to find rpvar" sergiocavaleirocosta Fluent UDF and Scheme Programming 4 March 26, 2019 07:57
Scheme File Needed For UDF to Work? m_ridzon Fluent UDF and Scheme Programming 5 December 31, 2018 08:34
Modify gravity through UDF flotus1 Fluent UDF and Scheme Programming 2 April 12, 2015 05:55
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 07:26
How to implement a numerical scheme by using UDF? Furui Xiong FLUENT 0 July 29, 2010 01:30


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