It is important to consider the effect of thermal expansion when building a structure that must withstand changes in temperature. For example, a metal beam will expand in hot temperatures. The additional stress could cause the structure to fail. Similarly, a material will contract in cold temperatures. The linear change in length of a material if it is allowed to freely expand is described by the following equation:
L Δ=α L 0 T Δ
Here, L0 is the initial length of the material in meters, LΔ is the displacement in meters, TΔ is the change in temperature in Celsius, and a is a coefficient for linear expansion.
Write a program that inputs a, LΔ, and TΔ, then calculates and outputs the linear displacement. If the displacement is positive then output that “The material will expand by” the displacement in meters. If the displacement is negative then output that “The material will contract by” the displacement in meters. You shouldn’t output the displacement as a negative number. Here are some values for a for different materials.
Aluminum | 2.31 × 10–5 |
Copper | 1.70 × 10–5 |
Glass | 8.50 × 10–6 |
Steel | 1.20 × 10–5 |
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Elementary Surveying: An Introduction To Geomatics (15th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out With Visual Basic (8th Edition)
Concepts Of Programming Languages
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
- Algorithms Question Three points P, Q, and R are said to be collinear if they are on a single line. To check whether the 3 points lie on the same line, we use the distance formula. If P, Q and R are three collinear points, then: Distance from P to Q + Distance from Q to R = Distance from P to R PQ + QR = PR The distance between two points (x1, y1) and (x2, y2) is given by Hence, we can easily find the distance between the points P, Q and R, with the help of this formula. Design an algorithm (pseudocode) to check whether three points are collinear. In your solution include the input and the output.arrow_forwardThe velocity v and the falling distance d as a function of time of a skydiver that experience the air resistance can be approximated by: and d() = " in cosh :) kg v(t) = mg tanh where k = 0.24 Kg is a constant, m is the skydiver mass, g = 9.81 " is the acceleration due to gravity, and t is the time in seconds since the skydiver starts falling. Write m MATLAB code to determine the velocity v and the falling distance d at t = 8s for a 95kg skydiver. • Note: Velocity v and distance d are each worth 50% of the total points for this problem. Script e C Reset I MATLAB Docume 1 % Define variable(s) here. 3 v = % write the equation for v here, do not change the variable name. 4 d = % write the equation for d here, do not change the variable name.arrow_forwardWo Home I(O noPHP) I Homework 10 Q2 Q1 Q3 L Q4 Q5 Q6 (a) Q7 Q8 Q9 Q10 (x = L, y = 0) |(x = 0, y = 0) (b) A beam is subjected to a linearly increasing distributed load. The elastic curve (deflection) is shown in the figure. The equation to find the maximum deflection is given below. Create a matlab code where you can calculate the maximum deflection (dy/dx=0) using the bisection method. Use initial guesses of 1 and 5, L= 6.27 m, E = 73000 kN/cm2, I=38000 cm4, and w0= 2.5 kN/cm. What will be the value of x (location of maximum deflection) after 15 bisection iteration? wo -(-æ³ +2L²x³ – L^x) 120EIL dy de wo (-5xª + 6L²x² – Lª) 120EIL Choices 2.5236 1.402 2.804 4.206 Submit I Attempts 1 |arrow_forward
- In practical life, the employees get salaries and pay taxes honestly. Sometimes, the process of drawing salariesand payment of taxes may lead to some interesting situation. Suppose, a person draws salary of Rs. 10,000 permonth. A certain percentage of tax is charged on that amount, which is deducted every month. But if the salaryof the person is more than Rs. 10,000 per month, then the tax rate is different. Similarly if a person is getting Rs.20,000 per month, he/she would be charged more under a different tax rate slab. The interesting situationdevelops if there is an anomaly in the tax rates i.e. a person who is getting higher salary takes home lesser moneyas compared to the other person with less gross salary.To further elaborate it, we suppose that there is company 'C' where 100 or less than 100persons are employed. The salaries of the employees and their tax rates are known to us.We are required to list those unlucky persons, who are getting lesser take-home salary(net salary)…arrow_forwardInterest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance =netBalance x d1-payment x d2d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: Interest= averageDailyBalance * 0.0152 Write a program using c++ compiler that accepts as inputnetBalance, payment, d1,d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.arrow_forwardThe density of an object is 2 g/cm3. To convert this to kg/m3, we need to divide it by 1000 to change grams to kilograms. Then, we need to multiply it by 10 to the power of what number to change cm3 to m3.arrow_forward
- applied numericl methodsarrow_forwardYou are given six two-dimensional points shown in the table below. Point x coordinate y coordinate Pi 0.1831 0.1085 p2 0.9624 0.1916 p3 0.0732 0.9594 p4 0.2572 0.6066 p5 0.4476 0.7871 0.2292 0.9489 Use the Euclidean distance to compute the distance matrix M for the six points. Show the results of the complete linkage version of the basic agglomerative hierarchical clustering algorithm. That is, for each iteration of the algorithm, you need to show the found closest two clusters and the updated distance matrix M.arrow_forwardHeat capacity of a solid: Debye's theory of solids gives the heat capacity of a solid at temperature T to be 3 T rOp/T Cy = 9VpkB (e* – 1)2 dx, - where V is the volume of the solid, p is the number density of atoms, kg is Boltzmann's constant, and 0D is the so-called Debye temperature, a property of solids that depends on their density and speed of sound. Develop a computer code to evaluate Cy (T) for a given value of the temperature, for a sample consisting of 1000 cubic centimeters of solid aluminum, which has a number density of p = 6.022 x 1028m-3 and a Debye temperature of 0p = 428K. The Boltzmann's constant kg = 1.380649 x 10-23 J · K-1. Please evaluate the integral with the following methods: (a) MATLAB adaptive Simpson quadrature, [Q.FCNT] = QUAD(FUN,A,B,TOL) with TOL =le-10.arrow_forward
- 38. The geometric mean g of n numbers x; is defined as the nth root of the product of x;: g=Vx1x2X3•…Xn (This is useful, for example, in finding the average rate of return for an investment which is something you'd do in engineering economics). If an investment returns 15% the first year, 50% the second, and 30% the third year, the average rate of return would be (1.15*1.50*1.30)") Compute this.arrow_forwardLet L be a line in the xy plane. If L is a vertical line, its equation is x=afor some real number a. Suppose L is not a vertical line and its slope is m. Then the equation of L is y=mx + b, where b is the y-intercept. If L passes through the point (x0,y0), the equation of L can be written as y –y0=m(x –x0). If (x1,y1)and (x2,y2)are two points in the xy plane and x1≠x2, the slope of the line passing through these points is m = (y2-y1)/ (x2-x1). Write a program that prompts the user to enter two points in the xy plane. The program outputs the equation of theline and uses ifstatements to determine and output whether the line is vertical, horizontal, increasing, or decreasing. If L is a nonvertical line, output its equation in the form y=mx + b.arrow_forwardLet l be a line in the x-y plane. If l is a vertical line, its equation is x 5a for some real number a. Suppose l is not a vertical line and its slope is m. Then the equation of l is y 5mx 1b, where b is the y-intercept. If l passes through the point (x0, y0,), the equation of l can be written as y 2y0 5m(x 2x0 ). If (x1, y1) and (x2, y2) are two points in the x-y plane and x1 ≠ x2, the slope of line passing through these points is m 5(y2 2y1 )/(x2 2x1 ). Write a program that prompts the user two points in the x-y plane. The program outputs the equation of the line and uses if statements to determine and output whether the line is vertical, horizontal, increasing, or decreasing. If l is a non-vertical line, output its equation in the form y 5mx 1b.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education