CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Relative Fluxes in icoDyMFoam (http://www.cfd-online.com/Forums/openfoam-solving/58523-relative-fluxes-icodymfoam.html)

deepsterblue September 22, 2008 15:59

I'm wondering why fluxes are m
 
I'm wondering why fluxes are made relative to the mesh-motion at the end of the PISO loop in icoDyMFoam:


for (int corr=0; corr<nCorr; corr++)
{
rUA = 1.0/UEqn.A();

U = rUA*UEqn.H();

...
...
...

// Make the fluxes relative to the mesh motion - why?
fvc::makeRelative(phi, U);

U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
}

I'm guessing that this is required for the correctBoundaryConditions call for velocity. Can anyone confirm/explain why this is so?

jens_klostermann September 23, 2008 01:27

Hy Sandeep, If I remember r
 
Hy Sandeep,

If I remember right is this because of the space conservation law and the additional flux which is associated with a moving boundary (mesh).

Jens

lillberg September 23, 2008 01:57

Hi Sandeep, Read any paper
 
Hi Sandeep,

Read any paper on Arbitrary Lagrangian Eulerian (ALE) methods and it will all be clear. For example Charbel Farhat, "The Discrete Geometric Conservation Law and the Nonlinear Stability of ALE Schemes for the Solution of Flow Problems on Moving Grids", Journal of Computational Physics 174, 669&ndash;694 (2001) or more recent papers on mesh motion by ˇZeljko Tukovi'c.

/Eric

deepsterblue September 23, 2008 10:27

Hello Jens and Eric, Thanks
 
Hello Jens and Eric,

Thanks for the help, but it still isn't clear. The makeRelative function merely subtracts meshPhi from phi. However, for the next iteration of the nCorr loop, phi is over-written by:
phi = (fvc::interpolate(U) & mesh.Sf());
The line:
U -= rUA*fvc::grad(p);
doesn't require phi in any way, and the only reason phi should be relative to mesh-motion (in my opinion) is to satisfy a particular boundary-condition (at U.correctBoundaryConditions()) which requires it to be so. If none of the boundary conditions require it, is the line really necessary?

Comments?

ztukovic September 25, 2008 05:49

Hi Sandeep, Yes you are rig
 
Hi Sandeep,

Yes you are right. You will need relative flux at that stage only if velocity boundary condition requires it. But you will also need relative flux in the turbDyMFoam solver because the transport equations of a turbulence model will require relative flux.

Regards,
Zeljko

mgeiger October 6, 2009 10:38

Hello!
This thread has been quiet for a while. But what I don't understand about makeRelative and makeAbsolute is, how makeRelative can be called twice without makeAbsolute in between?
The interDyMFoam solver calls:
Code:

Abs
Rel
    if ...{
      Rel
      Abs
    }
  Rel

Obviously, the flux is made relative either inside or after the if{} although it is already relative. How should I understand this?

Here are the relevant calls with all for{} loops and if{} conditions:
Code:

while (runTime.run())
    {
...
        // Make the fluxes absolute
        fvc::makeAbsolute(phi, U);
...
        mesh.update();
...
        // Make the fluxes relative to the mesh motion
        fvc::makeRelative(phi, U);
...
        // --- PIMPLE loop
        for (int ocorr=0; ocorr<nOuterCorr; ocorr++)
        {
...
            // --- PISO loop
            for (int corr=0; corr<nCorr; corr++)
            {
...
                if (p.needReference())
                {
                    fvc::makeRelative(phi, U);
                    adjustPhi(phi, U, p);
                    fvc::makeAbsolute(phi, U);
                }
...
                // Make the fluxes relative to the mesh motion
                fvc::makeRelative(phi, U);
...
            }
        }
    }

regards
Mark

fisch April 2, 2012 04:46

Hello Mark,

did you find an answer to your question?

I'm interested.

thanks

ybapat July 20, 2012 02:39

Hello Mark,

Did you find answer to your question? Please let me know .


All times are GMT -4. The time now is 04:36.