CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

interFoam: erroneous volume reaction in a porous media

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2018, 06:42
Default interFoam: erroneous volume reaction in a porous media
  #1
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Hello guys!

I am currently doing CFD-DEM, with the CFD part solved in OpenFoam, particularly in interFoam. I have this problem that when my particles enter the liquid/water domain, the volume does not rise, seemingly oblivious to the presence of the particles despite the fact the particle and fluid velocities (and forces) react to each other. The equation to solve for the water phase is:
\frac{\partial }{\partial t}(\alpha_f \alpha_1) + \nabla\cdot (\alpha_f \alpha_1 \bf{u_f}) + \nabla\cdot(\alpha_f \alpha_i(1-\alpha_1)\bf{u_r})=0
separating the time derivative, it can also be written as:
\frac{\partial }{\partial t} \alpha_1 + \nabla\cdot (\alpha_f \alpha_1 \bf{u_f}) + \nabla\cdot(\alpha_f \alpha_i(1-\alpha_1)\bf{u_r})=-\alpha\nabla\cdot(\alpha_f \bf{u_f} )
where \alpha_f is the void fraction and \alpha_i is the fraction of the liquid. This equation was proposed in this paper: "Extended CFD-DEM for free-surface flow with multi-size granules".
My problem comes in the implementation of this equation in interFoam alphaEqn. So far I have tried using MULES:
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++)
    {

	phiAlpha_ad = fvc::flux(phi,alpha1,alphaScheme);
	phiAlpha_comp = fvc::flux(-fvc::flux(-phir, alpha2, alpharScheme),alpha1,alpharScheme);
	phiAlpha = phiAlpha_ad + phiAlpha_comp;	

        spAlpha = alpha1*fvc::div(phi);
        


        //MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
        MULES::explicitSolve
        (
		geometricOneField(),
		alpha1, 
		phi,                 //U*alpha_f
		phiAlpha,
		spAlpha,
		zeroField(),
		1,
		0
	);
	ddtAlpha = fvc::ddt(alpha1);		
	velAlpha = fvc::reconstruct(phiAlpha);
	velAlpha_comp = fvc::reconstruct(phiAlpha_comp);

        alpha2 = 1.0 - alpha1;
        rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
    }

    Info<< "Phase-1 volume fraction = "
        << alpha1.weightedAverage(mesh.Vsc()).value()
        << "  Min(alpha1) = " << min(alpha1).value()
        << "  Max(alpha1) = " << max(alpha1).value()
        << endl;
}
and direct implementation:
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++)
    {

        fvScalarMatrix alpha1Eqn
        (
             fvm::ddt(alpha1n)
           + fvm::div(phi, alpha1n, alphaScheme)
           + fvm::div(-fvc::flux(-phir, n - alpha1, alpharScheme), alpha1n, alpharScheme) 
        );
        alpha1Eqn.relax();
        alpha1Eqn.solve();

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

    Info<< "Phase-1 volume fraction = "
        << alpha1n.weightedAverage(mesh.Vsc()).value()
        << "  Min(alpha1) = " << min(alpha1n).value()
        << "  Max(alpha1) = " << max(alpha1n).value()
	<< " porosity = " << n.weightedAverage(mesh.Vsc()).value()
        << endl;
}
where i took both alphas as one variable and solved them under alpha1n.
Both of them were implemented under PIMPLE and both of them did not seem to work. Could anyone give me a hint on how I could correctly implement this? I am relatively new to openFoam and this is my first time editing solvers. I'd be more than happy to provide more information if needed.

Thank you in advance!

P.S. I have read the Programmer's manual, user's manual, and the references shared by Santiago-Damian on VOF, as well as this thread:
Source term to VOF equation
but I think what I need now is a little hands-on guidance.
cuikahlil is offline   Reply With Quote

Old   July 11, 2019, 08:30
Default
  #2
New Member
 
Dan
Join Date: May 2019
Posts: 3
Rep Power: 7
Dan M is on a distinguished road
Hi,

I am dealing with EXACTLY the same issue with my porous VoF method. I'm trying to solve the equation for alpha1 but the liquid is not displaced by the falling particles (although the interface reacts properly).

Have you managed to implement alphaEqn correctly, so that the volume of liquid rises accordingly?

I would really appreciate your help.

Thanks
Dan M is offline   Reply With Quote

Old   July 12, 2019, 05:46
Default
  #3
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Hello Dan!

Unfortunately not yet. I have abandoned this project for now in pursuit of a simpler system. My supervisor did say there was nothing wrong with the implementation but I cannot get the volume to rise.

If you have any luck with it please share how you did it!

By the way, have you read the paper of Jing et al. 2016 "extended CFD-DEM for free-surface flow with multi-size granules"? I was following their implementation but couldn't get it right.

Cheers!
cuikahlil is offline   Reply With Quote

Old   July 12, 2019, 06:02
Default
  #4
New Member
 
Dan
Join Date: May 2019
Posts: 3
Rep Power: 7
Dan M is on a distinguished road
Hi Kahlil,

thank you for your quick reply.

Yes, I'm following the same paper and some others with similar ways of implementing the interface equation but haven't managed to get any realistic results in terms of volume displacement. I must say it's rather frustrating...

My supervisor also agrees that there shouldn't be anything wrong with the implementation (i.e. the differential equation). I'm able to maintain the liquid volume fraction without any significant mass loss and keep alpha1 between 0 and 1, but strangely enough there is no volume rise due to particle addition.

I will share my results if I find a way to get it right.

Best,
Dan
Dan M is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiphase Porous Media Flow - Convergence Issues VT_Bromley FLUENT 8 May 30, 2024 03:59
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Reaction on porous media Gabriella FLUENT 5 August 29, 2017 09:10
2Phase flow simulation in Porous Media Ansys Fluent Yaqub FLUENT 0 June 22, 2017 04:46
Reactive flow in porous media with volume expansion smhosseini Main CFD Forum 3 December 5, 2013 08:52


All times are GMT -4. The time now is 13:42.