Пример #1
0
    def Geometry(self):
        theta = 2*npy.pi/Z #theta=theta2 +theta3
        
        R = O.Translation(vm.point2D((self.L8*npy.cos(alphaR),-self.L8*npy.sin(alphaR))))
        
        K = R.Translation(vm.point2D((0,DF/2)))
        H = K.Rotation(R,theta2)
        M = K.Rotation(R,theta2+theta3)
        a1 = vm.Arc2D(K,H,M)
        
        J1 = R.Translation(vm.Point2D((0,DI/2)))
        J=J1.Rotation(R,(theta2-theta1)/2)
        #est ce un probleme de ne pas controler directement la pente du créneau ? (on ne se sert pas de alphaJ)
        #sinon on pourrait remplacer les deux lignes précédentes par:J=K.Translation(vm.point2D((-self.L9*npy.sin(alphaJ),-self.L9*npy.cos(alphaJ))))
        #Dans ce cas il faudrait peut être paramétrer H de la même façon
        I=J.Rotation(R,theta1)
        
        l1=primitives2D.RoundedLineSegments2D([K,J,I,H],{'''je ne sais pas trop quoi mettre ici'''})
        
        L=[a1,l1]
        for i in range(Z-1):
            thetar=(i+1)*theta
            L.append(a1.Rotation(R,thetar,True))
            L.append(l1.Rotation(R,thetar,True))

        c1=vm.Contour2D(L)
        c1.MPLPlot()
Пример #2
0
e = 0.030
r4 = 0.015

pc = vm.Point2D((0, 0))

p1 = vm.Point2D((0, r2))
p2 = p1.Rotation(pc, 0.5 * theta1)
p3 = p1.Rotation(pc, theta1)
a1 = vm.Arc2D(p1, p2, p3)

p4 = vm.Point2D((0, r1))
p4.Rotation(pc, theta1 + theta3, False)
p5 = p4.Rotation(pc, theta2)
p6 = p1.Rotation(pc, theta)

l1 = primitives2D.RoundedLineSegments2D([p3, p4, p5, p6], {1: r3, 2: r3})

#l1=primitives2D.RoundedLines2D([p1,p2,p3,p4],{0:0.01,2:0.01})
#l2=vm.Circle2D(p5,0.01)
L = [a1, l1]
for i in range(Z - 1):
    thetar = (i + 1) * theta
    L.append(a1.Rotation(pc, thetar, True))
    L.append(l1.Rotation(pc, thetar, True))
#p7=vm.Point2D((0,r4))
l2 = vm.Circle2D(pc, r4)

c1 = vm.Contour2D(L)
c2 = vm.Contour2D([l2])

po = vm.Point3D((0, 0, 0))
Пример #3
0
diameter = 0.005
dp = 1e5
cp_thickness = 0.001
thermal_conductivity = 237

p0 = vm.Point2D((0, 0, 0))
p1 = vm.Point2D((1, 0, 0))
p2 = vm.Point2D((2, 0, 0))
p3 = vm.Point2D((2, 1, 0))
p4 = vm.Point2D((2, 2, 0))
p5 = vm.Point2D((1, 2, 0))
p6 = vm.Point2D((0, 2, 0))
points = [p0, p1, p2, p3, p4, p5, p6]

rls = vmp2D.RoundedLineSegments2D(points, {2: 0.5, 4: 0.05}, adapt_radius=True)
pipes = [
    hy.pipes.PipesFromVolmdlrPrimitives(p, diameter)
    for p in rls.basis_primitives
]
points = [p.points[0] for p in rls.basis_primitives
          ] + [rls.basis_primitives[-1].points[-1]]

circuit = hy.Circuit2D(points, pipes, water)

result = circuit.SolveFluidics("pressure", {points[0]: dp, points[-1]: 0})
result.circuit.Draw()
result.DisplaySolution()
result.DisplaySolution(position=True)

cooling_plate_parts = []
Пример #4
0
p0 = vm.Point2D((0.2, -0.5))

p1 = vm.Point2D((0, 0))
p2 = vm.Point2D((0.5, 0))
p3 = vm.Point2D((1, 0))
p4 = vm.Point2D((1.5, 0))

p5 = vm.Point2D((2, 0.4))
p6 = vm.Point2D((2.5, 0.4))
p7 = vm.Point2D((3, 0.4))
p8 = vm.Point2D((3.5, 0.2))

rl2D_o = primitives2D.RoundedLineSegments2D(
    [p0, p1, p2, p3, p4, p5, p6, p7, p8],
    {},
    #                                        {2:0.3, 4:0.1, 3:0.1},
    closed=False,
    adapt_radius=True)

