matlab计算按步长加入的颗粒量

为了方便,写了这个代码就能计算不同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 flow rate, according to factory, 2000-2400ton/h
    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))
else
    fprintf('case ERROR, it should be 120 or 350\n')
end
    

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值