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?
(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.
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.
|All times are GMT -4. The time now is 23:37.|