-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscaling.py
199 lines (170 loc) · 6.55 KB
/
scaling.py
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 2 20:50:10 2023
Two locations on Mars are investigated and compared to sea-level standard (SLS)
conditions on Earth:
1. Viking 1 at 22.27° N, 312.05° E and z = -3,600 m (altitude above aeroid)
2. Arsia North at -3.062° N, 236.07° E and z = 4,550 m (altitude above aeroid)
Data is extracted from the Mars Climate Database (MCD) v6.1
https://www-mars.lmd.jussieu.fr/mcd_python/
Since we are interested in local average data we set time coordinates
Ls=all and Lt=all, and set averaging=diurnal. This will generate 2d-data files
with identical columns. By extracting e.g. the first column we have the
variation of the diurnal (daily) average of the solar longitudes.
Each column of the 2d-data files contains 25 data points, for solar longitudes
0 to 360. We use data at 10 m above ground level.
The results of the MCD online requests for the two locations are collected in
a separate data file, where also the averaging over the solar longitudes is
performed. The resulting averages are used as input in the Python script below.
Wikipedia: Sea-level standard (SLS) conditions.
https://en.wikipedia.org/wiki/Standard_sea-level_conditions
https://www.eea.europa.eu/publications/europes-changing-climate-hazards-1/wind/wind-mean-wind-speed
@author: Roland Schmehl
"""
import numpy as np
import sys
# Sea-level standard (SLS) conditions from https://en.wikipedia.org/wiki/Standard_sea-level_conditions
earth_sls = {
"name": "Earth SLS",
"density": 1.225, # kg/m^3 @SLS
"viscosity": 1.8e-5, # Pa*s @SLS
"gravity": 9.8, # m/s^2 @SLS
"speedofsound": 343, # m/s @SLS and T = 293.15 K (= 20 °C)
"windspeed_low": 3, # m/s @10 m annual mean for European land area
"windspeed_high": 10, # m/s @100 m annual mean for North Sea region
}
viking_1 = {
"name": "Viking_1",
"density": 0.020, # kg/m^3 Williams (2020)
"viscosity": 1.09e-5, # Pa*s
"gravity": 3.7, # m/s^2
"speedofsound": 233, # m/s
"windspeed_low": 5, # m/s @10 m
"windspeed_high": 7, # m/s @100 m
"k_vw": np.array([2, 3]),
}
arsia_north = {
"name": "Arsia_North",
"density": 0.010, # kg/m^3 MCD
"viscosity": 1.04e-5, # Pa*s
"gravity": 3.7, # m/s^2
"speedofsound": 228, # m/s
"windspeed_low": 15, # m/s @10 m
"windspeed_high": 18, # m/s @100 m
"k_vw": np.array([2, 3]),
}
print("Table 6.2: Scaling relations...")
print()
print(" Viking_1 Arsia_North")
ref = earth_sls["density"]
print("K_rho =", "{:6.4f}".format(viking_1["density"]/ref)," ", \
"{:6.4f}".format(arsia_north["density"]/ref))
ref = earth_sls["viscosity"]
print("K_mu =", "{:5.3f}".format(viking_1["viscosity"]/ref)," ", \
"{:5.3f}".format(arsia_north["viscosity"]/ref))
ref = earth_sls["gravity"]
print("K_g =", "{:5.3f}".format(viking_1["gravity"]/ref)," ", \
"{:5.3f}".format(arsia_north["gravity"]/ref))
ref = earth_sls["speedofsound"]
print("K_a =", "{:5.3f}".format(viking_1["speedofsound"]/ref)," ", \
"{:5.3f}".format(arsia_north["speedofsound"]/ref))
ref = earth_sls["windspeed_low"]
print("K_vw =", "{:5.3f}".format(viking_1["windspeed_low"]/ref)," ", \
"{:5.3f}".format(arsia_north["windspeed_low"]/ref), " (@10 m & low vw@Earth)")
ref = earth_sls["windspeed_high"]
print("K_vw =", "{:5.3f}".format(viking_1["windspeed_high"]/ref)," ", \
"{:5.3f}".format(arsia_north["windspeed_high"]/ref), " (@100 m & high vw@Earth)")
for site in [viking_1, arsia_north]:
name = site["name"]
k_rho = site["density"]/earth_sls["density"]
k_mu = site["viscosity"]/earth_sls["viscosity"]
k_g = site["gravity"]/earth_sls["gravity"]
k_a = site["speedofsound"]/earth_sls["speedofsound"]
k_vw = site["k_vw"]
print()
print("Table 6.3:", name)
print("K_rho =", "{:6.4f}".format(k_rho))
# Scaling factor wind speed (preset)
sys.stdout.write("K_vw = ")
for k in k_vw:
sys.stdout.write("{:<10.0f}".format(k))
print("(preset, i.e. not from above)")
# Scaling factor planform area
k_s = 1/(k_rho*k_vw**3)
sys.stdout.write("K_S = ")
for k in k_s:
sys.stdout.write("{:<10.1f}".format(k))
print()
# Scaling factor planform span
k_b = 1/np.sqrt(k_rho*k_vw**3)
sys.stdout.write("K_b = ")
for k in k_b:
sys.stdout.write("{:<10.2f}".format(k))
print()
# Scaling factor tether force
k_f = 1/k_vw
sys.stdout.write("K_F = ")
for k in k_f:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor tether diameter
k_d = 1/np.sqrt(k_vw)
sys.stdout.write("K_d = ")
for k in k_d:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor membrane thickness
k_t = np.sqrt(k_rho*k_vw)
sys.stdout.write("K_t = ")
for k in k_t:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor kite mass
k_m = 1/np.sqrt(k_rho*k_vw**5)
sys.stdout.write("K_m = ")
for k in k_m:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor gravitational force
k_fg = np.sqrt(k_g**2/(k_rho*k_vw**5))
sys.stdout.write("K_Fg = ")
for k in k_fg:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor launching easiness
k_nu = np.sqrt(k_rho*k_vw**3/k_g**2)
sys.stdout.write("K_nu = ")
for k in k_nu:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor gravitation material strain
k_sigg = np.sqrt(k_g**2/(k_rho*k_vw**3))
sys.stdout.write("K_sigg = ")
for k in k_sigg:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor Mach number
k_ma = k_vw/k_a
sys.stdout.write("K_Ma = ")
for k in k_ma:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor Reynolds number
k_re = np.sqrt(k_rho/(k_vw*k_mu**2))
sys.stdout.write("K_Re = ")
for k in k_re:
sys.stdout.write("{:<10.3f}".format(k))
print()
# Scaling factor turning performance
k_turn = k_vw**2
sys.stdout.write("K_turn = ")
for k in k_turn:
sys.stdout.write("{:<10.0f}".format(k))
print()
# Turning gravitational importance
eps_g = k_sigg
sys.stdout.write("eps_g = ")
for e in eps_g:
sys.stdout.write("{:<10.3f}".format(e))
print()