|
[Sponsors] |
November 17, 2014, 10:27 |
UDF for ANSYS Fluent and Runge Kutta Method
|
#1 |
New Member
Cagri Metin
Join Date: Jul 2013
Location: İzmir/Turkey
Posts: 14
Rep Power: 13 |
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. |
|
November 20, 2014, 19:23 |
|
#2 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
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.
|
|
December 8, 2016, 03:18 |
|
#3 | |
New Member
Hamed
Join Date: Jul 2012
Posts: 16
Rep Power: 14 |
Quote:
|
||
January 24, 2020, 04:46 |
Runge kutta
|
#4 |
New Member
FDE
Join Date: Feb 2012
Posts: 4
Rep Power: 14 |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|