Steady state timestep
Hello,
I want to calculate a custom ODE for every cell, so I created a user defined memory (UDM) for its result value. Then I thought I could use the DEFINE_ADJUST macro to change the UDM's value respectively. For example following rate equation (just as an example): dx/dt = -k * c(species1) My approach was the following Code:
DEFINE_ADJUST(adjust_macro, d) Any help is appreciated, thank you! |
this code doesn't manipulate timestep, do you understand this?
timestep is involved in last equation and is equal to the value (timestep size), which you put in fluent GUI. And it is constant (else you are using adaptive timestep). It could be 1sec, 2, 111, any value you've put in GUI IF you want to change timestep using UDF you should use DEFINE_DELTAT macro best regards |
Thank you for your answer!
Well I don't want to change the time step actually. I want to calculate the result of a rate equation/ode according to the current timestep. Actually I want to synchroniously solve a rate equation/ode of a scalar (non specie concentration) to the chemical reaction. I have a volumetric reaction with a DEFINE_VR_RATE udf set up, thus I'm not using the stiff chemistry solver. But I want to have the same possibility of using the "dt" parameter of DEFINE_CHEM_STEP without changing said solver. |
Quote:
|
Quote:
Code:
Message("\n current timestep = %e \n", CURRENT_TIMESTEP); |
First off, sorry for the double post.
But I try to ask the question more general: Is there any possibility to add a custom differential equation to the Fluent solver. Or somehow couple a new differential equation with the equations being solved by Fluent anyways. I think this shouldn't be that much of a challenge for a software that's main task is basically solving differential equations. Hope anyone can help me, thanks. |
User-Defined Scalars may be the answer to your question
More information could be found in Ansys Fluent Customization manual best regards |
All times are GMT -4. The time now is 21:06. |