CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Understanding icoFoam.C (http://www.cfd-online.com/Forums/openfoam-programming-development/77982-understanding-icofoam-c.html)

Pascal_doran July 8, 2010 18:34

Understanding icoFoam.C
 
Hi all,

After looking at this web page : http://openfoamwiki.net/index.php/IcoFoam
I still had one question :

I assume that:
Code:

        fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U)
        );

is equivalent to :

Code:

        fvVectorMatrix UEqn = fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U)
Am I right ?

If yes, what does the following code mean? :
Code:

fvScalarMatrix pEqn
                (
                    fvm::laplacian(rUA, p) == fvc::div(phi)
                );

I know it define the pressure equation 'pEqn'. How Is pEqn obtained? Is it possible to write a similar equation as the one obtained for UEqn (UEqn = ...)?

Thank you,

Pascal

bioexplore July 9, 2010 03:05

how derive the pressure equation
 
i have also the same question about the pressure equation.
Can anybody explain how this equation is derived?

marupio July 9, 2010 11:24

Look at Hrvoje Jasak's PhD thesis. The link is at the top of the wiki page you posted:

http://openfoamwiki.net/index.php/IcoFoam

He uses the same annotation there as OpenFOAM. The pressure equation is derived in section 3.8.1 starting on page 145.

Pascal_doran July 9, 2010 11:47

Thank you!

So it iterate over 'p' and when the equality is reached p become pEqn as describe in equation 3.141 in Jasak's thesis.

Am I right?

Pascal


All times are GMT -4. The time now is 14:41.