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

UDF for ANSYS Fluent and Runge Kutta Method

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mprinkey

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2014, 10:27
Default UDF for ANSYS Fluent and Runge Kutta Method
  #1
New Member
 
cagri.metin.ege's Avatar
 
Cagri Metin
Join Date: Jul 2013
Location: İzmir/Turkey
Posts: 14
Rep Power: 13
cagri.metin.ege is on a distinguished road
Hello everybody,
I need to manage a boundary conditiıon that pressure change with time. On the other hand I have to solve a differential equation for this boundary condition. Solving the diffrential equation decided Runge-Kutta Method. Am I write another code to solve this equation or write Runge Kutta Method inside UDF. What is your idea ?, thank you all attention.
cagri.metin.ege is offline   Reply With Quote

Old   November 20, 2014, 19:23
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
This is not too hard do. Declare a global variable to hold your pressure boundary condition. Use a DEFINE_BOUNDARY to set it where needed using that variable. Then use a DEFINE_ADJUST to do the RK. Declare the variables in the DEFINE_ADJUST as static so the values remain. You will need to check the simulation time (CURRENT_TIME) at the beginning of the define adjust. Store the old value in a static variable. At the beginning of the DEFINE_ADJUST if the current solution time is different from the old value, then update the old and do your RK step(s) to get to the new time and update the global pressure variable.
aroma likes this.
mprinkey is offline   Reply With Quote

Old   December 8, 2016, 03:18
Default
  #3
New Member
 
Hamed
Join Date: Jul 2012
Posts: 16
Rep Power: 14
aroma is on a distinguished road
Quote:
Originally Posted by mprinkey View Post
This is not too hard do. Declare a global variable to hold your pressure boundary condition. Use a DEFINE_BOUNDARY to set it where needed using that variable. Then use a DEFINE_ADJUST to do the RK. Declare the variables in the DEFINE_ADJUST as static so the values remain. You will need to check the simulation time (CURRENT_TIME) at the beginning of the define adjust. Store the old value in a static variable. At the beginning of the DEFINE_ADJUST if the current solution time is different from the old value, then update the old and do your RK step(s) to get to the new time and update the global pressure variable.
Do you have any template for that? Tnx
aroma is offline   Reply With Quote

Old   January 24, 2020, 04:46
Default Runge kutta
  #4
FDE
New Member
 
FDE
Join Date: Feb 2012
Posts: 4
Rep Power: 14
FDE is on a distinguished road
Quote:
Originally Posted by aroma View Post
Do you have any template for that? Tnx
Hi,
I need a UDF code to solve the ODE equation (for example: y'=y(y-1), y(0)=...) in FLUENT.
I know that the ADJUST macro must be used. But, I have some problems in writing this code.
Thanks.
FDE 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



All times are GMT -4. The time now is 21:28.