Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions