
[Sponsors] 
April 10, 2016, 16:20 
Source term to VOF equation

#1 
Member
David Long
Join Date: May 2012
Location: Germany
Posts: 69
Rep Power: 7 
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 particlefluid interaction. Nevertheless, an unnoticeable issue was found on the volume conservation of fluid phase. The modified solver is based on interFoam where an opensource 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 NS 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<< "Phase1 volume fraction = " << alpha1.weightedAverage(mesh.Vsc()).value() << " Min(alpha1) = " << min(alpha1).value() << " Max(alpha1) = " << max(alpha1).value() << endl; } However. what i got from the coupled particlefluid 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 Last edited by keepfit; April 11, 2016 at 15:09. 

April 12, 2016, 16:06 
Update

#2 
Member
David Long
Join Date: May 2012
Location: Germany
Posts: 69
Rep Power: 7 
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<< "Phase1 volume fraction = " << alpha1.weightedAverage(mesh.Vsc()).value() << " Min(alpha1) = " << min(alpha1).value() << " Max(alpha1) = " << max(alpha1).value() << endl; } thanks! 

April 23, 2016, 05:43 

#3 
Member
ramakant gadhewal
Join Date: Apr 2010
Posts: 77
Rep Power: 9 
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! 

April 25, 2016, 17:21 

#4 
Member
David Long
Join Date: May 2012
Location: Germany
Posts: 69
Rep Power: 7 
yes, the solver can be used to study river/channel sediment transport as well.


Thread Tools  
Display Modes  


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 foamextend 3.0  Seroga  OpenFOAM Installation  9  June 12, 2015 17:18 
swak4FoamgroovyBC 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 