-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConfigRead.m
More file actions
32 lines (25 loc) · 861 Bytes
/
ConfigRead.m
File metadata and controls
32 lines (25 loc) · 861 Bytes
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
function [env, geo] = ConfigRead(FileName, geo)
% -------------------------------------------------------------------------
% SwanVLM
% Version 6 (EXPORT)
% April 2020, Joan Ignasi Fontova(965420)
% Version 5 (EXPORT)
% April 2009
% Copyright (C) 2008, 2009 Chris Walton (368404)
% ConfigRead.m: Reads enviromental and meshing tabs from input excel file.
% -------------------------------------------------------------------------
% Open user's excel file with xlsread and read the enviroment (second) tab
[num,str]=xlsread(FileName, 2);
% Process numerical data into variables
env.rho = num(1);
env.V = num(2);
env.AlphaMin = num(3);
env.AlphaMax = num(4);
env.AlphaStep = num(5);
env.beta = num(6);
env.CofG = [num(8) num(9) num(10)];
% Repeat for the mesh tab
[num,str]=xlsread(FileName, 3);
geo.chordwisepanels = num(1);
geo.totalpanels = num(2);
end