Flow and heat transfer
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Flow and heat transfer
- This topic has 4 replies, 3 voices, and was last updated 6 years, 11 months ago by Alin.
-
AuthorPosts
-
September 8, 2017 at 3:10 pm #1940AlinMember
Hi, I am working on an analysis of flow characteristic and heat transfer past two heated cylinders by LBM. I have some questions about openlb which I cannot find answer in user guide and examples.
a) How can I set the temperature boundary at the cylinders in the simulation of the flow around the cylinders?
b) Is there an example of simultaneous analysis of flow and heat transfer?
Thank you.September 8, 2017 at 5:15 pm #2711robin.trunkKeymasterHi 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
RobinSeptember 11, 2017 at 2:21 pm #2712mgaedtkeKeymasterHello Alan,
I am currently working on the thermal LBM in OpenLB and this part of the code is under heavy development at the moment. We hope to publish a revised version of the Advection-Diffusion-Equiation implementation till the end of the year.
However, you can set a constant temperature boundary by the function .addTemperatureBoundary() in AdvectionDiffusionBoundarys. Have a look at the example RayleighBenard2d or 3d, which are simulations of the rayleigh benard convection between a hot plate at the bottom and a cold plate on top (https://en.wikipedia.org/wiki/Rayleigh%E2%80%93B%C3%A9nard_convection)
Best regards,
MaxSeptember 11, 2017 at 3:13 pm #2714AlinMember[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
RobinDear 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
AlanSeptember 11, 2017 at 3:26 pm #2715AlinMemberQuote:Quote from mgaedtke on September 11, 2017, 14:21
Hello Alan,I am currently working on the thermal LBM in OpenLB and this part of the code is under heavy development at the moment. We hope to publish a revised version of the Advection-Diffusion-Equiation implementation till the end of the year.
However, you can set a constant temperature boundary by the function .addTemperatureBoundary() in AdvectionDiffusionBoundarys. Have a look at the example RayleighBenard2d or 3d, which are simulations of the rayleigh benard convection between a hot plate at the bottom and a cold plate on top (https://en.wikipedia.org/wiki/Rayleigh%E2%80%93B%C3%A9nard_convection)
Best regards,
MaxDear Max,
Thank you for your reply.
I am studying the examples RayleighBenard2d and 3d. I would like to know if it is possible to combine the example cylinder2d and forced convection. The purpose is to study the flow and heat transfer past heated cylinder. Because there is no analysis of heat transfer in the example cylinder2d.
Thank you very much.
Best regards,
Alan -
AuthorPosts
- You must be logged in to reply to this topic.