-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eda7217
commit bbebf17
Showing
7 changed files
with
340 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
.../gen2_architecture/optimal_sensor_placement/compute_kulfan_parameter_covariance_matrix.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from load_data import df, Data | ||
import aerosandbox as asb | ||
import numpy as np | ||
|
||
kulfans_data = np.stack([ | ||
df[f"kulfan_{side}_{i}"] | ||
for side in [ | ||
"upper", | ||
"lower" | ||
] | ||
for i in range(8) | ||
] + [ | ||
df["kulfan_LE_weight"], | ||
df["kulfan_TE_thickness"] | ||
], axis=1) | ||
|
||
cov_data = np.cov(kulfans_data, rowvar=False) | ||
|
||
airfoil_database_path = asb._asb_root / "geometry" / "airfoil" / "airfoil_database" | ||
|
||
airfoil_database = [ | ||
asb.Airfoil(name=filename.stem).normalize().to_kulfan_airfoil() | ||
for filename in airfoil_database_path.glob("*.dat") | ||
] | ||
|
||
kulfans_database = np.stack([ | ||
np.concatenate([ | ||
airfoil.upper_weights, | ||
airfoil.lower_weights, | ||
np.atleast_1d(airfoil.leading_edge_weight), | ||
np.atleast_1d(airfoil.TE_thickness) | ||
]) | ||
for airfoil in airfoil_database | ||
], axis=0) | ||
|
||
cov_database = np.cov(kulfans_database, rowvar=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.