Beispiel #1
0
    sph1 = mStr.sphereStr(slabPosX[i],
                          slabPosY[i],
                          slabSz[2] + sphereR,
                          sphereR,
                          sphereSpeed,
                          xyres,
                          1.0,
                          1,
                          shellspacing=0.5)
    viscoStruct.addStr(sph1)

# telo kruhu
for i in range(-numCircles, numCircles):
    circElevation = slabSz[2] + sphereR + i * circDist
    for j in range(-numCircles, numCircles):
        circ = mStr.MicroStr(circle(circR + j * circDist, circElevation))
        viscoStruct.addStr(circ)

# rozdeli 45-405 stupnov na 3 casti (4 okrajove body)
vertsRay = linspace(0, 2 * pi, numRays + 1)
slabRayPosX = cos(vertsRay) * circR
slabRayPosY = sin(vertsRay) * circR

# stlpiky pod zaciatkom a koncom luca ukoncene gulickou
for i in range(numRays):
    sphRay1 = mStr.sphereStr(slabRayPosX[i],
                             slabRayPosY[i],
                             slabSz[2] + sphereR,
                             sphereRayR,
                             sphereSpeed,
                             xyres,
slabPosY = sin(verts) * circR
slab0 = mStr.slabStr([0.2, 0.2, 0.2], [0, 1, 2], [xyres, 0.2], slabSpeed)
viscoStruct = slab0
for i in range(numSlabs):
    #stlpik pod kruhom ukonceny gulickou
    slab1 = mStr.slabStr([slabSz[0], slabSz[1], slabSz[2] + sphereR/3],[0, 1, 2], [xyres, 0.2], slabSpeed)
    slab1.shift([slabPosX[i]-slabSz[0]/2, slabPosY[i]-slabSz[1]/2, 0])
    viscoStruct.addStr(slab1)
    sph1 = mStr.sphereStr(slabPosX[i], slabPosY[i], slabSz[2]+sphereR, sphereR, sphereSpeed, xyres, 1.0, 1, shellspacing=0.5)
    viscoStruct.addStr(sph1)

# telo kruhu
for i in range(-numCircles, numCircles):
    circElevation = slabSz[2] + sphereR + i*circDist
    for j in range(-numCircles, numCircles):
        circ = mStr.MicroStr(circle(circR + j*circDist, circElevation))
        viscoStruct.addStr(circ)

# rozdeli 45-405 stupnov na 3 casti (4 okrajove body)
vertsRay = linspace(0, 2*pi, numRays+1)
slabRayPosX = cos(vertsRay) * circR
slabRayPosY = sin(vertsRay) * circR

 # stlpiky pod zaciatkom a koncom luca ukoncene gulickou
for i in range(numRays):
    sphRay1 = mStr.sphereStr(slabRayPosX[i], slabRayPosY[i], slabSz[2]+sphereR, sphereRayR, sphereSpeed, xyres, 1.0, 1, shellspacing=0.5)
    viscoStruct.addStr(sphRay1)
   
# luce az nakoniec lebo su tenke
for i in range(numRays):
    P1 = [slabRayPosX[i], slabRayPosY[i], slabSz[2] + sphereR]
Beispiel #3
0
slab1.shift([-slabSz[0], -slabSz[1] / 2, 0])
viscoStruct = slab1

# na stlpec ulozi rozsirenie - manzetu
slabExt = mStr.slabStr(slabExtSz, [0, 1, 2], [xyres, 0.5], slabSpeed)
slabExt.shift([-(slabSz[0] + slabSzDifX / 2), -slabExtSz[1] / 2, slabSz[2]])
viscoStruct.addStr(slabExt)

# skopiruje stlpec aj s rozsirenim do druhehe a posinie ho o 2 * lineLength
slab2 = deepcopy(viscoStruct)
slab2.shift([(lineLength) * 2 + slabSz[0], 0, 0])
viscoStruct.addStr(slab2)

# vyutvori ciaru ktorej prva polovica bude usecka a druha sinusovka
sinLine = halfSinLine()  #sinusLine()
line = mStr.MicroStr(sinLine)
viscoStruct.addStr(line)

# v polovici ciary vytvori gulu
sph = mStr.sphereStr(lineLength,
                     0,
                     lineElev,
                     sphereR,
                     sphereSpeed,
                     xyres,
                     1.0,
                     1,
                     shellspacing=0.5)

viscoStruct.addStr(sph)
viscoStruct.plot(1, markerscalef=0.1)
Beispiel #4
0
    x = concatenate((x1[0:-1], x2[1:]))
    y = concatenate((y1[0:-1], y2[1:]))
    z = zeros_like(x) + lineElev

    sinLine = zeros((len(x), 5))
    sinLine[:, 0] = x
    sinLine[:, 1] = y
    sinLine[:, 2] = z
    sinLine[:, 3] = 1
    sinLine[-1, 3:5] = [0, linespeed]

    return sinLine


# prazdna struktura
viscoStruct = mStr.MicroStr(zeros((0, 5)))

# origin
origin = mStr.MicroStr(circle(0.1, 0))
origin.shift([lineLength, 0, 0])
viscoStruct.addStr(origin)

# vytvori stlpec + hlavu a posunieho tak, aby (0,0) bolo v strede celnej steny
slab1 = mStr.slabStr(slabSz, [0, 1, 2], [xyres, 0.5], slabSpeed)
slab1Ext = mStr.slabStr(slabExtSz, [0, 1, 2], [xyres, 0.5], slabSpeed)
slab1Ext.shift([-slabSzDifX / 2, 0, slabSz[2]])
slab1.addStr(slab1Ext)
slab1.shift([-slabSz[0], -slabSz[1] / 2, 0])
viscoStruct.addStr(slab1)

# skopiruje stlpec aj s rozsirenim do druheho a posinie ho o 2 * lineLength