Skip to content

Advection-Diffusion Dirichlet Temperature BC

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Advection-Diffusion Dirichlet Temperature BC

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #5565
    ramirofreile
    Participant

    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

    #5566
    mathias
    Keymaster

    Dear Ramiro,

    how did you define the temperature? What happens if you reset the temperature every lets say 100 time steps?

    Best
    Mathias

    #5567
    ramirofreile
    Participant

    Dear Mathias,

    At the inlet I define bulkdynamics, use setAdvectionDiffusionTemperatureBoundary and finally ADlattice.defineRho(superGeometry,inlet,T_hot); where T_hot is an AnalyticalConst3D. For the NS lattice, I set the velocity using setInterpolatedVelocityBoundary.

    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

    #5568
    mathias
    Keymaster

    First 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

    #5569
    ramirofreile
    Participant

    I 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 1 year, 4 months ago by ramirofreile.
    #5571
    mathias
    Keymaster

    Sorry, 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?

    #5572
    ramirofreile
    Participant

    I 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.

    #5573
    ramirofreile
    Participant

    Mathias,

    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 with TotalEnthalpyPhaseChangeCouplingGenerator3D.
    What I noticed from the Stefan Melting and Gallium Melting example is that with the defineRho 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 with NavierStokesAdvectionDiffusionCouplingGenerator3D. 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 1 year, 4 months ago by ramirofreile.
    #5575
    mathias
    Keymaster

    All 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/

    #5576
    ramirofreile
    Participant

    I appreciate your time and help. Thank you!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.