-
Notifications
You must be signed in to change notification settings - Fork 21
/
main.m
131 lines (63 loc) · 1.48 KB
/
main.m
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
clear all
clc
%% initial values
user_input
%% initializing - with respect to user inputs from previous step
initializer
%% sloid geometry defining
cylinder_geometry
%% velocity calibration
velocity_calibration
%% calculating equlibrium distribution based on each node form initial macroscopic values
feq_calculation
%% initializing f
f=feq;
%% MAIN LOOP
loop_counter = 1;
while Uresidual > Utol || Vresidual > Vtol
%% calculating g
calculating_g
%% collision
collision
%% postcollision values for curved walls, for boundary nodes x_b
if methode==2
flippova
elseif methode==3
mei
elseif methode==4
bozidi
elseif methode==5
yu
end
%% C_D calculation
C_D
%% streaming
streaming
%% velocity calibration
velocity_calibration
%% Velocity and Pressure boundary
He_Zou_pressure_velocity_boundary
f = ftemp;
%% Boundary condition bounce back boundary condition
if methode==1
bounceback
end
%% velocity calibration
velocity_calibration
%% calculating macroscopic velocities
calculating_macroscopic_velocities
%% velocity calibration
velocity_calibration
%% pressure difference calculations
% pressure
%% RECALCULATING f equlibrium distribution based on each node form initial macroscopic values
feq_calculation
%% checking the convergance
convergance
%% animate
animate
%% tecplot format file writing
% file
end % end while loop
%% post processing
post_processing