为了方便,写了这个代码就能计算不同case的进口放入多少parcel了。这只针对MPPIC的粗粒化。
%Calculate parcel number to insert
%Remember manually change location and method(column or others)
%input
caseinput ='Input which case of MIP (120 or 350):';
casename = input(caseinput);
graininginput ='Input how many particles in one parcel(8000000 or others):';
grainingnumber = input(graininginput);
timestepinput = 'Input time step of calculation in openFOAM(units:s):';
timestep = input(timestepinput);
%constants
rhos = 1500; %kg/m3
dp = 65e-6; %m
Vp = 4/3*pi*(dp/2)^3; %m3
mp = Vp*rhos; %kg per particle
if casename == 120
Fc = (803+20)*1000/3600; %kg/s
%catalyst mass flow rate, including two inlets, From Lu et al,2013
Fc_step = Fc*timestep; %mass flow per time step
Num = Fc_step/(mp*grainingnumber);
fprintf('case is %d\n',casename)
fprintf('Number of parcels to insert per time step is %d\n',floor(Num))
elseif casename == 350
Fc = (2000)*1000/3600; %kg/s
%catalyst mass

这段MATLAB代码用于根据输入的MIP案例(120或350)、颗粒化数量和计算时间步长,自动计算每一步应插入的parcel数量。代码中设定了不同case的催化剂质量流量,然后通过质量流量、时间步长和颗粒质量来确定parcel数量。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



