Skip to content

Change the value of nx and ny for cavity2d examples?

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Change the value of nx and ny for cavity2d examples?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1743
    Thir
    Member

    Dear all,rnrnI used cavity2d in my experiment. It run successfully in sequential and also parallel (mpi).rnNow i want to increase the value of nx and ny, but i don’t find yet where can i change those values.rnDoes anyone know where can i change the value of nx and ny for cavity2d examples?rnAny helps or comments are really appreciated.rnrnThir

    #2118
    mathias
    Keymaster

    Hallo Thir,rnrn You can change the resultion in the xml-file by changing the parameter “”latticeL”” which is the size of a voxel in meter. In this example we have a square cavity of lenth 1 m. The function “”converter->numNodes(x)”” returns the number of voxels of size “”latticeL”” for x meter. In this example we set “”int N = converter->numNodes();”” which gives us the number of voxels of size “”latticeL”” for 1 meter. Have a look at the other examples e.g. “”cylinder2d”” and our user guid.rnrnMathias

    #2119
    Thir
    Member

    Hallo Mathias,rnrnThank you so much for your quick reply and also for your answer. I’ve changed the value of latticeL in cavity2d.xml and description_cavity2d.xml files, and it works. So does it means the value of nx and ny always same? Sorry i am newbie in LBM.rnrnThir

    #2120
    mathias
    Keymaster

    Hi Thir,rnrn No. If you can change the source code in order to have any size you want. Have a look at our example “”cavity3d””.rnrnRegardsrnMathias

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