Question: ORIGINAL CODE:# In this simulation the library numpy is used and it is named it np # We will also use the math

ORIGINAL CODE:# In this simulation the library numpy is used and it is named it "np"# We will also use the math library and we will name it mathimport numpy as npimport math as math# The seed below initializes the random generator to always obtain the same result.# DO NOT CHANGE THIS VALUE AND RERUN THIS CELL EVERYTIME YOU RUN THE PROGRAM.np.random.seed(3500)# Variables are defined in this cellW =6000 # Weight of the Tank in kNg =9.81 # Gravitational constantmeanCoF =0.6 # Mean of the coefficient of frictionstdCoF =0.05*0.6 # Standard deviation of the coefficient of frictionCoF =[] # Empty list to store coefficients of frictionAcc =[] # Empty list to store accelerationH =[] # Empty list to store earthquake forceF =[] # Empty list to store resitance forcenSlide =0 # Counter of failurespSlide =0 # Probability of failure# Monte Carlo simulationnsim =1000000 # Number of simulationfor i in range(nsim):# Calculate earthquake forcesAcc.append(1.6* np.random.random()* g)H.append(W * Acc[i]/ g)# Calculate tank resistance force F = CoF * WCoF.append(np.random.normal(meanCoF, stdCoF))F.append(W * CoF[i])# Check for failureif H[i]> F[i]:nSlide = nSlide +1# Calculate the probability of the tank sliding during an earthquakepSlide = nSlide / nsimprint("The probability of the tank sliding during an Earthquake is ", pSlide)Q14) You must determine the value of the constant C . Provide your answer as in terms of 1/g. You may round your answer to only two decimals.The constant C has a value of _______1/g. Q15) Modify the original program (as GIVEN) to describe the maximum horizontal acceleration using the probability distribution described above and recalculate the probability of the tank sliding during an earthquake. Note: Round your answer to only three decimals.
 ORIGINAL CODE:# In this simulation the library numpy is used and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!