AdvectionDiffusion Lattice

Hi

I have been following the example in thermal3d to model the advection-diffusion lattice and I had some questions regarding the coupling of that lattice to the Navier Stokes lattice.

  1. Can we define boundary nodes in the advection-diffusion lattice in the same manner as the NS lattice? My NS lattice has a porous structure (defined by bounce back nodes)

  2. How is the coupling between the two lattices achieved? I dont quite understand the “dir.push_back” vector. Does this simply state that the flow is in the x direction (dir.pushback((T)1)).

  3. What does converter.T0 return? and if I do not want to include gravity as a force can I simply set it to zero?

thanks
P.

Sorry, one more question, what are typical numbers that you use for the Rayleigh number, Pra number N and Delta t used in the simulation?

P.

  1. Can we define boundary nodes in the
    advection-diffusion lattice in the same manner as
    the NS lattice? My NS lattice has a porous
    structure (defined by bounce back nodes)

I’m not sur what would represent to do bounceback on wall nodes for the temperature… (If I understand that’s what you are trying to do…). But you still can define walls with fixed temperature the same way as you do for fluids (see lines 72-73 of the rayleigh_benard3d.cpp file).

  1. How is the coupling between the two lattices
    achieved? I dont quite understand the
    “dir.push_back” vector. Does this simply state
    that the flow is in the x direction
    (dir.pushback((T)1)).

This only states the direction of the force. It can be in any drection a-priori. Here the choice was to make it in the z direction.

  1. What does converter.T0 return? and if I do not
    want to include gravity as a force can I simply
    set it to zero?

The converter is used to convert from lb units to physical ones by using the two dimensional numbers (Rayleigh and Prandtl numbers). The Ra number is defined with respect to a temperature difference. Therefore T0 is the “cold” temperature…

For the typical numbers we use, they are around 3000-10000 for the Rayleigh (but can be a lot bigger) Pr~1 (air is 0.73 and water is 4 if i remember correctly) and delta T <0.001.

I hope it helps.

Hi:
Thanks for the clarification. The problem is that I am simulating flow through a porous media (represented by bounceback nodes) and need to account for temperature as well.

So can create a temperature boundary at a particular node? For instance can I set a node to be a particular temperature by using the command:

TboundaryCondition.addTemperatureBoundary2P(ix,ix,iy,iy,iz,iz, Tomega);

Also, can I use the AdvectionDiffusion lattice structure to simulate the transport of a passive scalar? In this case instead of a temperature gradient, I will have a concentration gradient, but I will need to do bounce-back for the scalar. Is this possible? If not, I was planning to write a routine that takes the flow field from OpenLB and combines it with Random Walk statistics (to account for diffusivity) to model the flow of a passive scalar.

thanks
P.

So can create a temperature boundary at a
particular node? For instance can I set a node to
be a particular temperature by using the command:

TboundaryCondition.addTemperatureBoundary2P(ix,ix,
iy,iy,iz,iz, Tomega);

That’s exactly what you have to do. But don’t forget that probably you will have corners also…

Also, can I use the AdvectionDiffusion lattice
structure to simulate the transport of a passive
scalar? In this case instead of a temperature
gradient, I will have a concentration gradient,
but I will need to do bounce-back for the scalar.
Is this possible?

You may have to add a new coupling post processor do so, because by default the advection diffusion also acts on the navier stokes solver. And therefore it is not a passive scalar anymore…

Thanks,
Not sure I understand how to set the corners for an interior node. The interior nodes are the solid parts of my porous media, so how do I distinguish between the NNN, NNP corners?

I’ve been trying to find the part of the code that does the coupling between the advection diffusion lattice and the NS lattice. Could you point me to the location, so that I can create a new coupling post processor based on it?

Also, would the transport of a passive scalar be part of a future release of OpenLB? Perhaps I can help in coding it.

thanks
P.

In fact you don’t need interior corners for the advection diffusion. Since the lattice used is the D3Q7 (in 3D) there are no diagonals and therefore no need for interior corners.

If your question is about the Navier stokes interior corners then the NNN mean that the vector pointing OUTSIDE the domain on the node is (-1,-1,-1) as the NNP is (-1,-1,1).

The coupling is made in the files complexDynamics/navierStokesAdvectionDiffusionCouplingPostProcessorXD.h*