# Temporal discretization

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 17, 2009, 14:12 Temporal discretization #1 Senior Member   Maka Mohu Join Date: Mar 2009 Posts: 305 Rep Power: 17 If we compare what is described in the user guide 1.5 P-39,42,43 to a solver like icoFOAM: (1) The time derivative ddt is discretized using finite "difference" method. (2) No integration from t to t+dt is applied to temporal term or to other terms in the equation. Is this correct or it is applied but hidden some where in the way fvm::ddt, fvm:div, ... is implemented? (3) I understand that the difference between fvm and fvc is not related to temporal discretization. It is rather related to whether the term will be evaluated explicitly from old time step (goes to the source terms) or implicitly from the new value (goes to the coefficient matrix). Is this right? (4) if (2) is right, then implementing the integration of such terms will involve changing the solver like in P-43 of the user guide. Is this correct? Thanks. Best regards, Maka.

 June 18, 2009, 10:39 update #2 Senior Member   Maka Mohu Join Date: Mar 2009 Posts: 305 Rep Power: 17 (5) point (2) is not correct. The time integration is done using Euler implicit for all terms in icoFoam. (6) As a result of (5) point (3) is not correct. The interpretation of fvm:: and fvc:: is correct. The way we combine them to represent some spatial derivative make them related to the discretization of time integrals (user guide 1.5 P42-43). (7) For long time, I used to think that the time scheme we select in fvSchemes (ddtSchemes) controls the temporal discretization of both ddt term and time integrals. I guess I was wrong. It only controls the finite difference discretization of d/dt term. The discretization of the temporal integration is handled directly within the solver using a combination of fvm:: and fvc::. As a result, the discretization of time integrals is not run-time selectable. Please feel free to correct me since, I'm not sure about my interpretations and I think I was wrong for long time. Thanks. Best regards, Maka

 November 18, 2009, 12:21 #3 Member   Franco Marra Join Date: Mar 2009 Location: Napoli - Italy Posts: 68 Rep Power: 16 Dear Maka, I am having the same troubles about temporal discretization. I understand your points but still something remain unexplained to me. Time integration schemes can be selected in the system/fvSchemes file selecting an appropriate ddtSchemes. As reported in the Programmers Guide (PG) (pages P-39 and P-42) the choice of the time scheme will affect both the right-hand-side of the balance equation (e.g. eq 2.21 of PG) and the left-hand-side of the balance equation. But successively, at page P-43 it is explicitly stated that “the temporal discretisation is controlled by the implementation of the spatial derivatives in the PDE we wish to solve.” I do not understand which is the role of the ddtSchemes keyword I can choose. For instance, are the following formulations of the Laplace’s equation solve (fvm::ddt(T) - fvm::laplacian(DT, T)); fully equivalent if ddtSchemes is chosen as Euler (implicit) or CrankNicholson ? Actually, the results of the laplacianFoam tutorial that implement this equation are affected by this choice. As a result, this means that your point (7) is not fully true, as I do not see how discretization of time derivatives terms ddt with Euler implict differs from ddt with pure CrankNicholson: pure CrankNicholson temporal discretization becomes different only with respect to the treatment of the spatial derivatives. So, why I have to explicitly program the CrankNicholson at right-hand-side as indicated at page P-43 ? Any hint about this issue will be very gratefully appreciated. Regards, Franco

 December 28, 2019, 08:01 #4 Senior Member   Hojatollah Gholami Join Date: Jan 2019 Posts: 171 Rep Power: 6 Hi I study temporal discretization of openFoam in programing guide and Jasak Ph.D thesis. In transient simulation, for transport equation we should intergral from t to t+delta(t) over all terms of equation. In Jasak's thesis for a fixed volume it derived. My problem have dynamic mesh and in each time step will changes volume and face area of cells. So I wanna to know how the temporal discretization changes. for example, for backward scheme, first term (time derivative) is presented in ProgrammersGuide (2.23), but what about the others term (convection, Laplacian and source)? Is there old-old volume/faces, old volume/faces and new volume/faces should multiply to each terms? Thanks.

 Tags finite difference, scheme, time derivative, time integral