Description Usage Arguments Value Source Examples
The function morphs the airfoil according to movements of morphing points, locations of constrains and parameters. The morphing technique is based on Gaussian Processes with zero mean.
1 2 3 4 5 6 7 8 9 10 11 | morph_airfoil(
airfoil,
morph_up,
morph_lo,
constr_up,
constr_lo,
par_up,
par_lo,
theta,
theta_constr
)
|
airfoil |
A data frame having three columns: x coordinates of points, y coordinates of the upper points and y coordinates of the lower points. |
morph_up |
A list containing a logical vector indicating selected upper points and a data frame consisting of coordinates of the points. |
morph_lo |
A list containing a logical vector indicating selected lower points and a data frame consisting of coordinates of the points. |
constr_up |
A list of two elements: a logical vector indicating which points are selected as upper constraints and a data frame containing coordinates of the selected points. |
constr_lo |
A list of two elements: a logical vector indicating which points are selected as lower constraints and a data frame containing coordinates of the selected points. |
par_up |
A vector of displacements for the upper morphing points. |
par_lo |
A vector of displacements for the lower morphing points. |
theta |
A vector of covariance radii for the morphing points. |
theta_constr |
A vector of covariance radii for the constraining points. |
The output list contains: a head of the file ($head
),
modified mesh points ($coord
) and a file tail ($tail
).
https://arxiv.org/abs/1311.6190
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 | # Select constraint points
constr_up <- select_constr(rae2822_airfoil, "up", rbind(c(0, 0), c(1, 1)))
constr_lo <- select_constr(rae2822_airfoil, "lo", rbind(c(0, 0), c(1, 1)))
# Select morphing points
x_coord <- seq(0.15, 0.9, len = 5)
morph_up <- select_morphp(rae2822_airfoil, "up", x_coord)
morph_lo <- select_morphp(rae2822_airfoil, "lo", x_coord)
# Set parameters values
par_up <- rep(0.02, len = 5)
par_lo <- rep(0, len = 5)
# Set covariance radii
theta <- c(0.1, 0.1)
theta_constr <- c(0.01, 0.01)
# Create a modified airofil
airfoil_mod <- morph_airfoil(
rae2822_airfoil,
morph_up, morph_lo, constr_up, constr_lo,
par_up, par_lo, theta, theta_constr
)
# Plot the modified airfoil
plot_airfoil(airfoil_mod, morph_up, morph_lo, constr_up, constr_lo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.