Comparing MATLAB results with OpenLB results
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Comparing MATLAB results with OpenLB results
 This topic has 7 replies, 4 voices, and was last updated 6 years ago by mathias.

AuthorPosts

October 6, 2015 at 9:30 pm #1800josepedroMember
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
October 6, 2015 at 9:48 pm #2256LeafMemberHi, 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.
October 6, 2015 at 10:21 pm #2257josepedroMemberHi, 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
October 7, 2015 at 7:39 am #2258LeafMemberHi, 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?
October 7, 2015 at 7:59 am #2259LeafMemberHi, 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 i4.
October 19, 2015 at 5:24 pm #2261josepedroMemberHi, 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
November 26, 2016 at 8:57 pm #2488G_sandeepMemberQuote: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é PedroDear 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
November 27, 2016 at 5:49 pm #2490mathiasKeymasterDear 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 
AuthorPosts
 You must be logged in to reply to this topic.