rl2D_o2 = rl2D_o.OffsetLines([2], -1.25)
f, ax = rl2D_o.MPLPlot()
rl2D_o2.MPLPlot(ax=ax, style='r-o')

rl2D_c = primitives2D.RoundedLineSegments2D(
    [p0, p1, p2, p3, p4, p5, p6, p7, p8],
    {},
    #                                        {0:1, 1:0.05, 2:0.05, 3:1},
    closed=True,
    adapt_radius=True)
rl2D_c2 = rl2D_c.OffsetLines([2], 0.2)
f2, ax2 = rl2D_c.MPLPlot()
Пример #5
0
height = 0.080
screw_holes_diameter = 0.006
screw_holes_clearance = 0.003
n_screws = 25

p1 = vm.Point2D((0, 0))
p2 = vm.Point2D((0.3, 0))
p3 = vm.Point2D((0.33, 0.22))
p4 = vm.Point2D((0.2, 0.08))
p5 = vm.Point2D((0.16, 0.18))
p6 = vm.Point2D((0.05, 0.20))

inner_rl = primitives2D.RoundedLineSegments2D([p1, p2, p3, p4, p5, p6], {
    0: 0.01,
    1: 0.01,
    2: 0.015,
    3: 0.010,
    4: 0.012,
    5: 0.008
}, True)
outer_rl = inner_rl.Offset(-thickness)
inner_contour = vm.Contour2D([inner_rl])
outer_contour = vm.Contour2D([outer_rl])

f, a = inner_contour.MPLPlot()
outer_contour.MPLPlot(a)

sides = primitives3D.ExtrudedProfile(vm.o3D, vm.x3D, vm.y3D, outer_contour,
                                     [inner_contour],
                                     (height - 2 * thickness) * vm.z3D,
                                     'sides')
bottom = primitives3D.ExtrudedProfile(vm.o3D, vm.x3D, vm.y3D, outer_contour,
Пример #6
0
#import numpy as npy
import volmdlr as vm
import volmdlr.primitives3D as primitives3D
import volmdlr.primitives2D as primitives2D
#import math

p1=vm.Point2D((0, 0))
p2=vm.Point2D((0.1, 0.))
p3=vm.Point2D((0.1, 0.2))
p4=vm.Point2D((0, 0.1))
p5=vm.Point2D((-0.01, 0.05))

#p6=vm.Point2D((0.1,0.3))

l1=primitives2D.RoundedLineSegments2D([p1, p2, p3, p4], {2: 0.01}, False)
l2=vm.Arc2D(p4, p5, p1)
c1=vm.Contour2D([l1, l2])
c2=c1.Rotation(vm.Point2D((0,0)),npy.pi,True)
c1.MPLPlot()
c2.MPLPlot()
c3=vm.Contour2D([c1, c2])
c3.MPLPlot()

po = vm.Point3D((0, 0, 0))
xp = vm.Vector3D((1, 0, 0))
yp = vm.Vector3D((0, 1, 0))


profile = primitives3D.ExtrudedProfile(po, xp, yp, c1, [], vm.Vector3D((0, 0.1, 0.2)))
Пример #7
0
import volmdlr.primitives2D as primitives2D

p1 = vm.Point2D((0, 0))
p2 = vm.Point2D((0.1, 0.))
p3 = vm.Point2D((0.1, 0.2))
p4 = vm.Point2D((0.05, 0.1))
p5 = vm.Point2D((0., 0.21))
p6 = vm.Point2D((0.05, 0.05))

p7 = vm.Point2D((0.06, 0.05))
p8 = vm.Point2D((0.04, 0.07))

radius = {0: 0.01, 2: 0.01, 3: 0.015}

outer_profile = primitives2D.RoundedLineSegments2D([p1, p2, p3, p4, p5],
                                                   radius,
                                                   closed=True)
#hole = vm.Circle2D(p6, 0.01)
#inner_profile = primitives2D.RoundedLineSegments2D([p6, p7, p8], {0: }, closed = True)
l1 = vm.LineSegment2D(p6, p7)
l2 = vm.LineSegment2D(p7, p8)
l3 = vm.LineSegment2D(p8, p6)
c2 = vm.Contour2D([l1, l2, l3])

c1 = vm.Contour2D([outer_profile])
#c2 = vm.Contour2D([inner_profile])

po = vm.Point3D((0, 0, 0))
xp = vm.Vector3D((1, 0, 0))
yp = vm.Vector3D((0, 1, 0))
f, a = c1.MPLPlot()