Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CEJ data for 4D-PTV and LB simulation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
V-5
Multiphase Bioreactors
Sebastian Hofmann
CEJ data for 4D-PTV and LB simulation
Commits
6004e4e5
Commit
6004e4e5
authored
2 years ago
by
Sebastian Hofmann
Browse files
Options
Downloads
Patches
Plain Diff
added dsquare_time_averaged.m for figure 13
parent
1b665898
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
data/code/3.4_sim_distance_velocity_vectors/dQuadratZeitlichGemittelt.m
+105
-0
105 additions, 0 deletions
...sim_distance_velocity_vectors/dQuadratZeitlichGemittelt.m
with
105 additions
and
0 deletions
data/code/3.4_sim_distance_velocity_vectors/dQuadratZeitlichGemittelt.m
0 → 100644
+
105
−
0
View file @
6004e4e5
% ** coded by Christian Weiland **
% ** christian.weiland@tuhh.de **
%
% This script "dsquare_timeaveraged.m" creates data for figure 13.
% It calculates the squared distance between ideal and inertial particles averaged
% over all particles at each time point.
%
% ADDITIONAL INFORMATION
% 1. The input files must conform to the standard output structure of the
% particle data by the option "Moving Probes" of M-Star CFD.
clear
variables
close
all
tic
prompt
=
'Versatz festgelegter Startpositionen (1) oder Winkel über Radius und Höhe (0)?'
;
ANTWORT
=
input
(
prompt
);
% number of particles in resp. direction, which are set in M-Star
numX
=
5
;
numY
=
42
;
numZ
=
25
;
R
=
0.065
;
H
=
0.25
;
disp
(
'Lade Daten ein...'
)
dataidIdeal
=
importdata
(
'probeIdeal.txt'
);
dataidKL
=
importdata
(
'probeKL.txt'
);
dataidGS
=
importdata
(
'probeGS.txt'
);
disp
(
'... fertig mit dem Einladen!'
)
ideal
=
dataidIdeal
.
data
;
KL
=
dataidKL
.
data
;
GS
=
dataidGS
.
data
;
%Partikel-ID startet bei 0, soll bei 1 starten
ideal
(:,
1
)
=
ideal
(:,
1
)
+
1
;
KL
(:,
1
)
=
KL
(:,
1
)
+
1
;
GS
(:,
1
)
=
GS
(:,
1
)
+
1
;
%Sortieren nach ID und Zeit
ideal
=
sortrows
(
ideal
);
KL
=
sortrows
(
KL
);
GS
=
sortrows
(
GS
);
%Programm legt (0,0,0) an den äußersten Punkt, soll aber unten auf der Welle liegen
% -> lineare Verschiebung um halben Durchmesser in x- und z-Richtung
ideal
(:,
3
)
=
ideal
(:,
3
)
-
0.065
;
ideal
(:,
5
)
=
ideal
(:,
5
)
-
0.065
;
KL
(:,
3
)
=
KL
(:,
3
)
-
0.065
;
KL
(:,
5
)
=
KL
(:,
5
)
-
0.065
;
GS
(:,
3
)
=
GS
(:,
3
)
-
0.065
;
GS
(:,
5
)
=
GS
(:,
5
)
-
0.065
;
%Berechnung des Radiusses der Partikel
rIdeal
=
sqrt
(
ideal
(:,
3
)
.^
2
+
ideal
(:,
5
)
.^
2
);
rKL
=
sqrt
(
KL
(:,
3
)
.^
2
+
KL
(:,
5
)
.^
2
);
rGS
=
sqrt
(
GS
(:,
3
)
.^
2
+
GS
(:,
5
)
.^
2
);
%Radius ist der 14. Eintrag
ideal
=
[
ideal
rIdeal
];
KL
=
[
KL
rKL
];
GS
=
[
GS
rGS
];
clear
data
*
schritte
=
find
(
ideal
(:,
1
)
==
1
,
1
,
'last'
);
numPart
=
max
(
ideal
(:,
1
));
zeit
=
ideal
(
1
:
schritte
,
2
)
-
ideal
(
1
,
2
);
dXKL
=
zeros
(
numPart
,
schritte
);
dXGS
=
zeros
(
numPart
,
schritte
);
dYKL
=
zeros
(
numPart
,
schritte
);
dYGS
=
zeros
(
numPart
,
schritte
);
dZKL
=
zeros
(
numPart
,
schritte
);
dZGS
=
zeros
(
numPart
,
schritte
);
dKL
=
zeros
(
numPart
,
schritte
);
dGS
=
zeros
(
numPart
,
schritte
);
for
m
=
1
:
numPart
for
n
=
1
:
schritte
dXKL
(
m
,
n
)
=
KL
(
n
+
(
m
-
1
)
*
schritte
,
3
)
-
ideal
(
n
+
(
m
-
1
)
*
schritte
,
3
);
dXGS
(
m
,
n
)
=
GS
(
n
+
(
m
-
1
)
*
schritte
,
3
)
-
ideal
(
n
+
(
m
-
1
)
*
schritte
,
3
);
dYKL
(
m
,
n
)
=
KL
(
n
+
(
m
-
1
)
*
schritte
,
4
)
-
ideal
(
n
+
(
m
-
1
)
*
schritte
,
4
);
dYGS
(
m
,
n
)
=
GS
(
n
+
(
m
-
1
)
*
schritte
,
4
)
-
ideal
(
n
+
(
m
-
1
)
*
schritte
,
4
);
dZKL
(
m
,
n
)
=
KL
(
n
+
(
m
-
1
)
*
schritte
,
5
)
-
ideal
(
n
+
(
m
-
1
)
*
schritte
,
5
);
dZGS
(
m
,
n
)
=
GS
(
n
+
(
m
-
1
)
*
schritte
,
5
)
-
ideal
(
n
+
(
m
-
1
)
*
schritte
,
5
);
dKL
(
m
,
n
)
=
norm
([
dXKL
(
m
,
n
)
dYKL
(
m
,
n
)
dZKL
(
m
,
n
)]
'
,
2
);
dGS
(
m
,
n
)
=
norm
([
dXGS
(
m
,
n
)
dYGS
(
m
,
n
)
dZGS
(
m
,
n
)]
'
,
2
);
end
end
meanGS
=
mean
(
dGS
.*
dGS
);
meanKL
=
mean
(
dKL
.*
dKL
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment