Advection-Diffusion Dirichlet Temperature BC
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Advection-Diffusion Dirichlet Temperature BC
- This topic has 9 replies, 2 voices, and was last updated 3 years, 6 months ago by ramirofreile.
-
AuthorPosts
-
March 25, 2021 at 1:03 am #5565ramirofreileParticipant
Hello all!
I am working on a 3D pipe (Poiseuille thermal flow), with a NS lattice and an AD lattice.
In order to set a temperature at the inlet, I am using the
setAdvectionDiffusionTemperatureBoundary
.I am noticing that the Dirichlet temperature value I set at the inlet decreases. For example, a 1.5 temperature value becomes a 1.4 temperature value when it reaches the steady state.
I wanted to ask if anyone has undergone similar behaviors and maybe if there is a way to sort this out.
Thank you,
Ramiro
March 25, 2021 at 9:29 am #5566mathiasKeymasterDear Ramiro,
how did you define the temperature? What happens if you reset the temperature every lets say 100 time steps?
Best
MathiasMarch 25, 2021 at 5:51 pm #5567ramirofreileParticipantDear Mathias,
At the inlet I define bulkdynamics, use setAdvectionDiffusionTemperatureBoundary and finally
ADlattice.defineRho(superGeometry,inlet,T_hot)
; where T_hot is anAnalyticalConst3D
. For the NS lattice, I set the velocity usingsetInterpolatedVelocityBoundary
.Following your suggestion of resetting the temperature, I added the following to the function
setBoundaryValues
:void setBoundaryValues( ThermalUnitConverter<T, NSDESCRIPTOR, TDESCRIPTOR> const& converter, SuperLattice3D<T, NSDESCRIPTOR>& NSlattice, SuperLattice3D<T, TDESCRIPTOR>& ADlattice, int iT, SuperGeometry3D<T>& superGeometry) { int iTmaxStart = converter.getLatticeTime( maxPhysT*0.2 ); int iTupdate = 100; if ( iT%iTupdate == 0 && iT<= iTmaxStart ) { AnalyticalConst3D<T,T> T_hot(Thot); ADlattice.defineRho(superGeometry, 3 , T_hot); } }
With this routine I haven’t noticed any changes, I still see a decrease in temperature at the inlet from timestep 2 onwards. However, I may not be doing the reset appropriately.
Thank you for your time,
Ramiro
March 25, 2021 at 6:02 pm #5568mathiasKeymasterFirst check if material 3 is really set correctly. Then, can you remove “iT<= iTmaxStart" from the if-directive? If all that doesnt help, can you post or send the velocity and temerature distribution as a picture? You may also check it your case is similar to "thermalPorousPlate3d"-example. That works fine. Maybe start from there? Best Mathias
March 25, 2021 at 8:14 pm #5569ramirofreileParticipantI looked at “thermalPorousPlate3d” example. The only difference I can find with this example is the fact that at the corners of the inlet I am imposing a bounce back condition. This will get clearer with the following geometry and bc’s figure.
https://ibb.co/Gs1PcXJ (Geometry and BC’s of the problem)
As you have requested, in the next 2 figures I show the temperature and x-velocity of a slice section of the pipe. As seen in the temperature contour figure, the maximum temperature is around 1.36, while the Dirichlet value imposed is 1.5.
https://ibb.co/rxDRzMz (Temperature Contour)
https://ibb.co/t4WbpNh (X-Velocity contour)
Thank you,
Ramiro
- This reply was modified 3 years, 6 months ago by ramirofreile.
March 25, 2021 at 8:30 pm #5571mathiasKeymasterSorry, I have no idea what is going wrong. It is very strange that it is exactly 1.4 when it should be 1.5.. maybe everything is fine and it is just the postprocessing. You could output a value of the computed and set temperture close to the boundray to check. Maybe it is a convesion problem. You need to set the temperture in lattice units. Did you do that?
March 25, 2021 at 9:17 pm #5572ramirofreileParticipantI am using a hot temperature of 1.5 and a cold temperature of 0.5, such that the physical temperature is equivalent to the lattice temperature.
Something curious is that when I change the fluid relaxation time from 0.51 to 0.55, now the temperature decreases up to 1.2 instead of 1.4. After this I suspected something could be wrong with the bounce back, so I set the cylinder wall in all of its length as a cold wall. The issue is still there.
I will keep trying to explore where the issue is. I will let you know what I can find.
Thank you very much for your time and help.March 25, 2021 at 10:15 pm #5573ramirofreileParticipantMathias,
In a sense, I could solve the issue.
I tried modifying the dynamics I was using for the case above (the one which failed to maintain the 1.5 temperature value). The dynamics of the case currently not working are
ForcedPSMBGKDynamics
+TotalEnthalpyAdvectionDiffusionTRTdynamics
withTotalEnthalpyPhaseChangeCouplingGenerator3D
.
What I noticed from the Stefan Melting and Gallium Melting example is that with thedefineRho
function, the temperature value is set, and not the enthalpy (which is the “rho” for this model). In the past, when I tried to impose the hot enthalpy at the inlet, the temperature values didn’t make sense. That is the reason why I am directly defining the temperature with a 1.5 value currently.Now I tried with the combination of
ForcedBGKDynamics
+AdvectionDiffusionBGKdynamics
withNavierStokesAdvectionDiffusionCouplingGenerator3D
. The temperature value 1.5 at the inlet is maintained throughout the simulation.From this I am suspecting that there is an issue associated with the previous two dynamics, used for solidification and melting.
- This reply was modified 3 years, 6 months ago by ramirofreile.
March 26, 2021 at 9:25 am #5575mathiasKeymasterAll right, the basic approach works fine! For that case, you could contact the main author of this paper, Max Gaedtke https://www.linkedin.com/in/max-gaedtke-6b4b111b5/
March 26, 2021 at 5:26 pm #5576ramirofreileParticipantI appreciate your time and help. Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.