Re: About ConvectionBC
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › About ConvectionBC › Re: About ConvectionBC
July 16, 2017 at 7:29 am
#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;
T * uAv = &aveOut;
Then defined the convection bc before iteration.
Code:
void prepareLattice(….){
bc.addConvectionBoundary(superGeometry, 4, omega, uAv);
sLattice.defineRhoU(superGeometry, 4,rhoF, uF); //rhoF=1, uF=(0,0,0)
}
bc.addConvectionBoundary(superGeometry, 4, omega, uAv);
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:
IndicatorCircle3D<T> outflow( outCenter, outNormal, outRadius);
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 );
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