Skip to content

Reply To: Segmentation fault for OpenLB 1.5

#6767
Fany
Participant

Hi Fedor,

I am sorry that I did not see the periodic baoundaries in the rayleighBernard3d.

In my case, I need to simulate the temperature and velocity distribution when the water flows the aorta structure (heating wall). The material 1 is water flowing from inlet to outlet as cooling source. The material 3 is inlet, and 4, 5 are the outlets.

So I have just set the BC of wall (heating source) at constant temperature by the following functor:
”’
setAdvectionDiffusionTemperatureBoundary<T,TDESCRIPTOR>(ADlattice, Tomega, superGeometry, 2)
”’
I did not set the temperature BC for the inlet and outlet.

and set the BC of inlet velocity and outlet pressure :
”’
setLocalVelocityBoundary<T,NSDESCRIPTOR>(NSlattice, omega, superGeometry, 3);
setInterpolatedPressureBoundary<T,NSDESCRIPTOR>(NSlattice, omega, superGeometry.getMaterialIndicator({4, 5}));
”’

and then set the initial conditions:
”’
AnalyticalConst3D<T,T> rhoF(1.);
AnalyticalConst3D<T,T> uF( 0.0, converter.getLatticeVelocity(Re * converter.getPhysViscosity() / converter.getCharPhysLength()), 0.0);
AnalyticalConst3D<T,T> u0(0.0, 0.0, 0.0);
AnalyticalConst3D<T,T> T_cold(converter.getLatticeTemperature(Tcold));
AnalyticalConst3D<T,T> T_hot(converter.getLatticeTemperature(Thot));

// Initialize all values of distribution functions to their local equilibrium
NSlattice.defineRhoU(superGeometry, 3, rhoF, uF);
NSlattice.iniEquilibrium(superGeometry, 3, rhoF, uF);
NSlattice.defineRhoU( superGeometry.getMaterialIndicator({1, 4, 5}),rhoF, u0 );
NSlattice.iniEquilibrium( superGeometry.getMaterialIndicator({1, 4, 5}),rhoF, u0 );

ADlattice.defineRho(superGeometry, 1, T_cold);
ADlattice.iniEquilibrium(superGeometry, 1, T_cold, u0);
ADlattice.defineRho(superGeometry, 2, T_hot);
ADlattice.iniEquilibrium(superGeometry, 2, T_hot, u0);
ADlattice.defineRho(superGeometry.getMaterialIndicator({ 4, 5}), T_cold);
ADlattice.iniEquilibrium(superGeometry.getMaterialIndicator({ 4, 5}), T_cold, u0);
ADlattice.defineRho(superGeometry, 3, T_cold);
ADlattice.iniEquilibrium(superGeometry, 3, T_cold, u0);

NSlattice.defineU( superGeometry, 3, uF );
”’

All above BC settings can make my case work well in the OpenLB V1.4 but fail in V1.5.

I am not sure if you mean I need to set the Temperature BC at one inlet and two outlets.

BR,
Fany