Skip to content

Setting Boundary Values

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1889
    takamori67
    Member

    Hello everyone,

    I was wondering, how I can set up boundary values in physical units.

    In the examples, the inlet velocity profile was set up using latticeU, but this value is dimensionless. How do I set up a inlet maximum velocity of x m/s? All I know about LatticeU is that it’s proportional to Mach number, but I cannot know which LatticeU is corresponding to which Ma, right?

    I thought that the overall velocity can be set with charU, but all char values are only to convert lattice units into physical units. So if I say that my characteristic velocity is 10m/s, how do I set up my inlet boundary values correspondingly?

    I had the same issue trying setting up pressure boundary conditions. That time I converted a physical pressure into a lattice rho and used that as the inlet boundary value, but the simulation diverges to infinity immediately.

    I would gladly appreciate your help.

    Best,
    Sumit

    #2517
    robin.trunk
    Keymaster

    Hi Sumit,

    latticeU and charU are conversion factors. latticeU is the lattice velocity in m/s. The boundary functions expect lattice values, it converts such that setting latticeU on the bonudary will give you charU as physical result.
    For the pressure boundary the stability problem could arise from inducing large gradients.

    Best
    Robin

    #2518
    takamori67
    Member

    Hi Robin,

    thank you for your help!
    So if I understand correctly, if I set charU to be let’s say 100m/s, and latticeU to be 0.1m/s and feed latticeU as velocity boundary value to the boundary function at the inlet: Then the converter sets a latticeU of 1m/s in the lattice to be equal to 100m/s in physical values and consequently the physical inlet velocity would be 10m/s?

    As for the pressure inlet, I am using the polynomial start scale as a smooth start scale.

    Best,
    Sumit

    #2519
    robin.trunk
    Keymaster

    Hi Sumit,

    what values do you use for the pressure? For the velocity let me elaborate it with an example:
    Setting:
    latticeU = 0.01
    charU = 0.2
    latticeL = 0.01
    then applying:
    CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU(), converter.getLatticeL());
    will give you the velocity:
    charU * latticeL = 0.002
    latticeU will result in charU, however some functions contain a scaling factor (here converter.getLatticeL()) that you have to consider. However if you want to omit this factor it defaults to 1. But maybe your problem is such a factor, see e.g.
    http://optilb.com/DoxyGen/html/db/d0d/classolb_1_1CirclePoiseuille3D.html

    Best
    Robin

    #2525
    takamori67
    Member

    Hi Robin,

    for pressure I have initialized the whole fluid with 0 Pa and then let the inlet pressure slowly increase to 100Pa with constant outlet pressure of 0Pa.

    Thank you for the example!
    So the inlet velocity in physical units is calculated by charU * latticeL ? In your example the physical inlet velocity is 0.002m/s? Accordingly, to have an inlet velocity of 100m/s at a latticeL of 0.0001, I have to set charU to 10^6 m/s?
    Then what does latticeU do other than defining the time step with physTime= latticeL*latticeU/charU? Where does the compressibility effects come into play?

    Thank you for the help with the scaling factor for CirclePoiseuille3D, that was really useful.

    Best,
    Sumit

    #2526
    robin.trunk
    Keymaster

    Hi Sumit,

    in this example yes the physical velocity is charU * latticeL. Usually setting latticeU will give you charU as physical velocity (for a scaling factor of 1), however in this example the scaling factor in the CirclePoiseuille is chosen to be latticeL.
    This scaling is not necessary if you replace
    CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU(), converter.getLatticeL());
    by
    CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU(), 1.);
    or
    CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU());
    you will get a inlet velocity of 100m/s for charU=100m/s.

    To learn more about the transformations (e.g. what is effected by latticeU) you could have a look at the doxygen of the unit converter:
    http://optilb.com/DoxyGen/html/d1/d25/classolb_1_1LBconverter.html

    The influence of compressibility should be related to the Mach number, to find more detailed information I can recommend e.g.
    T. Krüger, H. Kusumaatmaja, A. Kuzmin, O. Shardt, G. Silva, E.M. Viggen. The Lattice Boltzmann Method – Principles and Practice

    Best
    Robin

    #2527
    takamori67
    Member

    Hi Robin,

    thank you for the information, especially for the great literature source.

    Your examples and the converter doxygen gave me a better understanding.

    What I am trying to do is having a relatively high charU = 200m/s and a very small latticeL < 0.0001. With latticeU at around 0.3 (higher values tend to get unstable), I get very small physical time steps at 10^-7s (with physTime= latticeL*latticeU/charU * latticeTime(=1)). For my purposes I only need about 10^-5s. Is there a way to increase the time step length other than changing charU, latticeL or latticeU, because these are quite fixed in my case.

    #2529
    robin.trunk
    Keymaster

    Hi Sumit,

    what is the Reynolds number of the case you are trying to simulate?
    Since the instabilities probably arise from a high Reynolds number you could try to apply a turbulence model. You can have a look at the aorta3D example where a Smagorinsky turbulence model is applied. This should allow for bigger timesteps or a coarser resolution.

    Best
    Robin

    #2530
    takamori67
    Member

    Hi Robin,
    my parameters are charL = 5mm, charU= 220m/s, charNu= 0.000015 m^2/s so that I get Re = 75000.
    My spacial resolution right now is at latticeL = 0.0002m, with these settings I get a time discretization of 10^-7 s/step, which for my purposes is way too fine. I would like to increse my physTime by a factor of 100, but all the parameters for physTime are fixed. Is there a way to change the pysical time per time step manually?

    I am already using the Consitent Strain Smagorinsky turbulence model for my under resolved mesh.

    Best,
    Sumit

    #2531
    robin.trunk
    Keymaster

    Hi Sumit,

    the dependency of the timesteo size on these parameters is intrisic to the lattice Boltzmann method. There is no function to change the step size without affecting the spatial discretization and / or latticeU.
    You just can look at the dependenccies in the LBconverter and maybe find a configuration that is suited for you. E.g. a smaller charU should result in larger physical timesteps, so maybe decreasing charU and setting x*converter.getLatticeU() in the CirclePoiseuille?

    Best
    Robin

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