CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam

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

Like Tree1Likes
  • 1 Post By dani2702

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2016, 03:30
Default Change in alpha and U with groovyBC in twoPhaseEulerFoam
  #1
New Member
 
Join Date: Sep 2016
Posts: 3
Rep Power: 9
dani2702 is on a distinguished road
Hi,

I'm trying to simulate a fludized bed with two inlets for particles (inletParticlesLeft and inletParticlesRight), one inlet for air (inletAir) and one outlet (outletAir). See the attached image #1 for the geometry.

geometry.png


Gas is flowing from inletAir and particles (alpha_Particles = 0.62) are flowing from inletParticlesRight into the geometry.

I'm trying to code the following condition:
If particles are carried out of the geometry (outletAir), then the same amount of particles should be recirculated into the geometry via inletParticlesLeft. So kind of a coupling between outletAir and inletParticlesLeft.

For testing purposes I tried to use groovyBC to implement the scenario:
- If there are no particles at outletAir the gas flow and the volume fraction of particles at inletParticlesLeft shall be 0 and therefore no flow
- If there are particles above a certain value (alpha.particles > 1E-3) at outletAir, the volume fraction of particles at inletParticlesLeft should jump to 0.62 and the velocity should increase to a fixed amount.

Here is my code of the boundary conditions:

alpha.air:
Code:
    inletAir
    {
        type            fixedValue;
        value           uniform 1;
    }




    outletAir
    {
		type 		zeroGradient;

    }

    inletParticles
    {
        type            fixedValue;
        value           uniform 0.38;
    }

    inletParticles2
    {
 

	type groovyBC;
	aliases		{
			alphaP	alpha.particles;
				}

	variables "alphaPMean{outletAir}=sum(alphaP*mag(Sf()))/sum(mag(Sf()));";



	valueExpression "(alphaPMean > 1e-3) ? 0.38 : 1";
	value	      	uniform 1;

alpha.particles:
Code:
    inletAir
    {
        type            fixedValue;
        value           uniform 0;
    }




    outletAir
    {
		type 		zeroGradient;

    }

    inletParticles
    {
        type            fixedValue;
        value           uniform 0.62;
    }

    inletParticles2
    {

	type groovyBC;
	aliases		{
			alphaP	alpha.particles;
				}

	variables "alphaPMean{outletAir}=sum(alphaP*mag(Sf()))/sum(mag(Sf()));";



	valueExpression "(alphaPMean > 1e-3) ? 0.62 : 0";
	value	      	uniform 0;  

	
    }

U.air
Code:
    inletAir
    {
        type               fixedValue;
        value	      	uniform (0 0 5);
    }


    outletAir
    {
		type 			inletOutlet;
		inletValue		uniform (0 0 0);
		value 			uniform (0 0 0);

   }    


    inletParticles
    {
        type                fixedValue;
        value 				uniform (-0.3 0 -0.3);
    }	

    inletParticles2
    {
	type groovyBC;
	aliases		{
			alphaP	alpha.particles;
				}

	variables "alphaPMean{outletAir}=sum(alphaP*mag(Sf()))/sum(mag(Sf()));";



	valueExpression "(alphaPMean > 1e-3) ? vector(0.3,0,-0.3) : vector(0,0,0)";
	value	      	uniform (0 0 0);  
}

U.particles
Code:
    inletAir
    {
        type               fixedValue;
        value	      	uniform (0 0 5);
    }


    outletAir
    {
		type 			inletOutlet;
		inletValue		uniform (0 0 0);
		value 			uniform (0 0 0);

   }    


    inletParticles
    {

        type                fixedValue;
        value 				uniform (-0.3 0 -0.3);
		
    }

    inletParticles2
    {
		
	type groovyBC;
	aliases		{
			alphaP	alpha.particles;
				}

	variables "alphaPMean{outletAir}=sum(alphaP*mag(Sf()))/sum(mag(Sf()));";



	valueExpression "(alphaPMean > 1e-3) ? vector(0.3,0,-0.3) : vector(0,0,0)";
	value	      	uniform (0 0 0);  
}

p
Code:
    inletAir
    {
		type		zeroGradient;
    } 
    outletAir
    {
		type		fixedValue;
		value		uniform 2.25e5;

	}
    inletParticles
    {
		type		zeroGradient;
    }


    inletParticles2
    {
		type		zeroGradient;
		}

p_rgh
Code:
    inletAir
    {
		type		fixedFluxPressure;
		value		$internalField; 
    } 
    outletAir
    {
        type               prghPressure;
	   p				$internalField;
        value              $internalField;
    }    




    inletParticles
    {
		type		fixedFluxPressure;
		value		$internalField; 
    }

    inletParticles2
    {
		type		fixedFluxPressure;
		value		$internalField; 
    }

Now the problem I'm getting, as soon as alpha.Particles art outletAir hits the defined critical value in order to switch alpha.particles and U for the boundary inletParticlesLeft, the time step delta T decreases heavily (see attached image #2).

deltaT.PNG


When looking at the last time step for the boundary inletParticlesLeft (when alpha.particle and U already changed for inletParticlesLeft), the alpha value and velocity was correct, but the pressure p and p_rgh were 'abnormal', see attached images #3 and #4.

p.png
p_rgh.png

Therefore the velocity and pressures right after the boundary condition inletParticlesLeft rise in the domain (example for U.air):

Uair.png

That's why the time step decreases (as the velocity rises in such a magnitude)

I don't know why the pressure differs when the swtiching conditions at the groovyBC applies.

I also tried a simulation without groovyBC and coded the fixedValues for U and alpha for inletParticlesLeft. I manually interrupted the simulation and changed for inletParticlesLeft the alpha and U values at the last time step and continued the simulation with no problem.

Do you guys have any solution for my problem?

Thank you!
the_ichthyologist likes this.
dani2702 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 15 May 1, 2016 16:12
TwoPhaseEulerFoam alpha "ripples" MichaelB88 OpenFOAM Running, Solving & CFD 1 July 9, 2015 04:20
[swak4Foam] mass conservation of solid phase violated when using groovyBC with twoPhaseEulerFoam xpqiu OpenFOAM Community Contributions 8 June 17, 2015 02:08
[swak4Foam] groovyBC and access to alpha field of other patch Tobi OpenFOAM Community Contributions 4 September 2, 2014 04:04
about bounded alpha equation for bubbleFoam and twoPhaseEulerFoam kaifu OpenFOAM 2 May 6, 2011 05:33


All times are GMT -4. The time now is 18:22.