﻿{"id":1827,"date":"2022-04-06T00:52:38","date_gmt":"2022-04-06T00:52:38","guid":{"rendered":"http:\/\/81.70.49.155\/?p=1827"},"modified":"2022-04-06T00:57:06","modified_gmt":"2022-04-06T00:57:06","slug":"lbm%e6%a8%a1%e6%8b%9f%e5%8a%a8%e8%84%89%e6%96%91%e5%9d%97%e4%b8%8b%e7%9a%84%e8%a1%80%e6%b6%b2%e6%b5%81%e5%8a%a8%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"http:\/\/81.70.49.155\/?p=1827","title":{"rendered":"LBM\u6a21\u62df\u52a8\u8109\u6591\u5757\u4e0b\u7684\u8840\u6db2\u6d41\u52a8\u7a0b\u5e8f"},"content":{"rendered":"<p>\n\t<img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/04\/20220406084945_43034.jpg\" alt=\"\" \/>\n<\/p>\n<p>\n\t%%\u4e3b\u7a0b\u5e8f%%%%%%%%%%%%%%%%%%%%%%%\n<\/p>\n<p>\n\tclc; clear; close;<br \/>\nlx=1680;&nbsp; &nbsp; ly=140;<br \/>\nlyp=0.005;%m<br \/>\nLr=lyp\/ly;<br \/>\ncs=1\/3^0.5; c_squ=cs^2;&nbsp;<br \/>\nt1=4\/9; t2=1\/9; t3=1\/36;&nbsp;<br \/>\nRe=400;<br \/>\nUin=0.02; D=fix(0.022\/Lr);<br \/>\nnu=D*Uin\/Re;<br \/>\ntau=3*nu+0.5;<br \/>\nomega=1\/tau;<br \/>\nt= [1\/9,1\/36,1\/9,1\/36,1\/9,1\/36,1\/9,1\/36,4\/9];<br \/>\nex=[1, 1, 0, -1, -1, -1, 0, 1, 0];&nbsp; &nbsp; &nbsp;<br \/>\ney=[0, 1, 1, 1, 0, -1, -1, -1, 0];&nbsp;<br \/>\noppo=[5,6,7,8,1,2,3,4,9];&nbsp;<br \/>\nrho=ones(ly,lx);<br \/>\nUX=zeros(ly,lx);&nbsp;<br \/>\nUX=Uin;&nbsp;<br \/>\nUY=zeros(ly,lx);&nbsp;<br \/>\nF=zeros(ly,lx,9);<br \/>\nFEQ=FEQf(UX,UY,rho,t1,t2,t3,c_squ);<br \/>\nF=FEQ; Fb=F;<br \/>\n[y,x]=meshgrid(1:ly,1:lx);&nbsp; %\u751f\u6210\u5e8f\u53f7\u7f51\u683c<br \/>\nbound =[((x'-[lx\/4]).^2 + (y'-[D\/2]+510).^2 )&lt;=(D\/2)^2]+...&nbsp;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[y'==1]+[y'==ly];<br \/>\nobs=find(bound);&nbsp; &nbsp;%\u627e\u5230\u58c1\u9762\u7f51\u683c\u7684\u5168\u5c40\u4f4d\u7f6e<br \/>\nm=length(obs);<br \/>\nb2b=zeros(9*m,1);&nbsp; bid=zeros(9*m,1);<br \/>\nfor i=0:8<br \/>\n&nbsp; &nbsp; &nbsp;bid(i*m+1:(i+1)*m)=(oppo(i+1)-1)*lx*ly+obs;<br \/>\n&nbsp; &nbsp; &nbsp;b2b(i*m+1:(i+1)*m)=i*lx*ly+obs;<br \/>\nend<\/p>\n<p>for i=1:80000<br \/>\nF=stream(F,ly,lx);<br \/>\nrho = sum(F,3);<span> <\/span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;%\u8ba1\u7b97\u5bc6\u5ea6<br \/>\nUX=(sum(F(:,:,[1 2 8]),3)-sum(F(:,:,[4 5 6]),3)).\/rho;&nbsp; &nbsp;%\u8ba1\u7b97x\u901f\u5ea6<br \/>\nUY=(sum(F(:,:,[2 3 4]),3)-sum(F(:,:,[6 7 8]),3)).\/rho;&nbsp; &nbsp;%\u8ba1\u7b97y\u901f\u5ea6<br \/>\nUX(obs)=0;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UY(obs)=0;&nbsp;<br \/>\nUX(2:ly-1,1)=Uin*(2:ly-1)\/(ly-1).*(1-(2:ly-1)\/(ly-1))*4;&nbsp; &nbsp;UY(2:ly-1,1)=0;&nbsp;<br \/>\nrho (2:ly-1,1)=rho (2:ly-1,2); %\u5bc6\u5ea6\u91c7\u7528\u5916\u63a8<br \/>\nUX(2:ly-1,lx)= UX(2:ly-1,lx-1);&nbsp; %\u53f3\u7aef\u51fa\u53e3\uff0c\u901f\u5ea6\u91c7\u7528\u5916\u63a8<br \/>\nUY(2:ly-1,lx)= UY(2:ly-1,lx-1);&nbsp;&nbsp;<br \/>\nrho (2:ly-1,lx)=1; %\u5bc6\u5ea6\u6307\u5b9a<br \/>\nP=cs^2*rho;<br \/>\nFEQ=FEQf(UX,UY,rho,t1,t2,t3,c_squ);<br \/>\nBOUNCEBACK=F(b2b);&nbsp; &nbsp;%\u83b7\u5f97\u53cd\u5f39\u91cf<br \/>\nF=omega*FEQ+(1-omega)*F;&nbsp; %\u78b0\u649e<br \/>\nF(bid)=BOUNCEBACK;&nbsp; &nbsp;%\u5c06\u53cd\u5f39\u91cf\u8d4b\u4e88\u76f8\u5e94\u4f4d\u7f6e<br \/>\nF(2:ly-1,1,:)=FEQ(2:ly-1,1,:)+((F(2:ly-1,2,:)-FEQ(2:ly-1,2,:)));&nbsp; %\u5de6\u8fb9\u5165\u53e3<br \/>\nF(2:ly-1,lx,:)=FEQ(2:ly-1,lx,:)+((F(2:ly-1,lx-1,:)-FEQ(2:ly-1,lx-1,:)));&nbsp; %\u53f3\u8fb9\u51fa\u53e3<br \/>\n%\u7ed3\u679c\u663e\u793a<br \/>\nOutputRes;<br \/>\nend&nbsp;\n<\/p>\n<p>\n\t<span>%%\u5e73\u8861\u6001\u5206\u5e03\u51fd\u6570%%%%%%%%%%%%%%%%%%%%%%%<\/span>\n<\/p>\n<p>\n\tfunction FEQ=FEQf(UX,UY,rho,t1,t2,t3,c_squ)<br \/>\n&nbsp; &nbsp; U_SQU=UX.^2+UY.^2;&nbsp; &nbsp; &nbsp; U_C2=UX+UY;<br \/>\n&nbsp; &nbsp; U_C4=-UX+UY;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; U_C6=-U_C2;<br \/>\n&nbsp; &nbsp; U_C8=-U_C4;<br \/>\n&nbsp; &nbsp; FEQ(:,:,9)=t1*rho.*(1-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,1)=t2*rho.*(1+UX\/c_squ+0.5*(UX\/c_squ).^2-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,3)=t2*rho.*(1+UY\/c_squ+0.5*(UY\/c_squ).^2-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,5)=t2*rho.*(1-UX\/c_squ+0.5*(UX\/c_squ).^2-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,7)=t2*rho.*(1-UY\/c_squ+0.5*(UY\/c_squ).^2-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,2)=t3*rho.*(1+U_C2\/c_squ+0.5*(U_C2\/c_squ).^2-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,4)=t3*rho.*(1+U_C4\/c_squ+0.5*(U_C4\/c_squ).^2-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,6)=t3*rho.*(1+U_C6\/c_squ+0.5*(U_C6\/c_squ).^2-U_SQU\/(2*c_squ));<br \/>\n&nbsp; &nbsp; FEQ(:,:,8)=t3*rho.*(1+U_C8\/c_squ+0.5*(U_C8\/c_squ).^2-U_SQU\/(2*c_squ));\n<\/p>\n<div>\n\t\n<\/div>\n<p><span><span>%%\u8fc1\u79fb%%%%%%%%%%%%%%%%%%%%%%%<\/span><\/span><span><\/span> <\/p>\n<p>\n\t\n<\/p>\n<p>\n\tfunction F=stream(F,ly,lx)<br \/>\nF(:,:,1)=F(:,[lx 1:lx-1],1);<br \/>\nF(:,:,2)=F([ly 1:ly-1], [lx 1:lx-1],2);<br \/>\nF(:,:,3)=F([ly 1:ly-1],:,3);<br \/>\nF(:,:,4)=F( [ly 1:ly-1], [2:lx 1],4);<br \/>\nF(:,:,5)=F(:,[2:lx 1],5);<br \/>\nF(:,:,6)=F([2:ly 1], [2:lx 1],6);<br \/>\nF(:,:,7)=F([2:ly 1],:,7);<br \/>\nF(:,:,8)=F([2:ly 1],[lx 1:lx-1],8);\n<\/p>\n<p>\n\t\n<\/p>\n<p>\n\t<span>%%\u7ed3\u679c\u663e\u793a%%%%%%%%%%%%%%%%%%%%%%%<\/span>\n<\/p>\n<p>\n\t<span>&nbsp;if mod(i,300)==0<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;clc ; clf;&nbsp; &nbsp;i&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;U = sqrt(UX.^2+UY.^2);<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;hold on&nbsp; &nbsp;&nbsp;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DUX=diff(UX);<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DUY=diff(UY);<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Vor=DUY(1:ly-1,1:lx-1)-DUX(1:ly-1,1:lx-1);<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;contour(Vor,100);<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;imagesc(0,300,U,[0,1.5*Uin])<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XL=(2:2:ly-1)+150;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;streamline(x',y'+150,UX,UY,ones(1,length(XL)),XL,1)<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;colormap('jet');axis equal; drawnow;&nbsp;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;hold off<br \/>\n&nbsp;end<\/p>\n<p><\/span>\n<\/p>\n<p>\n\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>%%\u4e3b\u7a0b\u5e8f%%%%%%%%%%%%%%%%%%%%%%% clc; clear; close; lx=1680 &hellip; <a href=\"http:\/\/81.70.49.155\/?p=1827\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cLBM\u6a21\u62df\u52a8\u8109\u6591\u5757\u4e0b\u7684\u8840\u6db2\u6d41\u52a8\u7a0b\u5e8f\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"views":977,"_links":{"self":[{"href":"http:\/\/81.70.49.155\/index.php?rest_route=\/wp\/v2\/posts\/1827"}],"collection":[{"href":"http:\/\/81.70.49.155\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/81.70.49.155\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/81.70.49.155\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/81.70.49.155\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1827"}],"version-history":[{"count":2,"href":"http:\/\/81.70.49.155\/index.php?rest_route=\/wp\/v2\/posts\/1827\/revisions"}],"predecessor-version":[{"id":1831,"href":"http:\/\/81.70.49.155\/index.php?rest_route=\/wp\/v2\/posts\/1827\/revisions\/1831"}],"wp:attachment":[{"href":"http:\/\/81.70.49.155\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/81.70.49.155\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1827"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/81.70.49.155\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}