Skip to content

Reply To: Segmentation fault for OpenLB 1.5

#6769
Fany
Participant

Hi Fedor,

Many thanks for your help. I added
“setAdvectionDiffusionConvectionBoundary<T,TDESCRIPTOR>(ADlattice, superGeometry.getMaterialIndicator({3, 4, 5}))”.

but there was still the segmentation fault:
”’
[prepareGeometry] Prepare Geometry … OK
[prepareLattice] Prepare Lattice …
[prepareLattice] Prepare Lattice …
[prepareLattice] Prepare Lattice …
[prepareLattice] Prepare Lattice …
[prepareLattice] Prepare Lattice …
[prepareLattice] Prepare Lattice …
[prepareLattice] Prepare Lattice …
[prepareLattice] Prepare Lattice …
————————————————————————–
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
————————————————————————–
————————————————————————–
mpiexec noticed that process rank 0 with PID 55086 on node chem001 exited on signal 11 (Segmentation fault).
”’

Do I need to set other BCs except the following BCs in my case?
”’
// Boundary condition
setAdvectionDiffusionTemperatureBoundary<T,TDESCRIPTOR>(ADlattice, Tomega, superGeometry, 2);
setLocalVelocityBoundary<T,NSDESCRIPTOR>(NSlattice, omega, superGeometry, 2);

setLocalVelocityBoundary<T,NSDESCRIPTOR>(NSlattice, omega, superGeometry, 3);
setInterpolatedPressureBoundary<T,NSDESCRIPTOR>(NSlattice, omega, superGeometry.getMaterialIndicator({4, 5}));

setAdvectionDiffusionConvectionBoundary<T,TDESCRIPTOR>(ADlattice, superGeometry.getMaterialIndicator({3, 4, 5}));

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 );

ADlattice.setParameter<descriptors::OMEGA>(converter.getLatticeThermalRelaxationFrequency());
NSlattice.setParameter<descriptors::OMEGA>(converter.getLatticeRelaxationFrequency());

// Lattice initialize
NSlattice.initialize();
ADlattice.initialize();

”’

BR,
Fan