Skip to content

Editing The Script

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6787
    Anas GH
    Participant

    Hello everyone,

    I am new to OpenLB and I would like to ask a couple of questions. They mainly focus on the example Cavity2D. First, What is the Smagorinsky effect added to the code and how can I remove it? Second of all, if he initialized a constant Rayleigh Number, why at the end of the code he specifies different Rayleigh Number?

    Your support is highly appreciated,

    #6788
    Adrian
    Keymaster

    The laminar/cavity2d case doesn’t use Smagorinsky LES. You could add it by changing the bulk dynamics type and setting the collision::LES::Smagorinsky parameter (see e.g. examples/turbulence for reference).

    The example is parameterized for Re=1000 by default and compares to matching literature values. I assume you are confused by the definition of vel_ghia_RE100 in 195: This is only so you can quickly switch to the Re=100 case reference values.

    #6790
    Anas GH
    Participant

    Dear Adrian,

    Thank you for your reply. I apologize if I didn’t specify which folder. I am talking about square cavity2d from the thermal file.

    #6791
    Adrian
    Keymaster

    Ok, no problem. By default Smagorinsky is not used in thermal/squareCavity2d (as the example specific #define SMAGORINSKY flag is commented out).

    #6792
    Anas GH
    Participant

    Dear Adrian,

    If I want to add a parameter and store it later on. How can I do such thing. Please guide me because I am confused.

    #6793
    Adrian
    Keymaster

    What do you mean by “add a parameter and store it later on”? Develop a new collision model with new parameters? Dynamically change some existing parameter value of the simulation? Something else?

    #6794
    Anas GH
    Participant

    For example, I want to get the tempreture at certain location(y) across lx.Then calculate Theta= T-Tcold/Thot-Tcold and plot it versus the original length.

    #6795
    Adrian
    Keymaster

    One common way of extracting and plotting data is via post processing the VTK output in e.g. ParaView.

    Of course it is also possible to extract this data directly inside the OpenLB application. E.g. you can extract the line data using BlockReduction2D1D applied to the SuperLatticePhysTemperature2D functor. On top of this you will then be able to compute the Theta values using either functor arithmetic or plain C++.

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