예제 #1
0
plt.hold(True)
plt.plot(xs,np.real(pbarPlot),label='real part')
plt.plot(xs,np.imag(pbarPlot),label='imaginary part')
plt.legend()
plt.xlabel('Non-dimensional chord position, x/c')
plt.ylabel('Non-dimensional pressure differential, p')
plt.title('Chordwise Unsteady Pressure Differential')
plt.grid(True)
plt.hold(False)


import cProfile
#cProfile.run('model.calcAIC(M,kr,b,symxz=True)')
#cProfile.run('calcAIC(M,kr,b,delta_x_vec,sweep_vec,l_vec,dihedral_vec,\
#    Xr_vec,Xi_vec,Xc_vec,Xo_vec,symxz=True)',sort='tottime')
'''
# CASE 1:
# Apply the case load
model.resetPointLoads()
tipLoad = np.array([10000.,0.,0.,0.,0.,0.])
F = {80:tipLoad}
model.applyLoads(1,F=F)
# Run the analysis
model.staticAnalysis(1)
model.plotDeformedModel(figName='V8 Case 1',numXSects=8,contLim=[-4.0e6,4.0e6],\
    warpScale=100,displScale=10,contour='sig_33')
'''
'''
U_vec = np.linspace(1,30,30)
kr_vec = np.array([.001,.01,.1,.5,2.5,15.,35.])*10
M_vec = [0.,0.,0.,0.,0.,0.,0.]
예제 #2
0
plt.figure(2)
plt.hold(True)
plt.plot(xs, np.real(pbarPlot), label='real part')
plt.plot(xs, np.imag(pbarPlot), label='imaginary part')
plt.legend()
plt.xlabel('Non-dimensional chord position, x/c')
plt.ylabel('Non-dimensional pressure differential, p')
plt.title('Chordwise Unsteady Pressure Differential')
plt.grid(True)
plt.hold(False)

import cProfile
#cProfile.run('model.calcAIC(M,kr,b,symxz=True)')
#cProfile.run('calcAIC(M,kr,b,delta_x_vec,sweep_vec,l_vec,dihedral_vec,\
#    Xr_vec,Xi_vec,Xc_vec,Xo_vec,symxz=True)',sort='tottime')
'''
# CASE 1:
# Apply the case load
model.resetPointLoads()
tipLoad = np.array([10000.,0.,0.,0.,0.,0.])
F = {80:tipLoad}
model.applyLoads(1,F=F)
# Run the analysis
model.staticAnalysis(1)
model.plotDeformedModel(figName='V8 Case 1',numXSects=8,contLim=[-4.0e6,4.0e6],\
    warpScale=100,displScale=10,contour='sig_33')
'''
'''
U_vec = np.linspace(1,30,30)
kr_vec = np.array([.001,.01,.1,.5,2.5,15.,35.])*10
M_vec = [0.,0.,0.,0.,0.,0.,0.]
예제 #3
0
    warpScale=10,displScale=2,contour='sig_33')
# Write the beam displacements and rotations to a file
sbeam1.writeDisplacements(fileName='V8_Case_1.csv')


# CASE 2:
# Apply the case load
def f(x):
    vx = -0.1 * (-1.0e3 * x[2]**2 + 6e7 * x[2] + 1.0e6)
    vy = (-1.0e3 * x[2]**2 + 6e7 * x[2] + 1.0e6)
    pz = 0
    tz = .2 * c * (-1.0e3 * x[2]**2 + 6e7 * x[2] + 1.0e6)
    return np.array([vx, vy, pz, 0, 0, tz]) / 1.0e4


model.resetPointLoads()
model.applyLoads(1, f=f, allElems=True)
# Run the analysis
model.staticAnalysis(1)
model.plotDeformedModel(figName='V8 Case 2',numXSects=10,contLim=[0.,5.0e8],\
    warpScale=100,displScale=10,contour='MaxPrin')
# Write the beam displacements and rotations to a file
sbeam1.writeDisplacements(fileName='V8_Case_2.csv')


# CASE 3:
# Apply the case load
def f(x):
    vx = 1e3
    vy = 1e3
    pz = -1e3
# Run the analysis
model.staticAnalysis(1)
model.plotDeformedModel(figName='V8 Case 1',numXSects=10,contLim=[0,293000],\
    warpScale=10,displScale=2,contour='sig_33')
# Write the beam displacements and rotations to a file
sbeam1.writeDisplacements(fileName = 'V8_Case_1.csv')

# CASE 2:
# Apply the case load
def f(x):
    vx = -0.1*(-1.0e3*x[2]**2+6e7*x[2]+1.0e6)
    vy = (-1.0e3*x[2]**2+6e7*x[2]+1.0e6)
    pz = 0
    tz = .2*c*(-1.0e3*x[2]**2+6e7*x[2]+1.0e6)
    return np.array([vx,vy,pz,0,0,tz])/1.0e4
model.resetPointLoads()
model.applyLoads(1,f=f,allElems=True)
# Run the analysis
model.staticAnalysis(1)
model.plotDeformedModel(figName='V8 Case 2',numXSects=10,contLim=[0.,5.0e8],\
    warpScale=100,displScale=10,contour='MaxPrin')
# Write the beam displacements and rotations to a file
sbeam1.writeDisplacements(fileName = 'V8_Case_2.csv')

# CASE 3:
# Apply the case load
def f(x):
    vx = 1e3
    vy = 1e3
    pz = -1e3
    tz = 1e3