no flow through porous media

hello,

I am trying to simulate flow through porous media and calculate its permeability but the flow never goes through my porous media even if the porosity is high as 80%. I am not sure what is going on. These are the conditions i am applying:

    Box2D inlet(0, 0, 0, ny-1);
    Box2D outlet(nx-1, nx-1, 0, ny-1);
    Box2D top(0, nx-1, ny-1, ny-1);
    Box2D bottom(0, nx-1, 0, 0);
    
    boundaryCondition.addPressureBoundary0N(inlet, lattice);
    boundaryCondition.addPressureBoundary0P(outlet, lattice);
    boundaryCondition.addPressureBoundary1P(top, lattice);
    boundaryCondition.addPressureBoundary1N(bottom, lattice);
    
    setBoundaryDensity(lattice, inlet, 1.01);
    setBoundaryDensity(lattice, outlet, 1.);
    
    lattice.periodicity().toggle(0, false);
    lattice.periodicity().toggle(1, true);

Is there something i am doing wrong?

Thanks in Advance,
Saurabh

Hi,

you don´t need a pressure boundary condition at top and bottom, as this direction will be periodic in your simulation. What happens if you apply these conditions to an empty domain?

Philippe

Hey,

I realized after I had posted that the top and bottom boundary conditions were unnecessary but thanks anyways.

Instead of periodic conditions on the top and bottom I am treating them as solid walls (bounce back nodes). I get a parabolic velocity profile in an empty domain, which is in good agreement with the literature.

What I am trying to do now is couple 2 lattices together and transfer the velocity from lattice A to lattice B. It doesn’t seem to be working for some reason, would you be able to tell me what I am doing wrong. This is what I have:

//Processor to copy velocity profile from lattice to AD lattice
template<typename T, template class DESCRIPTOR1,
template class DESCRIPTOR2>
struct copyVelocityProcessor : public BoxProcessingFunctional3D_LL<T,DESCRIPTOR1,T,DESCRIPTOR2>
{

virtual void process(Box3D domain,BlockLattice3D<T,DESCRIPTOR1>& lattice,BlockLattice3D<T,DESCRIPTOR2>& adlattice)
{
Dot3D absoluteOffset = lattice.getLocation();
//T omega= adlattice.get(5,6,7).getDynamics().getOmega();

    for (plint x=domain.x0; x<domain.x1; ++x) {
        for (plint y=domain.y0; y<domain.y1; ++y) {
      for(plint z=domain.z0; z<domain.z1; ++z) {
	
	Array<T, 3> velocity;

	lattice.get(x,y,z).computeVelocity(velocity);
	adlattice.get(x,y,z).defineVelocity(velocity);
        
      }
    }
}
}
virtual copyVelocityProcessor<T,DESCRIPTOR1,DESCRIPTOR2>* clone() const
{
    return new copyVelocityProcessor<T,DESCRIPTOR1,DESCRIPTOR2>(*this);
}
virtual void getModificationPattern(std::vector<bool>& isWritten) const {
    isWritten[0] = true;
    isWritten[1] = true;
}
virtual BlockDomain::DomainT appliesTo() const {
    return BlockDomain::bulk;
}

};

Thanks in advance,
Saurabh