Is there any way to plot correctly using the ParametricPlot3D
command with one of variable's boundaries defined in function of the other ?
In the example given here the variables are u
and r
.
r
boundaries are set from0.01
tod/2
u
boundaries are set from the lower limit functionx0(r)
and upper limit functioncorda(r)-x0(r)
I noticed a problem on the leading edge of this wing profile present only when using a variable boundary, while if I use a constant boundary limit the wing is plotted correctly.
Any ideas on how to solve this problem? The code is presented below for reference.
c = 1; e = 2; d = 0.35;
(*Distribuição de Corda*)
corda[r_, c_] := c ( -30.04*r^3 + 4.65*r^2 + 0.116*r + 0.01)
(*Distribuição de Espessura*)
naca[r_, e_] := e ( -47.511*r^3 + 13.346*r^2 - 1.3953*r + 0.1511)
x0[r_, c_] := 0.4 corda[r, c]
(*Imagem do Perfil*)
FNaca[u_, r_, c_, e_] :=
(naca[r, e]/0.2) corda[r,c] ( 0.2969 Sqrt[(u + x0[r, c])/corda[r, c]]
- 0.126 (u + x0[r, c])/corda[r, c]
- 0.3516 ((u + x0[r, c])/corda[r, c])^2
+ 0.2843 ((u + x0[r, c])/corda[r, c])^3
- 0.1015 ((u + x0[r, c])/corda[r, c])^4 )
m = 0.04; p = 0.4;
(*Camber Bordo de Ataque*)
ba[u_, r_, c_] := m (u + x0[r, c]) ( 2 p - (u + x0[r, c])/corda[r, c])/p^2
(*Camber Bordo de Fuga*)
bf[u_, r_, c_] :=
m ((corda[r, c] - (u + x0[r, c]))/(1 - p)^2) ( 1 + (u + x0[r, c])/corda[r, c] - 2 p)
PerfilSup[u_, r_, c_, e_] := If[ u + x0[r, c] <= p corda[r, c],
FNaca[u, r, c, e] + ba[u, r, c],
FNaca[u, r, c, e] + bf[u, r, c] ]
PerfilInf[u_, r_, c_, e_] := If[ u + x0[r, c] <= p corda[r, c],
-FNaca[u, r, c, e] + ba[u, r, c],
-FNaca[u, r, c, e] + bf[u, r, c]]
d1[u_, r_, c_, e_] := PerfilInf[u, r, c, e]
f1[u_, r_, c_, e_] := PerfilSup[u, r, c, e]
ParametricPlot3D[{ {d1[u, r, c, e], u, r}, {f1[u, r, c, e], u, r}},
{r, 0.01, d/2}, {u, -x0[r, c], corda[r, c] - x0[r, c] } ]
RegionFunction
... $\endgroup$PlotPoints->100
. If that's not the problem, you will need to provide more detail in the question. $\endgroup$