Question

In: Computer Science

From thermal physics, as objects absorb energy, their physical dimensions expand. This phenomenon is known as...

From thermal physics, as objects absorb energy, their physical dimensions expand. This phenomenon is known as thermal expansion. Write a Python program that calculates the change in length of the following elements: silicon, cadmium, lead, gold, iron, and mercury. Assume that the temperature ranges from 273 K to 373 K. Write a program that defines a function to calculate the change in length at each increment in temperature. Increment the temperature by a step size of 1 K for all calculations. Plot the change in length versus the change in temperature for all metals.

Please answer using Jupyter notebook in python 3

Solutions

Expert Solution

Solution:

Change in length expression given as

Where

is change in length ,

is Thermal expension Coefficient

is change in temperature

values not same for different metals

values in micro meter ()for above metals in below table

Silicon 5.6
cadmium 30
lead 29
gold 24
iron 12
mercury 61
#importing matplotlib for plot of graph
import matplotlib.pyplot as plt
#name1=['silicon','cadmium','lead','gold','iron','mercury']#input("Enter name of metrial ")

#Thermal Expansion Coefficients in micro meter [5.6,30,29,24,12,30] of respective list element of name1
def changel(name,l):
    list=[]
    for i in name:
        if i=="silicon":
              #cl=alpha*l* change in temperature
            cl=5.6*l*100
            list.append(cl)
        elif i=="cadmium":
            cl=30*l*100
            list.append(cl)
        elif i=="lead":
            cl=29*l*100
            list.append(cl)
        elif i=="gold":
            cl=24*l*100
            list.append(cl)
        elif i=="iron":
            cl=12*l*100
            list.append(cl)
        elif i=="mercury":
            cl=61*l*100
            list.append(cl)
                
    return list


name1=['silicon','cadmium','lead','gold','iron','mercury']
leng=int(input("enter length of material in meter "))
list1= changel(name1,leng)                               #call function changel()
res = "\n".join("{}   {}".format(x, y) for x, y in zip(name1, list1))
print('change in length in micrometer')
print('-------------------------')
print(res)
#importing matplotlib for plot of graph
#import matplotlib.pyplot as plt
plt.plot(list1,'g*', 100, 'ro') #change in temperatur is 100
plt.show() #plot is change in length for all metal as y and change in temperature as x axis

above is code implementation for given problem statement as temparature change 273k to 373k that will be taken here 100. and length values is also taking as user input and name is list type for storing different metals name since values is different for each other. also plot of change in length with temperature is ploted here temperature change is 100 { we can include many values of change in temperature}

Output1.

The above image is ouput of above code implementation for length value L =200 meter

and showing the change in length for different metals with from above mention table and change in temperature is 100.

Output2.

The above image is details about output for above implented code for taking length value of metal from user as 400 meter

and corresponding change in length calculated values shown and also plot of change in length with change in temperature.

change in temperature is shown with red color and change in length is with green color in the plot.


Related Solutions

Springs in Two Dimensions Solution(Mastering Physics Chapter 05: Work and Energy)
The ends of two identical springs are connected. Their unstretched lengths l are negligibly small and each has spring constant k. After being connected, each spring is stretched an amount L and their free ends are anchored at y = 0 and x = ±L as shown (Figure 1) . The point where the springs are connected to each other is now moved from the origin to a position (x, y). Assume that (x, y) lies in the first quadrant....
A. In thermal equilibrium, how do electrons acquire the energy necessary to move from the valence...
A. In thermal equilibrium, how do electrons acquire the energy necessary to move from the valence band to the conduction band? B. Write expressions for the electron concentration in the conduction band at T = 0 K and at T = 300 K. Assume the semiconductor is intrinsic silicon.
How much thermal energy (in kcal) is required to change a 48 g ice cube from...
How much thermal energy (in kcal) is required to change a 48 g ice cube from a solid at - 14.6 oC to steam at 10.8 oC above boiling?
Ocean Thermal Energy Conversion (OTEC) systems play a major role in getting power from the ocean....
Ocean Thermal Energy Conversion (OTEC) systems play a major role in getting power from the ocean. Implementation of this technology for power generation from ocean needs a critical study. Therefore, you are asked to prepare a report on various critical aspects of this system such as the appropriate principles, the suitable conditions for the selection of a particular type of OTEC, the development of various technologies in this field related to the techno-economic feasibility, the popularity of technologies in the...
A proposed Ocean Thermal Energy Conversion (OTEC) plant draws heat from the ocean surface at 22°C...
A proposed Ocean Thermal Energy Conversion (OTEC) plant draws heat from the ocean surface at 22°C and rejects heat to the water near the ocean bed at 4°C. What is the highest thermal efficiency the plant could achieve? [4] (b) Consider a system undergoing an adiabatic process from a fixed state 1 to a fixed state 2. Use the Second Law of Thermodynamics to prove that the maximum work is done by the system if the process is reversible. [6]...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT