91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-04-18
  • 語言: Matlab
  • 標(biāo)簽: MATLAB??LBM??

資源簡介

多個 LBM格子波爾茲曼 matlab范例,適合初學(xué)者。

資源截圖

代碼片段和文件信息

clc
clear

%?Load?LBM-C?Variables
%??lbm_c_vars

%?Project?Variables
ProjName?=?‘cylinder2d‘;
DomainFile?=?‘cylinder2d.cgns‘;
OutputFile?=?‘cylinder2d.res‘;

%?Solution?Constants
Tau?=?1.0;
Lx?=?500;
Ly?=?100;
Lz?=?1;
DeltaX?=?1;
DeltaT?=?1;
C_smag?=?0;

%?Solution?Configuration
ColType?=?‘BGK‘;
Force?=?0;
MicroBC?=?1;
MacroBC?=?1;
Init?=?0;
Tolerance?=?0;

%?Timing?Data
MaxT?=?10000;
FileOut?=?500;
ScreenMes?=?50;
SteadyCheck?=?0;

%?Output?Variables
Ux?=?1;
Uy?=?1;
Uz?=?0;
Rho?=?1;
P?=?1;
ScreenX?=?0;
ScreenY?=?floor(Ly/2);
ScreenZ?=?0;
Interactive?=?0;

%?Domain?Arrays
porosity?=?zeros(LxLy);
micro_bc?=?zeros(LxLy);
macro_bc?=?zeros(LxLy);
rho?=?zeros(LxLy);
velocity?=?zeros(3LxLy);

porosity(:[1Ly])?=?1;
obst_x?=?floor((1/5)*Lx);
obst_y?=?floor((1/2)*Ly)-2;
obst_r?=?20;

for?i?=?0:(Lx)
????for?j?=?0:(Ly)
????????if?(i-obst_x)^2?+?(j-obst_y)^2<=?obst_r^2
????????????porosity(ij)?=?1;
????????end
????end
end

micro_bc(1:)?=?ZOU_HE_P_x;
micro_bc(Lx:)?=?ZOU_HE_P_X;
macro_bc(1:)?=?PRESCRIBED_RHO;
macro_bc(Lx:)?=?PRESCRIBED_RHO
rho(1:)?=?1.00002;
rho(Lx:)?=?0.99998;
????
write_ascii_input
write_cgns_input

fname_in?=?[ProjName‘.lbmc‘];
command?=?[‘lbm-c-2d?‘fname_in];
system(command);

time_values?=?read_output_times(OutputFile);

ux?=?read_output_field(OutputFilelength(time_values)‘VelocityX‘);
uy?=?read_output_field(OutputFilelength(time_values)‘VelocityY‘);
rho?=?read_output_field(OutputFilelength(time_values)‘Density‘);

for?i?=?1:length(time_values)
????ux?=?read_output_field(OutputFilei‘VelocityX‘);
????uy?=?read_output_field(OutputFilei‘VelocityY‘);
????u?=?sqrt(ux.*ux+uy.*uy);
????imagesc(u‘);
????pause
end

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1760??2014-02-27?10:04??examples\cylinder2d.m

?????文件????????840??2014-03-04?09:13??examples\cylinder2d.rar

?????文件???????1571??2012-12-10?13:57??examples\forced_cylinder2d.m

?????文件????????774??2014-03-04?09:13??examples\forced_cylinder2d.rar

?????文件???????1766??2012-12-10?13:37??examples\porous_cylinder2d.m

?????文件????????845??2014-03-04?09:13??examples\porous_cylinder2d.rar

?????目錄??????????0??2014-03-04?09:13??examples

-----------?---------??----------?-----??----

?????????????????7556????????????????????7


評論

共有 條評論