CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   how to obtain time derivative (

soubhik August 23, 2004 01:15

how to obtain time derivative
hi friends,

I am solving some transient diffusion problem where I have to define a time derivative of an additional variable (concentration) in the source time. Has anyone of u tried obtaining time derivative such as dc/dt . I have used 2 additional variables C1 and C2 which calls the values of concentration at the beginning and end of time step (junction box)

C (current timestep) - C(earlier timestep)/timestep

this doesnot work because the expression yields values of zero for each timestep. presumably it reads the same value for C1 and C2 at each timestep . please suggest me any other ways.


Jeff August 25, 2004 23:43

Re: how to obtain time derivative
Try calling your junction box just at the end of the time step with the following algorithm:

Loop over all nodes: dCdt = (NewValue - C1)/dt C1 = NewValue C2 = dCdt End loop


All times are GMT -4. The time now is 18:59.