Skip to content

Comparing MATLAB results with OpenLB results

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Comparing MATLAB results with OpenLB results

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1800
    josepedro
    Member

    Dear forum users,rnrnI want to know if anyone have had some tests comparing LBM wrote in Matlab and Openlb.rnrnI got this results:rnhttps://raw.githubusercontent.com/josepedro/lattice_boltzman_method/Jose_Pedro/validation_anlytical_matlab_openlb/analytical_matlab_openlb.pngrnrnIt show that Matlab is more acuracy that Openlb. Is it true? If yes why?rnrnSincerely,rnJosé Pedro

    #2256
    Leaf
    Member

    Hi, Jose,rn I haven’t compared LBM wroten in Matlab and OpenLB. But it’s very common to get results with different accuracy for the same algorithm even under the same code language. It’s relevant to your model and boundary dealing. Sometime, it may even be caused by your float type selection, double or float. So I suggest that you compare the model, the boundary dealing and even the data type. What’s more, your description should be more detail. It’s hard to analyse your problem.

    #2257
    josepedro
    Member

    Hi, openlb12,rnrnThanks for fast response. rnI used the same conditions except data type. rnIn MATLAB is float and in OpenLB is double.rnI will compare with the same data type to have a more informations about acuracy.rnMy codes is here: rnhttps://github.com/josepedro/lattice_boltzman_method/tree/Jose_Pedro/validation_anlytical_matlab_openlbrnrnThanks very much!rnrnJosé Pedro

    #2258
    Leaf
    Member

    Hi, Jose,rn I don’t think the data type would be the prime reason here. Are you sure that you do the same collision and stream algorithm with OpenLB? Especially the collision, there are bunch of equilibrium distribution models for different problems.They would make the result quite different. And the boundary dealing are the same. Make sure you pick the same algorithm for your collision and boundary dealing. rn What’s more, why you try to implement the same problem under Matlab and OpenLB?

    #2259
    Leaf
    Member

    Hi, Jose,rn I tried to figure out the model you used in your Matlab code. I can’t find your boundary dealing code. And your OpenLB also missed the boundary dealing. So in OpenLB, the population for your missing direction i on the boundary, which means it’s coming from outside of your calculating domain, would just be the value of the direction i+4 or i-4.

    #2261
    josepedro
    Member

    Hi, openlb12,rnThanks for response. Sorry about my late response.rnI’m using the Matlab and OpenLB to measure the acuracy.rnDepending of acuracy, I will choice the more apropriate tool to study Lattice Boltzmann Method.rnIn my problem, I’m checking analytical solution of fluids propagation before boundary, because this I didnt put boundary dealing in codes of Matlab and OpenLB.rnI checked the algorithm of collision and stream and both are the same.rnMy complete description of problem is here:rnhttps://github.com/josepedro/lattice_boltzman_method/blob/Jose_Pedro/validation_anlytical_matlab_openlb/check_solution.pdfrnrnThanks very much!rnrnrn

    #2488
    G_sandeep
    Member
    Quote:
    Quote from josepedro on October 6, 2015, 21:30
    Dear forum users,rnrnI want to know if anyone have had some tests comparing LBM wrote in Matlab and Openlb.rnrnI got this results:rnhttps://raw.githubusercontent.com/josepedro/lattice_boltzman_method/Jose_Pedro/validation_anlytical_matlab_openlb/analytical_matlab_openlb.pngrnrnIt show that Matlab is more acuracy that Openlb. Is it true? If yes why?rnrnSincerely,rnJosé Pedro

    Dear mJose,

    Were you trying to simulate multiphase flow in MATLAB
    Even i am trying to implement LBM multiphase in MATLAB, But i am facing problems in implementing the forcing term.

    I know that this is not revelant to the topic but I din find anyone else wokring on MATLAB for LBM

    Looking foward for the response.

    Regards

    Sandeep

    #2490
    mathias
    Keymaster

    Dear all,

    We have already done various benchmark studies which you can find discussed in our papers. Our spring school in March 2017 in Tunisia will also adress accurency. We will have a lecture and computing lap on that topic!

    Best
    Mathias

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