-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprepStatic.m
More file actions
90 lines (72 loc) · 2.26 KB
/
prepStatic.m
File metadata and controls
90 lines (72 loc) · 2.26 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
%% Prepare Stationary Test 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 prepares the data of the stationary tests for further analysis
%by the "calcStatic" script.
%
%
%Requires the file "stat_SumPartDisp.csv" that summarizes the particle
%dispersion measurements, which gets created by the script "calcPartDisp"
%and stored in the dirStationary folder ("../DataStationary" by default).
%
%Required products, version 24.1:
% - MATLAB
% - Simulink
% - Requirements Toolbox
% - Simulink Real-Time
% - Stateflow
%Necessary files, classes, functions, and scripts:
% - @DryAir
% - @FluBed
% - @implExp
% - @Sinter
% - baffleCalib.m
% - getBCF.m
% - getBIC.m
% - mdlPostLoadFx.m
% - loadGeometry.m
% - getMdotSstatic.m
% - dynamicModel.slx
% - stat_SumPartDisp.csv
%% Set data directories
dirStationary='../DataStationary'; %Path to directory where stationary simulation data should be stored
dirFigures='../Figures'; %Path to directory where figures should be stored
%Create directory if it does not exist
if ~isfolder(dirFigures)
mkdir(dirFigures);
end
%% Load dynamic model and activate fast restart
mdl='dynamicModel';
sys=load_system(mdl);
mdlPostLoadFx;
set_param(mdl,"FastRestart","on");
cleanup=onCleanup(@() set_param(mdl,"FastRestart","off"));
%% Load data
flow=readtable([dirStationary,filesep,'stat_SumPartDisp.csv']);
%Add variables: weir boundary condition and individual baffle correction factors
flow.Phigate=zeros(height(flow),1);
flow.baffleCorr1=ones(height(flow),1);
flow.baffleCorr2=ones(height(flow),1);
flow.baffleCorr3=ones(height(flow),1);
%% Do baffle calibration
baffleCalib;
%Record table for future analysis
writetable(flow,[dirStationary,filesep,'stat_SumPrep.csv']);