Exemple #1
0
mEnd2 = mEnd1     # Distance of end of actuator 2 from tail2 root

tMax = 2*np.pi/omega1 * nT

params1 = {'ID':ID1, 'LT':LT1, 'alpha':alpha1, 'origin':origin1, 'dx':dx, 'omega':omega1, 'phi':phi1, 'drivingFunction':drivingFunction, 'E':E, 'A':A1, 'zetaN':zetaN1, 'zetaT':zetaT1, 'moment':moment1, 'mStart':mStart1, 'mEnd':mEnd1}

params2 = {'ID':ID2, 'LT':LT2, 'alpha':alpha2, 'origin':origin2, 'dx':dx, 'omega':omega2, 'phi':phi2, 'drivingFunction':drivingFunction, 'E':E, 'A':A2, 'zetaN':zetaN2, 'zetaT':zetaT2, 'moment':moment2, 'mStart':mStart2, 'mEnd':mEnd2}



f1 = tt.flagella(params1)
f2 = tt.flagella(params2)
structures = [f1, f2]
#structures = [flagella1]

s = tt.swimmer(structures, tMax, dt)
s.numSolve(hydrodynamicCoupling=1, propulsion=1)
s.assemble()
plt.plot(s.t,s.X)
plt.show()
s.plotDisp(DF=4)




###########################################

def plotFrame(i):
    plt.plot(s.x[:,i], s.y[:,i])
    plt.show()
Exemple #2
0
zetaT1 = zetaN1 / 2.0     # Tangential drag coeff, tail 1
zetaN2 = zetaN1           # Tail 2
zetaT2 = zetaT1           # Tail 2

moment1 = 37.37            # Peak bending moment, actuator 1
mStart1 = 200.0            # Distance of start of actuator 1 from tail1 root
mEnd1 = mStart1 + 60.0     # Distance of end of actuator 1 from tail root
moment2 = moment1          # Peak bending moment, actuator 2
mStart2 = 200.0            # Distance of start of actuator 2 from tail2 root
mEnd2 = mStart2 + 60.0     # Distance of end of actuator 2 from tail2 root

params = {'LT1':LT1, 'LT2':LT2, 'theta':theta, 'dx':dx, 'omega1':omega1, 'omega2':omega2, 'dOmegaInit':dOmegaInit, 'nT':nT, 'dt':dt, 'drivingFunction':drivingFunction, 'E':E, 'A1':A1, 'A2':A2, 'zetaN1':zetaN1, 'zetaT1':zetaT1, 'zetaN2':zetaN2, 'zetaT2':zetaT2, 'moment1':moment1, 'mStart1':mStart1, 'mEnd1':mEnd1, 'moment2':moment2, 'mStart2':mStart2, 'mEnd2':mEnd2}


###########################################

# Initialize and process swimmer:

s = tt.swimmer(params)
# s.actuator()
# s.numSolve()
# s.propulsionCalc()
# print(np.mean(s.Ux))
# s.plotDisp(16,1)

if 1:
    plt.plot(s.x[0,:],s.x[1,:])
    plt.axis('equal')
    plt.show()