CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Relative flux in pimpleDyMFoam

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

LinkBack Thread Tools Display Modes
Old   July 20, 2011, 17:50
Default Relative flux in pimpleDyMFoam
New Member
Join Date: Jun 2011
Posts: 3
Rep Power: 6
Igor_2011 is on a distinguished road
Hi Foamers!

I've recently been trying to simulate the plunge motion of a 2D cylinder using pimpleDyMFoam and the rigid body deformation technique, or solidBodyMotionFvMesh. Although the simulations converge, I noticed that the entire flow solution moved with the cylinder, which is not very physical!

I started to think about this issue and the first thing that came out to my mind was that there may have an issue with the part of the code that should make the flow relative to the mesh motion. However, when I looked at the files (see the code below) everything looked correct to me since at the beginning of each iteration the fluxes are made absolute, then the mesh position is updated before make the flux relative again.

Any one has a clue regarding this issue?

Great thanks!


    // Make the fluxes absolute
        fvc::makeAbsolute(phi, U);

        #include "setDeltaT.H"


        Info<< "Time = " << runTime.timeName() << nl << endl;


        if (mesh.changing() && correctPhi)
            #include "correctPhi.H"

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

        if (mesh.changing() && checkMeshCourantNo)
            #include "meshCourantNo.H"

        // --- PIMPLE loop
        for (int ocorr=0; ocorr<nOuterCorr; ocorr++)
            if (nOuterCorr != 1)

            #include "UEqn.H"

            // --- PISO loop

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

                U = rAU*UEqn.H();
                phi = (fvc::interpolate(U) & mesh.Sf());

                if (p.needReference())
                    fvc::makeRelative(phi, U);
                    adjustPhi(phi, U, p);
                    fvc::makeAbsolute(phi, U);

                for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
                    fvScalarMatrix pEqn
                        fvm::laplacian(rAU, p) == fvc::div(phi)

                    pEqn.setReference(pRefCell, pRefValue);

                        ocorr == nOuterCorr-1
                     && corr == nCorr-1
                     && nonOrth == nNonOrthCorr)
                        pEqn.solve(mesh.solver( + "Final"));

                    if (nonOrth == nNonOrthCorr)
                        phi -= pEqn.flux();

                #include "continuityErrs.H"

                // Explicitly relax pressure for momentum corrector
                if (ocorr != nOuterCorr-1)

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

                U -= rAU*fvc::grad(p);

Igor_2011 is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 45 February 8, 2016 05:42
Problem setting with chtmultiregionFoam Antonin OpenFOAM 10 April 24, 2012 09:50
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
What is the problem with the relative Flux Correction danielle OpenFOAM Running, Solving & CFD 0 November 2, 2008 00:24
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09

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