Viewing 13 posts - 1 through 13 (of 13 total)
• Author
Posts
• #1919
steed188
Participant

Hi,
Although there were some discussion on the forum about ConvectionBoundary, I still have some problems with it.
Can I consider that this kind of bc as a free outflow where the gradient of pressure and other quantities is 0?

Meanwhile, I imitate the examples as this

lattice.iniEquilibrium(superGeometry, 4, rhoF, uF);
lattice.defineRhoU(superGeometry, 4, rhoF, uF);

The result seems that the flow didn’t go out from this bc. It just like a normal bounce back. While the flow went out regularly if I use PressureBoundary.

steed188

#2648
mathias
Keymaster

Dear steed188,

yes, free outflow, i.e. gradient rho=0 and gredient velocity=0. PressureBC in OpenLB means rho=const and gradient velocity = 0.

Please check if the material numbers are assigned correctly. Actually bc.addConvectionBoundary(superGeometry, 4, omega); should work!

BEst
Mathias

#2652
steed188
Participant

Dear mathias,
Sorry for so late.
Here’s a picture that I tried the convection and pressure boundary.

[img]http://photry-production-virginia.s3.amazonaws.com/1288/1538/63365/large.jpeg?AWSAccessKeyId=AKIAIFWXMUQTJZO2WGXA&Expires=1499790408&Signature=4MGbkW0NFciumBPq2%2B8lyS5QQ90%3D[/img]
[img]http://photry-production-virginia.s3.amazonaws.com/1288/1538/63366/large.jpeg?AWSAccessKeyId=AKIAIFWXMUQTJZO2WGXA&Expires=1499790409&Signature=SASQFxbQCNSruGTwEErgo9usEJA%3D[/img]
You see that when I used pressure boundary, there was velocity there that the fluid went out.
While I used convection boundary, there is no velocity to go out . So that the fluid always moved in the filed and no outlet.

That’s weird because I thought that the convection boundary should have same effect with pressure boundary in my case.

By the way, I’m working on some High Reynolds fluid that the kinetic viscosity gets 10e5. Under this kind of kinetic viscosity, the simulation is always diverged if using pressure bc. But the convection bc seems dose not work as I showed upper. Do you have some idea that how can I work with pressure bc under so high reynolds fluid?

best
steed188

#2654
mathias
Keymaster

For the convection bc, how did you set the to be imposed velocity?

#2656
steed188
Participant

I just use defineRhoU to define the velocity(0,0,0) and Rho (1) on convection bc. Is it right?

#2658
mathias
Keymaster

No, that is not the way. You need to use the define the right value “uAv” by prividing a pointer in the constructor:

virtual void olb::OnLatticeBoundaryCondition2D< T, Lattice >::addConvectionBoundary ( BlockGeometryStructure2D< T > & blockGeometryStructure,
int material,
T omega,
T * uAv = NULL
)

Best
Mathias

#2659
steed188
Participant

I’ve no idea what the uAv value means. There seems no comments about uAv in the source Code.
How should I get uAv value? Do I just create an new empty pointer?

Best
steed188

#2660
mathias
Keymaster

The value *uAv should be the actual value of the average velocity at the outflow area. That means you must set it to a desiged value or compute it with the e.g. flux functor every time step.

#2662
steed188
Participant

I tried the *uAv, but there seemed no difference ?

I First defined a global pointer uAv and initialize it.

Code:
T aveOut =0;
T * uAv = &aveOut;

Then defined the convection bc before iteration.

Code:
void prepareLattice(….){
sLattice.defineRhoU(superGeometry, 4,rhoF, uF); //rhoF=1, uF=(0,0,0)
}

Lastly calculated average velocity every time step and point it to the pointer
void getResults(){

Code:
std::list<int> materials = { 1, 4};
SuperLatticePhysVelocityFlux3D<T,DESCRIPTOR>vFluxOutflow( sLattice,converter,superGeometry,outflow,materials );
int input[5] = {0};
T flux[5] = {0.};
vFluxOutflow( flux,input );

T meanSpeed= flux[0]/flux[1];
uAv=&meanSpeed;

}

I thought I did imposed the average velocity of the bc on *uAv.

I also tried to set a fix value to the *uAv. There was nothing different.

with best,
steed188

#2663
mathias
Keymaster

It all seems correct. Did you check the material numbers for the outflow area?

#2664
steed188
Participant

The outflow is defined as below. The outflow bc is on the wall of point(0, 0, 0) to point(0, 2.5, 3.8). The positive x direction is to the inner of fluid.

Code:
Vector<T, 3>outCenter(0, 1.8, 1.8) ;
Vector<T, 3> outNormal( T(1), T(), T() );
IndicatorCylinder3D<T> outflow( outlet, 2 * converter.getLatticeL() );
superGeometry.rename( 2,4,1,outflow );

The outflow bc seems to be set correctly because if I use pressure boundary it works well in low Re flow.

Then I use the same IndicatorCircle3D to set the outflow bc with material number 4 for flux as below.

Code:
Vector<T, 3>outCenter(0,1.8,1.8) ;
Vector<T, 3> outNormal( T(1), T(), T() );

std::list<int> materials = { 1,3,4};
SuperLatticePhysVelocityFlux3D<T, DESCRIPTOR> vFluxOutflow0( sLattice, converter, superGeometry, outlet, materials );

The mean velocity is a minus number. It means the flux is minus? And the convection bc didn’t work.
I didn’t know where is wrong.

with best
steed188

#2675
steed188
Participant

By thousands of check, I found why my convection BC didn’t work finally！！！ 😀

I chose Local Boundary condition so that the bc didn’t work. If I chose Interp bc it worked!
May I asked the meaning of this two kinds of bc?

By the way, as you said that I should use flux functor to calculate uAv every time step, I found that all of the flux functors are based on a circle shape, though my outlet is a rectangle. Is there a functor that can be used for rectangle shape?

My temporary solution is that defining a circle in the rectangle and using flux functor to calculate the uAv. Although it can be calculated but I’ve no idea whether it is correct.

#2677
mathias
Keymaster

These are different Types. Come to the spring school next year and we will have time to explain it in detail. The FluxFunctor should also work for materal numbers or with a greater cylinder including your rextangle plus a material number. Best Mathias

Viewing 13 posts - 1 through 13 (of 13 total)
• You must be logged in to reply to this topic.