Heat transfer liquid-solid and heat conduction in solids
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Heat transfer liquid-solid and heat conduction in solids
- This topic has 7 replies, 3 voices, and was last updated 3 months, 2 weeks ago by FBukreev.
-
AuthorPosts
-
September 25, 2022 at 10:46 pm #6823MatthiasParticipant
Hey all,
I want to simulate the surface temperature of a pipe that is cooled by a gas/fluid inside.
To do this, I need the heat exchange of the fluid with the inside of the pipe and also the heat conduction within the pipe material.
The exchange of the outside of the pipe with the environment is defined by the heat transfer coefficient.
Can OpenLB simulate this or can the code be adapted for this?
I would be very happy if someone can assess this, share experience or even give advice.With kind regards
MatthiasSeptember 28, 2022 at 11:41 am #6840FBukreevKeymasterHello Matthias,
it would be possible, if You take a larger calculation region for the pipe wall and perform there the temperature ADE with the wall material temperature conductivity -> other relaxation time. The velocity in the pipe must be set to 0. The heat flux to the environment must be defined as a source term, but possibly there must be written some new boundary condition.
Kind regards,
FedorFebruary 14, 2023 at 3:51 pm #7194Henderson_CParticipantDear FBukreev,
Regarding the source term, how can I access and modify the source code? For example, I tried to look for the source term in the galliummelting2d example. But I was not able to locate it. Please guide me on how can I add the heat flux source term.
Thanks,
February 16, 2023 at 12:04 pm #7198FBukreevKeymasterHello,
the source term is an external field defined in the Descriptor like:
using TDESCRIPTOR = D2Q5<VELOCITY,TEMPERATURE>;
You can accesss this field from the setup in 2 ways:
ADlattice.defineField<descriptors::VELOCITY>(superGeometry.getMaterialIndicator({1, 2, 3}), u0);
The u0 is an AnalyticalFunctor then.The second way is if you want calculate some source term in each cell separately, then you need to write a method inside of the setup with the following scheme:
template<typename T> void setTemperature(SuperLattice<T, DESCRIPTOR>& sLattice){ for (int iC = 0; iC < sLattice.getLoadBalancer().size(); iC++) { int nx = sLattice.getBlock(iC).getNx(); int ny = sLattice.getBlock(iC).getNy(); int nz = sLattice.getBlock(iC).getNz(); for (int iX = 0; iX < nx; ++iX) { for (int iY = 0; iY < ny; ++iY) { for (int iZ = 0; iZ < nz; ++iZ) { //calculation T scalar = someValue; sLatticeAD.getBlock(iC).get(iX,iY,iZ).template setField<descriptors::TEMPERATURE>(scalar); } } } } }
Greetings
FedorFebruary 16, 2023 at 4:09 pm #7204Henderson_CParticipantDear Fedor,
Thank you for our prompt reply. Instead of calculating or obtaining the velocity or temperature in a certain material number, I want to impose a heat source at certain space and time during the streaming and collision steps. However I am not sure if this is done through a source term.
Best regards,
February 16, 2023 at 4:13 pm #7205FBukreevKeymasterif you have the heat source then you need to use advection diffusion lbm for heat and then calculate tempreature fom it. But the sourtce term is anyway programmed on the way how I mentioned it above.
Regards,
FedorFebruary 19, 2023 at 11:39 am #7208Henderson_CParticipantDear Fedor,
I have modified the function to include a certain temperature at certain location, but the problem is that I do not see the temperature change when I visualize it in Paraview. What I understand from the above code, is that for a certain cell I can change the “Temperature” of a cell to a certain value.
Regards,
February 19, 2023 at 12:47 pm #7209FBukreevKeymasterHello,
yes, this is the way to change some value per cell.
There are many reasons why the temperature does not change. You need to display the temperature value after each operation with ADE equation to find the reason.Regards
Fedor -
AuthorPosts
- You must be logged in to reply to this topic.