Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Problem - Solving a simple model of soil temperature change during a cold snap The temperature of the soil is calculated using the function  - at a distance x (in meters) below the surface and at time t (in seconds) after the begining of the cold-snap

Problem - Solving a simple model of soil temperature change during a cold snap The temperature of the soil is calculated using the function  - at a distance x (in meters) below the surface and at time t (in seconds) after the begining of the cold-snap

Mechanical Engineering

Problem - Solving a simple model of soil temperature change during a cold snap

The temperature of the soil is calculated using the function  - at a distance x (in meters) below the surface and at time t (in seconds) after the begining of the cold-snap.

Note that the surface temperature  during the cold snap and the initial soil temperature  just before the cold snap. The soil has the thermal conductivity

 

.

 

Qustion: How deep a water main should be buried such that it will not freeze at least 60 days (~3 months) under these conditions (i.e.,  for 60 days.) Solve this problem using three different methods:

  1. graphical observation:
    • Write the function    as an anonymous MATLAB function using array operators.
    • Plot T(x,t) when        days. Be careful with the physical units. Your graph must have appropirate x-axis and y-axis labels. Discuss your observations in 3-5 sentences. Are the results obtained physical/ resonable?
    • % Your answer goes here

% Your answer goes here

Ts = -15;

Ti = 20;

  1. the bisection method:
    • Write a function that executes the bisection algorithm given the function, the two bounds (lower and upper), and the tolerance TOL.
    • What is a sutable set of suitable lower and upper bounds to start your bisection algorithm? Why?
    • The output variables should be the root and the total number of bisection iterations.
    • Save the eror in a vector and return it as one of the output arguments.
    • How many iterations does it take to obtain the solution (with TOL=1e-10)?
    • What is the execution time of your bisection function? (You can use tic-toc or timeit() function.)
    • [Figure 1] Plot the iterations vs. error graph. The x-axis corresponds to the iteration number and the y-axis is the error obtained at each iteration. Include legend with the legend() function. Use "bisection" as your label for the legend, i.e., legend("bisection"). HINT: Execute help legend in MATLAB.

% Your answer goes here

1

  1. the Newton method:
    • Write a function that executes the Newton method that takes the function and an initial guess and the tolerance TOL. Hint: If you decide to implement the generic Newton method, use backward difference method for the numerical differentiation.)
    • Save the eror at each iteration in a vector and return it as one of the output arguments. The other output argumetns should be the converged root and the number of iterations it took. Note that the size of error vector should be equal to the total number of newton iterations.
    • How many iterations does it take to obtain the solution (with TOL=1e-10).
    • What is the execution time of your Newton function?
    • [Figure 2] Plot the iterations vs. error graph. The x-axis corresponds to the iteration number and the y-axis is the error obtained at this iteration number. "Hold on" to the figure and plot this graph for another 5 different initial guess. You are free to choose any initial guess value. Your graph should be easy to understand: for example, the curves should be distingusable either by color or style, or both. Include appropirate legends with the legend() function.

% Your answer goes here

  1. bisection vs. Newton:
    •  
         

      [Figure 3] To compare the convergence behavior of bisection and newton methods, plot the curves you obtained in part b and part c into a new figure with legends. Based on your results and observations, which method (graphical observations, bisection method, and Newton method) you would recommend us to use to solve this problem? Why?

% Your answer goes here

Hint 1: Water freezes when .

Hint 2: The MATLAB syntax for the error function () is:

y=0.1; z = erf(y)

z = 0.1125

 

Option 1

Low Cost Option
Download this past answer in few clicks

18.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE