import paraBEM from paraBEM import pan3d from paraBEM.mesh import mesh_object mesh = mesh_object.from_OBJ("../mesh/wing_lift.obj") case = pan3d.DirichletDoublet0Case3(mesh.panels, mesh.trailing_edges) case.v_inf = paraBEM.Vector3(10, 0, 0) case.create_wake(length=100, count=2) case.run()
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import paraBEM from paraBEM import pan3d from paraBEM.mesh import mesh_object from paraBEM.utils import check_path # plots the values of the numerical solution as a scatter plot. # running the case mesh = mesh_object.from_OBJ("../mesh/sphere_low_tri.obj") case = pan3d.DirichletDoublet0Case3(mesh.panels) case.v_inf = paraBEM.Vector3(1, 0, 0) case.run() # plotting the analytic solution fig = plt.figure() pot_f = lambda z: z * 3 / 2 pot_n_x, pot_n_y = np.array([[i.center.x, i.potential] for i in case.panels]).T pot_x = np.arange(-1., 1.001, 0.1) pot_y = list(map(pot_f, pot_x)) ax1 = fig.add_subplot(311) ax1.plot(pot_x, pot_y, c=[0, 0, 0], label="Analytisch") ax1.scatter(pot_n_x, pot_n_y, marker="+", label="Panelmethode") ax1.set_xlabel('x') ax1.set_ylabel('Potential') ax1.legend(loc="upper left", fontsize=8)
from paraBEM.mesh import mesh_object from paraBEM.pan3d import DirichletDoublet0Source0Case3 as Case from paraBEM.vtk_export import CaseToVTK mesh = mesh_object.from_OBJ("../mesh/sphere_half.obj") for panel in mesh.panels: panel.set_symmetric() case = Case(mesh.panels) case.run() writer = CaseToVTK(case, "results/symmetric_test") writer.write_panels(data_type="point") writer.write_field([-2, 2, 20], [-2, 2, 20], [-2, 2, 20])
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import paraBEM from paraBEM import pan3d from paraBEM.mesh import mesh_object from paraBEM.utils import check_path # plots the values of the numerical solution as a scatter plot. # running the case mesh = mesh_object.from_OBJ("../mesh/sphere_low_tri.obj") case = pan3d.DirichletDoublet0Case3(mesh.panels) case.v_inf = paraBEM.Vector3(1, 0, 0) case.run() # plotting the analytic solution fig = plt.figure() pot_f = lambda z: z * 3/2 pot_n_x, pot_n_y = np.array([[i.center.x, i.potential] for i in case.panels]).T pot_x = np.arange(-1., 1.001, 0.1) pot_y = list(map(pot_f, pot_x)) ax1 = fig.add_subplot(311) ax1.plot(pot_x, pot_y, c=[0, 0, 0], label="Analytisch") ax1.scatter(pot_n_x, pot_n_y, marker="+", label="Panelmethode") ax1.set_xlabel('x') ax1.set_ylabel('Potential') ax1.legend(loc="upper left", fontsize=8)
import paraBEM from paraBEM import pan3d from paraBEM.mesh import mesh_object mesh = mesh_object.from_OBJ("../mesh/box_minimal.obj") case = pan3d.DirichletDoublet0Case3(mesh.panels) case.v_inf = paraBEM.Vector3(1, 0, 0) a = case.panels[0] b = case.panels[1] print(a.center, " ", a.n) print(b.center, " ", b.n) print(pan3d.doublet_3_0_vsaero(a.center, b))