import math
## initialization of variables
#calculate the required thickness of the plate for the lower panels
d=3.6 ##m
w=2.7 ##m
ha=3.0 ##m
b=0.9 ##m
a=1.2 ##m
v=0.29
E=200. ##GPa
p=ha*9.8
##part (a)
S_w=124. ##MPa
b_a=b/a
M=0.04*p*b**2*10**3
h=math.sqrt(6.*M/S_w)
print('part (a)')
print'%s %.2f %s'%('\n h = ',h,' mm')
## part (b)
C=0.032/(1.+b_a**4)
p=p*10**3
E=E*10**9
b=b*10**3
w_max=C*(1.-v**2)*p*b**4/(E*h**3)
print('\n part (b)')
print'%s %.2f %s'%('\n w_max = ',w_max,' mm')
import math
## initialization of variables
#calculate the magnitude of the yeild pressure and deflection and cente of the plate and working pressure
E=200. ##GPa
v=0.29
Y=315. ##MPa
h=10. ##mm
D=200. ##mm
SF=2.0
##part (a)
a=D/2.
E=E*10**3.
Py=1. ## Since unknown
S_maxk=3./4.*Py*a**2./h**2
Py=Y/S_maxk
w_max=3/16.*(1.-v**2.)*Py*a**4/(E*h**3)
print'%s %.2f %s'%('Py = ',Py,' MPa')
print'%s %.2f %s'%('\n W_max = ',w_max,' mm')
## part (b)
Pw=Py/SF
print('\n part (b)')
print'%s %.2f %s'%('\n Pw = ',Pw,' MPa')
import math
## initialization of variables
#calculate the allowable magnitude of pressre and maximum deflection
D=500. ##mm
h=5. ##mm
Sigma=288. ##MPa
E=72. ##GPa
SF=2.
##part (a)
a=D/2.
E=E*10**3.
f=Sigma*a**2./(E*h**2)
## w_max/h has to be 2.4 since f=10
Pr=50.
p=Pr*E*h**4./a**4.
p=p/2.
print('part (a)')
print'%s %.2f %s'%('\n Allowable pressure = ',p*10**3,' kPa')
## part (b)
q=p*a**4/(E*h**4)
## Corresponding w_max/h = 1.8
w_max=1.8*h
print('\n part (b)')
print'%s %.2f %s'%('\n W_max = ',w_max,' mm')