Skip to content

Re: Flow and heat transfer

#2714
Alin
Member

[color=#][color=#]

Quote:
Quote from robin.trunk on September 8, 2017, 17:15
Hi alan.sant,

a) You can set the temperature boundary for the cylinder similar to the case in the examples by the material number (assuming you set a material number for each cylinder like in the cylinder3d example). Just have a look at thermal2d oder thermal3d, in the functions
prepareLattice(…)
-> here the type of boundary is set by addTemperatureBoundary(…)
setBoundaryValues(…)
-> here the values are defined by an AnalyticalConst object and set by defineRho(…) and definePopulations(…)

b) In the examples thermal2d and thermal3D a Rayleigh-Bernard convection is simulated (coupled flow and temperature field)

Best
Robin

Dear Robin,
Thank you for your reply.

I have studied the examples thermal2d and thermal3d, but there are some warnings when running the code of thermal2d.

Warning is as follows,

$ make
Create dependencies for rayleighBenard2d.cpp
Compile rayleighBenard2d.cpp
g++ -DOLB_PRECOMPILED -O3 -Wall -std=c++0x -I../../src -I../../src/ -I../../src/external -c rayleighBenard2d.cpp -o /home/L/olb/examples/thermal2d/rayleighBenard2d.o
In file included from ../../src/core/core2D.hh:29:0,
from ../../src/olb2D.hh:4,
from rayleighBenard2d.cpp:33:
../../src/core/blockLattice2D.hh: in the function ‘void olb::BlockLattice2D<T, Lattice>::makePeriodic() [with T = double; Lattice = olb::descriptors::ForcedD2Q9Descriptor]’:
../../src/core/blockLattice2D.hh:702:6: Warning : assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
void BlockLattice2D<T,Lattice>::makePeriodic()
^
../../src/core/blockLattice2D.hh:702:6: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
../../src/core/blockLattice2D.hh:688:9: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
if ( nextX<0 || nextX>=this->_nx ||
^
../../src/core/blockLattice2D.hh:688:9: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
cc1plus: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
../../src/core/blockLattice2D.hh: in the function‘void olb::BlockLattice2D<T, Lattice>::makePeriodic() [with T = double; Lattice = olb::descriptors::AdvectionDiffusionD2Q5Descriptor]’:
../../src/core/blockLattice2D.hh:702:6: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
void BlockLattice2D<T,Lattice>::makePeriodic()
^
../../src/core/blockLattice2D.hh:702:6: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
../../src/core/blockLattice2D.hh:688:9: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
if ( nextX<0 || nextX>=this->_nx ||
^
../../src/core/blockLattice2D.hh:688:9: Warning:assuming signed overflow does not occur when assuming that (X – c) > X is always false [-Wstrict-overflow]
if ( nextX<0 || nextX>=this->_nx ||
^

I would like to know whether these warnings affect the results.

Thank you very much.

Best
Alan