Editing The Script
› Forums › on OpenLB › General Topics › Editing The Script
- This topic has 7 replies, 2 voices, and was last updated 3 years, 2 months ago by Adrian.
-
AuthorPosts
-
September 8, 2022 at 8:17 am #6787JijoParticipant
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,
September 8, 2022 at 9:22 am #6788AdrianKeymasterThe
laminar/cavity2dcase doesn’t use Smagorinsky LES. You could add it by changing the bulk dynamics type and setting thecollision::LES::Smagorinskyparameter (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_RE100in 195: This is only so you can quickly switch to the Re=100 case reference values.September 8, 2022 at 10:38 am #6790JijoParticipantDear 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.
September 8, 2022 at 10:52 am #6791AdrianKeymasterOk, no problem. By default Smagorinsky is not used in
thermal/squareCavity2d(as the example specific#define SMAGORINSKYflag is commented out).September 8, 2022 at 11:10 am #6792JijoParticipantDear 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.
September 8, 2022 at 11:19 am #6793AdrianKeymasterWhat 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?
September 8, 2022 at 11:24 am #6794JijoParticipantFor 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.
September 8, 2022 at 2:42 pm #6795AdrianKeymasterOne 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
BlockReduction2D1Dapplied to theSuperLatticePhysTemperature2Dfunctor. On top of this you will then be able to compute the Theta values using either functor arithmetic or plain C++. -
AuthorPosts
- You must be logged in to reply to this topic.
