CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Source term to VOF equation

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

Like Tree2Likes
  • 1 Post By keepfit
  • 1 Post By keepfit

Reply
 
LinkBack Thread Tools Display Modes
Old   April 10, 2016, 16:20
Default Source term to VOF equation
  #1
Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 64
Rep Power: 6
keepfit is on a distinguished road
Dear Foamers,

Having been working on solid particles - free surface flow interaction for a while, so far I got some good results in terms of coupled particle-fluid interaction. Nevertheless, an unnoticeable issue was found on the volume conservation of fluid phase. The modified solver is based on interFoam where an open-source DEM (discrete element method) code is called as a shared library to handle dynamics of solid particles. The interaction is realized via a momentum exchange term (Sp_f) to the R.H.S of N-S equation, and empirical drag models to calculate fluid forces acting on solid particles.

The VOF and continuity equations used in the solver are given by:

hence the Source term which stands for the displaced volume by solid particles reads as:


here "alpha_f" is the volume fraction of fluid phase in a cell (= 1- V_particles/V_cell), and "U_f" the fluid velocity. The continuity equation is already implemented into the pressure equation instead of the original one.

The alplaEqn.H is implemented as:

Code:
{
    word alphaScheme("div(phi,alpha)");
    word alpharScheme("div(phirb,alpha)");

    surfaceScalarField phic(mag(phi/mesh.magSf()));
    phic = min(interface.cAlpha()*phic, max(phic));
    surfaceScalarField phir(phic*interface.nHatf());

    for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
    {   
        surfaceScalarField phiAlpha  
        (
            fvc::flux
            (
                phi,  // = U*alpha_f
                alpha1,
                alphaScheme
            )
          + fvc::flux
            (
                -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
                alpha1,
                alpharScheme
            )
        );

       //MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);  

       // source term
       volScalarField divU(fvc::div(U*alpha_f));
       volScalarField SpVoF = alpha1*divU;

       MULES::explicitSolve(geometricOneField(), alpha1, phi, phiAlpha, SpVoF, zeroField(), 1, 0);

       rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
    }  // end for

    Info<< "Phase-1 volume fraction = "
        << alpha1.weightedAverage(mesh.Vsc()).value()
        << "  Min(alpha1) = " << min(alpha1).value()
        << "  Max(alpha1) = " << max(alpha1).value()
        << endl;
}
The solver runs well in general, the behavior of solid particles under the influence of fluid phase in the simulation is expected. The following test is to verify the modified VOF method on the volume conservation: a number of solid particles was poured into a box with half-filled water (0.1m high), after the particles rest on the bottom, the water level will rise.


However. what i got from the coupled particle-fluid simulation is odd: the water level remains at 0.1 m which is not true after several hundred of particles poured into the water column.


Where is the problem in the VOF implementation, especially the source term and the MULES solver. I read the MULES.c and MULESTemplates.C but still could not fully understand.

Can we directly implement the alpha equation just like in UEqn.H without using MULES (e.g. bubbleFoam)? I would appreciate any helpful advice

Cheers,
David
linhan.ge likes this.

Last edited by keepfit; April 11, 2016 at 15:09.
keepfit is offline   Reply With Quote

Old   April 12, 2016, 16:06
Default Update
  #2
Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 64
Rep Power: 6
keepfit is on a distinguished road
Update

The direct implementation of the modified VOF method seems working, but still suffer some mass loss.

Code:
{
    word alphaScheme("div(phi,alpha)");
    word alpharScheme("div(phirb,alpha)");

    surfaceScalarField phic(mag(phi/mesh.magSf()));
    phic = min(interface.cAlpha()*phic, max(phic));
    surfaceScalarField phir(phic*interface.nHatf());
    
    for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
    {

        volScalarField::DimensionedInternalField SpVof
        (
            IOobject
            (
                "SpVof",
                runTime.timeName(),
                mesh
            ),
            // Divergence term is handled explicitly to be
            // consistent with the explicit transport solution
            fvc::div(alpha_f*U) 
        );

        fvScalarMatrix alpha1Eqn
        (
             fvm::ddt(alpha1)
           + fvm::div(phi, alpha1, alphaScheme)
           + fvm::div(-fvc::flux(-phir, alpha_f - alpha1, alpharScheme), alpha1, alpharScheme)  // alpha1 + alpha2 = alpha_f;  alpha_f +alpha_solid = 1
           == fvm::Sp(SpVof, alpha1)
        );
        alpha1Eqn.relax();
        alpha1Eqn.solve();

     rhoPhi = alpha1Eqn.flux()*(rho1 - rho2) + phi*rho2;
    }  // end for

    Info<< "Phase-1 volume fraction = "
        << alpha1.weightedAverage(mesh.Vsc()).value()
        << "  Min(alpha1) = " << min(alpha1).value()
        << "  Max(alpha1) = " << max(alpha1).value()
        << endl;
}
any advice?

thanks!
ramakant likes this.
keepfit is offline   Reply With Quote

Old   April 23, 2016, 05:43
Default
  #3
Member
 
ramakant gadhewal
Join Date: Apr 2010
Posts: 48
Rep Power: 8
ramakant is on a distinguished road
Dear David Long

this model is also used for the lake modelin ?.For example in the lake water and solid particle are coming together and get settled at the bottom of the lake/river.

any advice?
thanks!

ramakant is offline   Reply With Quote

Old   April 25, 2016, 17:21
Default
  #4
Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 64
Rep Power: 6
keepfit is on a distinguished road
Quote:
Originally Posted by ramakant View Post
Dear David Long

this model is also used for the lake modelin ?.For example in the lake water and solid particle are coming together and get settled at the bottom of the lake/river.

any advice?
thanks!

yes, the solver can be used to study river/channel sediment transport as well.
keepfit is offline   Reply With Quote

Reply

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
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Installation 9 June 12, 2015 17:18
swak4Foam-groovyBC build problem zxj160 OpenFOAM 18 July 30, 2013 13:14
funkySetFields compilation error tayo OpenFOAM 39 December 3, 2012 06:18
Source term for diffusion equation in FLUENT 4.5 Raja Banerjee FLUENT 1 August 30, 2000 23:00


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