Mass Flux Computation Issue
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Mass Flux Computation Issue
 This topic has 1 reply, 2 voices, and was last updated 2 years, 5 months ago by Adrian.

AuthorPosts

August 17, 2021 at 5:25 pm #5929achodankarParticipant
Hello Developers,
I have a question in regard to computing the mass flux. I get the mass flux and area(line in 2D) values as zero(i.e the first and second index of output array). Also, I would like to know the significance of the last three values in the output array. In the handbook, it says that “flow vector (ie. vector of summed quantities)”. What would these values represent in velocity, pressure, and mass flux. Lastly, we specify the origin and direction vector for computing the flux, so it means we compute the flux along the line of the origin depending on the direction of the vector, Correct?Here is the code snippet for computing the mass flux:
{
SuperLatticeVelocity2D<T, DESCRIPTOR> velocityF( sLattice);
SuperLatticeDensity2D<T,DESCRIPTOR> densityF(sLattice);T conversationFactorMass = converter.getConversionFactorMass();
T conversationFactorTime = converter.getConversionFactorTime();int Lx = converter.getLatticeLength( lx );
int Ly = converter.getLatticeLength( ly );T point[2];
point[0] = Lx/2;
point[1] = Ly/2;ofstream mflux1;
mflux1.open(“mflux_num_lat_”+ std::to_string(iT) + “.dat”);SuperPlaneIntegralFluxMass2D<T> massFlux(velocityF, densityF, superGeometry, conversationFactorMass, conversationFactorTime, {Lx/2, Ly/2}, {0., 1.}, BlockDataReductionMode::Analytical );
AnalyticalFfromSuperF2D<T> intpolatemass_lat( massFlux, true );
T numerical_mflux_lat[5];
intpolatemass_lat( numerical_mflux_lat,point);
mflux1<<“————————————————————“<<endl;
mflux1<<“The value of x is “<<point[0]<<endl;
mflux1<<“The value of y is “<<point[1]<<endl;
mflux1<<“The mass flow rate value is “<<numerical_mflux_lat[0]<<endl;
mflux1<<“The size of the area value is “<<numerical_mflux_lat[1]<<endl;
mflux1<<“The flow vector (ie. vector of summed quantities) value is “<<numerical_mflux_lat[2]<<endl;
mflux1<<“The flow vector (ie. vector of summed quantities) value is “<<numerical_mflux_lat[3]<<endl;
mflux1<<“The flow vector (ie. vector of summed quantities) value is “<<numerical_mflux_lat[4]<<endl;
mflux1<<“————————————————————“<<endl;mflux1.close();
}
Thank you.
Yours sincerely,
Abhijeet C.
September 7, 2021 at 9:14 am #5951AdrianKeymasterSpecifying the origin and direction is one possibility of parametrizing the hyperplane used by the plane integral functors. You can see other possibilities that are overloaded by constructors of
SuperLatticeIntegralFluxMass2D
in e.g. Doxygen. So yes, the flux is computed through the plane that is orthogonal to the direction vector and intersects the origin.As for the output vector:
SuperPlaneIntegralFluxMass2D
scales the integral obtained bySuperPlaneIntegral2D
by the given factors. The other documented components are returned unchanged.You do not need to wrap the mass flux functor in an interpolation functor as the integral functors return their result independent of the input coordinates (they are only accepted to satisfy the overall functor interface).
 This reply was modified 2 years, 5 months ago by Adrian.

AuthorPosts
 You must be logged in to reply to this topic.