-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdimAna.m
More file actions
91 lines (69 loc) · 2.27 KB
/
dimAna.m
File metadata and controls
91 lines (69 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
%% Dimensional Analysis
%GNU General Public License v3.0
%By Stefan Thanheiser: https://orcid.org/0000-0003-2765-1156
%
%Part of the paper:
%
%Thanheiser, S.; Haider, M.
%Dispersion Model for Level Control of Bubbling Fluidized Beds with
%Particle Cross-Flow
%Chemical Engineering Research and Design 2025
%
%All data, along with methodology reports and supplementary documentation,
%is published in the data repository:
%https://doi.org/10.5281/zenodo.7924693
%
%All required files for this script can be found in the software
%repository:
%https://doi.org/10.5281/zenodo.7948224
%
%
%
%This script sets up the dimensional set shown in the paper.
%
%
%Required products, version 24.1:
% - MATLAB
%Necessary files, classes, functions, and scripts:
% - None
%% Dimensional Set
dims={'m','s','kg'}; %Dimensions
%Influencing factors and their dimensions
D=struct('name','D','m',2,'s',-1,'kg',0);
w_e=struct('name','w_e','m',1,'s',-1,'kg',0);
w_p=struct('name','w_p','m',1,'s',-1,'kg',0);
d_p=struct('name','d_p','m',1,'s',0,'kg',0);
rho_p_rho_g=struct('name','rho_p_rho_g','m',-3,'s',0,'kg',1);
rho_g=struct('name','rho_g','m',-3,'s',0,'kg',1);
my_g=struct('name','my_g','m',-1,'s',-1,'kg',1);
g=struct('name','g','m',1,'s',-2,'kg',0);
%Assigning influencing factors to matrices A and B
sA=[d_p,rho_p_rho_g,g];
sB=[D,w_e,w_p,rho_g,my_g];
%Constituting numbers
nA=numel(sA); %Number of variables in Matrix A
nB=numel(sB); %Number of variables in Matrix B
nDims=numel(dims); %Number of dimensions
nP=nA+nB-nDims; %Number of pi-factors
%Matrices
A=table('Size',[nDims,nA],...
'VariableTypes',repmat({'double'},1,nA),...
'VariableNames',{sA.name},...
'RowNames',dims);
B=table('Size',[nDims,nB],...
'VariableTypes',repmat({'double'},1,nB),...
'VariableNames',{sB.name},...
'RowNames',dims);
C=table('Size',[nP,nA],...
'VariableTypes',repmat({'double'},1,nA),...
'VariableNames',{sA.name},...
'RowNames',compose('pi%d',1:nP));
D=table('Size',[nP,nB],...
'VariableTypes',repmat({'double'},1,nB),...
'VariableNames',{sB.name},...
'RowNames',compose('pi%d',1:nP));
A{:,:}=[sA.m;sA.s;sA.kg];
B{:,:}=[sB.m;sB.s;sB.kg];
D{:,:}=eye(nP);
%Fundamental equation
C{:,:}=-D{:,:}*(A{:,:}^-1*B{:,:})';