Ejemplo n.º 1
0
from paraBEM.pan3d import doublet_3_0_n0, doublet_3_0_sphere, doublet_3_0_vsaero
from paraBEM.utils import check_path

pnt1 = paraBEM.PanelVector3(-0.5, -0.5, 0)
pnt2 = paraBEM.PanelVector3(0.5, -0.5, 0)
pnt3 = paraBEM.PanelVector3(0.5, 0.5, 0)
pnt4 = paraBEM.PanelVector3(-0.5, 0.5, 0)

source = paraBEM.Panel3([pnt1, pnt2, pnt3, pnt4])

x = np.linspace(-0, 5, 500)
y = []
for xi in x:
    target = paraBEM.PanelVector3(xi, 0., 0.1)
    panel_infl = doublet_3_0_vsaero(target, source)
    point_infl = doublet_3_0_n0(target, source)
    y.append([panel_infl, point_infl, abs(panel_infl - point_infl)])
y = list(zip(*y))

plt.figure(figsize=(8, 3))
plt.gcf().subplots_adjust(bottom=0.15)
plt.ylabel("Einfluss")
plt.xlabel("x")
plt.plot(x, y[0], label=u"Exakte Lösung")
plt.plot(x, y[1], label=u"Näherungslösung")
plt.ylim(-0.1, 0.6)
plt.xlim(0, None)
plt.legend()
plt.grid(True)
plt.savefig(check_path("results/3d/far_vs_near_doublet.png"))
plt.close()
Ejemplo n.º 2
0
def infl_far(point):
    return mue_mid * doublet_3_0_n0(paraBEM.Vector3(*point), mid_pan)
Ejemplo n.º 3
0
def infl_far(point):
    return mue_mid * doublet_3_0_n0(paraBEM.Vector3(*point), mid_pan)
Ejemplo n.º 4
0
from paraBEM.pan3d import doublet_3_0_n0, doublet_3_0_sphere, doublet_3_0_vsaero
from paraBEM.utils import check_path

pnt1 = paraBEM.PanelVector3(-0.5, -0.5, 0)
pnt2 = paraBEM.PanelVector3(0.5, -0.5, 0)
pnt3 = paraBEM.PanelVector3(0.5, 0.5, 0)
pnt4 = paraBEM.PanelVector3(-0.5, 0.5, 0)

source = paraBEM.Panel3([pnt1, pnt2, pnt3, pnt4])

x = np.linspace(-0, 5, 500)
y = []
for xi in x:
    target = paraBEM.PanelVector3(xi, 0., 0.1)
    panel_infl = doublet_3_0_vsaero(target, source)
    point_infl = doublet_3_0_n0(target, source)
    y.append([panel_infl, point_infl, abs(panel_infl - point_infl)])
y = list(zip(*y))


plt.figure(figsize=(8,3))
plt.gcf().subplots_adjust(bottom=0.15)
plt.ylabel("Einfluss")
plt.xlabel("x")
plt.plot(x, y[0], label=u"Exakte Lösung")
plt.plot(x, y[1], label=u"Näherungslösung")
plt.ylim(-0.1, 0.6)
plt.xlim(0, None)
plt.legend()
plt.grid(True)
plt.savefig(check_path("results/3d/far_vs_near_doublet.png"))
Ejemplo n.º 5
0
pnt1 = paraBEM.PanelVector3(-0.5, -0.5, 0)
pnt2 = paraBEM.PanelVector3(0.5, -0.5, 0)
pnt3 = paraBEM.PanelVector3(0.5, 0.5, 0)
pnt4 = paraBEM.PanelVector3(-0.5, 0.5, 0)

source = paraBEM.Panel3([pnt1, pnt2, pnt3, pnt4])

fig = plt.figure()

x = np.arange(-4, 4, 0.01)
y = []
for xi in x:
    target1 = paraBEM.PanelVector3(xi, 0, 0.0001)
    target2 = paraBEM.PanelVector3(xi, 0, 0.5)
    target3 = paraBEM.PanelVector3(xi, 0, 1.)
    val1 = doublet_3_0_n0(target1, source)
    val2 = doublet_3_0_n0(target2, source)
    val3 = doublet_3_0_n0(target3, source)
    y.append([val1, val2, val3])

ax1 = fig.add_subplot(131)
axes = fig.gca().set_ylim([-2, 5])
ax1.plot(x, y)

y = []
for xi in x:
    target1 = paraBEM.Vector3(0, xi, 0.0001)
    target2 = paraBEM.Vector3(0, xi, 0.5)
    target3 = paraBEM.Vector3(0, xi, 1)
    val1 = doublet_3_0_n0(target1, source)
    val2 = doublet_3_0_n0(target2, source)