CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Crank-Nicolson (https://www.cfd-online.com/Forums/main/9304-crank-nicolson.html)

Glen June 8, 2005 20:58

Crank-Nicolson
 
HI all,

I am trying to incorporate Crank-Nicolson scheme, into my code, I have a small doubt about the calulation of the source terms for the scheme, when I calculate the source term for the crank-nicolson scheme should I update the new source terms every time step or should I update the source term at every Iteration ?

The source term for Crank-Nicolson scheme is calculated as the summation of the product of (flux*velocity_old) for all the directions 4 in 2d and 6 in 3d, although the u_old,v_old,w_old are from previous time step, should the term (flux*velocity_old) be updated every iteration with the newly calcuated "flux", got by discretizing diffusion and convection co-efficients ?

Thanks in advance,

Glen.


styoung317 June 25, 2005 21:16

Re: Crank-Nicolson
 
I guess the method to deal with the source term depends:if the 'flux' is dependent solely on 'velocity',then it should not be updated until next time step;while in-time update may be necessary for the situation that 'flux' changes also with other variables or parameters,and the variables or parameters are not constant during the iterations. I'm not sure about my answer,maybe trial-error is useful,:)


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