Example #1
0
    f2 = np.zeros((f.M,f.N))
    fb1 = np.zeros((f.Q,1))
    fb2 = np.zeros((f.Q,1))

    #print fb1  
    #move target points for the plate (for this example the plate oscillates)

    b1t, b2t = moveIB.moveIB(b1t,b2t,f.Q)

    #calculate forces from the boundary being applied to the fluid 

    fb1, fb2 = t_f.target_force(b1,b2,b1t,b2t,fb1,fb2,f.stiff,f.Q)
    
    #spread the force to the fluid 
    
    f1, f2 = fspread.forcespread(b1,b2,fb1,fb2,f1,f2,f.Q)
    #print fb1
    #print fb2
    # Now solve for the new velocity and pressure 
    
    #ftest.force_test(f1,f2,fb1,fb2)

    u,v,press = fluidsolve.fluidsolve(a,b,c,d,f1,f2,u,v,uft,vft,w1,w2,pft,f.time,press)

    #output the data 



    # Move boundary at the local fluid velocity

    b1, b2 = mv_b.move_boundary(b1,b2,f.Q,u,v)
Example #2
0
    #print('force1:' + str(force1))
    b1[i,0] = (i)*f.ds
    b2[i,0] = (i)*f.ds
#print(force1)
#plt.plot(force1)
#plt.show()
#print(sum(force1))

#testing for negative positive terms amoung other things 
#countneg = 0
#countpos =0
#count = 0
#for i in range(Q): 
#    if force1[i,0] < 0:
#        countneg = countneg +1
#    if force1[i,0] > 0:
#        countpos = countpos +1
#    count = count + force1[i,0]
#    print force1[i,0]
#    print count 

#print countpos
#print countneg
f1,f2 = fspread.forcespread(b1,b2,force1,force2,f1,f2,Q)

force_test(f1,f2,force1,force2,Q)




Example #3
0
    f2 = np.zeros((f.M, f.N))
    fb1 = np.zeros((f.Q, 1))
    fb2 = np.zeros((f.Q, 1))

    #print fb1
    #move target points for the plate (for this example the plate oscillates)

    b1t, b2t = moveIB.moveIB(b1t, b2t, f.Q)

    #calculate forces from the boundary being applied to the fluid

    fb1, fb2 = t_f.target_force(b1, b2, b1t, b2t, fb1, fb2, f.stiff, f.Q)

    #spread the force to the fluid

    f1, f2 = fspread.forcespread(b1, b2, fb1, fb2, f1, f2, f.Q)
    #print fb1
    #print fb2
    # Now solve for the new velocity and pressure

    #ftest.force_test(f1,f2,fb1,fb2)

    u, v, press = fluidsolve.fluidsolve(a, b, c, d, f1, f2, u, v, uft, vft, w1,
                                        w2, pft, f.time, press)

    #output the data

    # Move boundary at the local fluid velocity

    b1, b2 = mv_b.move_boundary(b1, b2, f.Q, u, v)
    #print b1, b2