Skip to content

Editing the Examples

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1813
    ivan
    Member

    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.

    #2275
    albert.mink
    Moderator

    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.

    #2276
    ivan
    Member

    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.

    #2277
    ivan
    Member

    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.

    #2278
    mathias
    Keymaster

    Then, just copy the complete folder and give it a new name. Best Mathias

    #2279
    ivan
    Member

    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?rn

    #2280
    mathias
    Keymaster

    I understand the problem. It seems that “”&”” is not a good choice for a folder name. Try “”flowObstacle”” should work ;-). Best Mathiasrn

    #2281
    ivan
    Member

    Yup! Seems to work now! Thank you very much 🙂

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