UDF for ANSYS Fluent and Runge Kutta Method
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. |
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.
|
Quote:
|
Runge kutta
Quote:
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. |
All times are GMT -4. The time now is 19:14. |