CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Calculation of motion continuity error (https://www.cfd-online.com/Forums/openfoam-programming-development/121275-calculation-motion-continuity-error.html)

sasanghomi July 25, 2013 04:41

Calculation of motion continuity error
 
Hi Dear Foamers,

I am trying to understand calculating of motion continuity error.
I think first line in below code is creating an object without any dimension and I don't understand the meaning of [d/dt ( Object ) ] . Also I couldn't understand what do meshPhi(U) do exactly .
Code:

volScalarField motionContErr =
        fvc::ddt(dimensionedScalar("1", dimless, 1.0), mesh)
      - fvc::div(fvc::meshPhi(U));

Can anybody help me for understanding this code?
I appreciate any help from you.

Thanks and best regards,
Sasan.

sharonyue March 11, 2016 15:24

Hi,

This is for space conservative law equation, check it out in Peric:

\frac{\partial 1}{\partial t} - \nabla \cdot u_b = 0

:)

thomasArk47 March 12, 2016 17:15

Hello,

Sharonyue gives you good answer but maybe not so easy to understand if you are "new" to CFD discretization techniques:rolleyes: If it is the case, maybe it is difficult to understand what means the time derivative of 1. Isn't it equalt to zero??? :confused:

In fact, if you want to really understand the meshPhi(U) goal, you should read some courses on the topic "ALE technique" (for Arbitrary Lagrangian Eulerian) which allows the computation of flows on moving meshes. One difficulty in doing that is to respect a "hidden" conservation law which is called in the litterature the "GCL" (for Geometric Conservation Law). Roughly speaking, the time evolution of the mesh must be done in such a way that one respect a kind of compatibility condition( the so-called GCL) between the temporal evolution of the volume of a cell and the face flux resulting from the velocity associated with the mesh motion. This is precisely the meaning of the equation writtent by Sharonyue.


All times are GMT -4. The time now is 05:39.