Editing the Examples
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Editing the Examples
- This topic has 7 replies, 3 voices, and was last updated 7 years ago by ivan.
March 15, 2016 at 12:31 pm #1813
Hello, everybody,rnrnI’m just quite new at OpenLB and I would like to start editing some examples (bstep2d, to be more specific), such as changing parameters and boundary conditions. At first what I have found at the user guide was:rnrn””To compile your own OpenLB programs from an arbitrary directory, make a copy of arnsample MakeFile. Edit the ROOT:= entry to indicate the location of the OpenLB source and the OUTPUT:= entry to explicit the name of your program, without file extension””rnrnSo, after making a copy of the MakeFile archive ( which is just for keeping the original, right? ) I opened the original one up and what I had was:rnrnROOT := ../..rnSRC :=rnOUTPUT := bstep2drnrnrnFirst of all, I didnt really get what does “”entry to indicate the location of the OpenLB source”” mean, so I tried just to copy the location of the “”src”” folder, which didnt work. Also, for the OUTPUT, whenever I try to rename it from bstep2d to anything else ( like X or NewExample ), I get error messagens when trying to compile with the command “”make””.rnrnWhat should I be doing instead?rnrnAtt.March 15, 2016 at 2:38 pm #2275albert.minkModerator
Hi, did you manage to compile bste2d without any modification of the Makefile (openlb/examples/bstep2d/Makefile)?rnrnUnless you are using the original examples, you have not to change anything for the makefiles.March 15, 2016 at 2:43 pm #2276
Yes, I was able to compile the original example using the command “”Make”” and also run the bstep2d executable through the terminal and visualize the GIFs and the simulation itself with Paraview.March 15, 2016 at 3:00 pm #2277
Basically I would like to keep the original example and at the same time have a copy, which I could edit as much as I wanted to.March 15, 2016 at 3:03 pm #2278mathiasKeymaster
Then, just copy the complete folder and give it a new name. Best MathiasMarch 15, 2016 at 3:45 pm #2279
That’s what I tried to do at first. For example, I have renamed the “”bstep2d (copy)”” folder to “”Flow&Obstacle””, then, after editing some conditions ( like the length of the step ) and trying to compile everything again with the command “”Make”” I got the following message:rnrn””depalma@zenon:~/olb-1.0r0/examples/Flow&Obstacle$ makernCreate dependencies for bstep2d.cpprn/bin/sh: 3: Obstacle/bstep2d.d: not foundrnmake: *** [/home/depalma/olb-1.0r0/examples/Flow&Obstacle/bstep2d.d] Error 127rndepalma@zenon:~/olb-1.0r0/examples/Flow&Obstacle$””rnrnIs there anything else I should change besides the name of the folder?rnMarch 15, 2016 at 3:48 pm #2280mathiasKeymaster
I understand the problem. It seems that “”&”” is not a good choice for a folder name. Try “”flowObstacle”” should work ;-). Best MathiasrnMarch 15, 2016 at 3:52 pm #2281
Yup! Seems to work now! Thank you very much 🙂
- You must be logged in to reply to this topic.