Beispiel #1
0
import numpy
import paraBEM
from paraBEM.pan3d import vortex_3_0_v
from paraBEM.vtk_export import VtkWriter
from paraBEM.utils import check_path


v1 = paraBEM.Vector3(-1, 0, 0)
v2 = paraBEM.Vector3(1, 0, 0)

n = 80

a = numpy.linspace(-10, 10, n).tolist()
b = [paraBEM.Vector3(i, j, k) for i in a for j in a for k in a]

vel = [vortex_3_0_v(v1, v2, i) for i in b]

writer = VtkWriter()
with open(check_path("results/vortex_field.vtk"), "w") as _file:
    writer.structed_grid(_file, "vortex", [n, n, n])
    writer.points(_file, b)
    writer.data(_file, vel, name="velocity", _type="VECTORS", data_type="POINT_DATA")
Beispiel #2
0
import numpy
import paraBEM
from paraBEM.pan3d import vortex_3_0_v
from paraBEM.vtk_export import VtkWriter
from paraBEM.utils import check_path

v1 = paraBEM.Vector3(-1, 0, 0)
v2 = paraBEM.Vector3(1, 0, 0)

n = 80

a = numpy.linspace(-10, 10, n).tolist()
b = [paraBEM.Vector3(i, j, k) for i in a for j in a for k in a]

vel = [vortex_3_0_v(v1, v2, i) for i in b]

writer = VtkWriter()
with open(check_path("results/vortex_field.vtk"), "w") as _file:
    writer.structed_grid(_file, "vortex", [n, n, n])
    writer.points(_file, b)
    writer.data(_file,
                vel,
                name="velocity",
                _type="VECTORS",
                data_type="POINT_DATA")
import paraBEM
from paraBEM.pan3d import doublet_3_0_vsaero_v, vortex_3_0_v


v1 = paraBEM.PanelVector3(-0.5, -0.5, 0)
v2 = paraBEM.PanelVector3(0.5, -0.5, 0)
v3 = paraBEM.PanelVector3(0.5, 0.5, 0)
v4 = paraBEM.PanelVector3(-0.5,  0.5, 0)

source = paraBEM.Panel3([v1, v2, v3, v4])
targets = [paraBEM.Vector3([0, 0, 0])]

for target in targets:
    print(doublet_3_0_vsaero_v(target, source))
    vortex_ring = (vortex_3_0_v(target, v2, v3),
                   vortex_3_0_v(target, v3, v4),
                   vortex_3_0_v(target, v4, v1),
                   vortex_3_0_v(target, v1, v2))
    print(vortex_ring)
Beispiel #4
0
import paraBEM
from paraBEM.pan3d import doublet_3_0_vsaero_v, vortex_3_0_v

v1 = paraBEM.PanelVector3(-0.5, -0.5, 0)
v2 = paraBEM.PanelVector3(0.5, -0.5, 0)
v3 = paraBEM.PanelVector3(0.5, 0.5, 0)
v4 = paraBEM.PanelVector3(-0.5, 0.5, 0)

source = paraBEM.Panel3([v1, v2, v3, v4])
targets = [paraBEM.Vector3([0, 0, 0])]

for target in targets:
    print(doublet_3_0_vsaero_v(target, source))
    vortex_ring = (vortex_3_0_v(target, v2, v3), vortex_3_0_v(target, v3, v4),
                   vortex_3_0_v(target, v4, v1), vortex_3_0_v(target, v1, v2))
    print(vortex_ring)