
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Answer in Python. Given this code to start with (definitions for the Saha and Boltzmann Equations), I must: use the Saha equation (defined in the second code block) to find the temperature of the partial ionization zone for a certain gas.
(Hint: The Saha function will return answers for the Saha equation for gases of arbitrary composition)
![[1] import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np
from astropy.constants import h, m_e, k_B
from astropy.constants import u as atomicu
def Saha (T,Z_i,Z_ii,E_ionize,P_e):
N_iitoi = 2*k_B*T*Z_ii/(P_e*Z_i)*(2*np.pi*m_e*k_B*T/h**2)**(3/2)*np.exp(-E_ionize/(k_B*T))
N_iitoi = N_iitoi.decompose()
return (N_iitoi)
[3] def Boltzmann_H(T,low, high):
g_low
2*low**2
g_high 2*high**2
E low =
=
-13.6/low**2*u.eV
E_high = -13.6/high**2*u.eV
exponent = -1* (E_high-E_low)/(k_B*T)
exponent = exponent.decompose()
N htol g_high/g_low*np.exp(exponent)
N_htol N_htol.decompose()
return (N_htol)](https://content.bartleby.com/qna-images/question/e3c23c7f-c566-42d4-a739-9c42cf68404f/50aefa86-46e0-4963-8844-9bccab99e8b5/euuseoc_thumbnail.png)
Transcribed Image Text:[1] import astropy.units as u
import matplotlib.pyplot as plt
import numpy as np
from astropy.constants import h, m_e, k_B
from astropy.constants import u as atomicu
def Saha (T,Z_i,Z_ii,E_ionize,P_e):
N_iitoi = 2*k_B*T*Z_ii/(P_e*Z_i)*(2*np.pi*m_e*k_B*T/h**2)**(3/2)*np.exp(-E_ionize/(k_B*T))
N_iitoi = N_iitoi.decompose()
return (N_iitoi)
[3] def Boltzmann_H(T,low, high):
g_low
2*low**2
g_high 2*high**2
E low =
=
-13.6/low**2*u.eV
E_high = -13.6/high**2*u.eV
exponent = -1* (E_high-E_low)/(k_B*T)
exponent = exponent.decompose()
N htol g_high/g_low*np.exp(exponent)
N_htol N_htol.decompose()
return (N_htol)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- help me please :(arrow_forwardThere is only 1 ques with 2 part.please answer them.( Please answer in python) Part I : Define a function called larger with 2 parameters. The function should compute which is the larger and should subtract the smaller from the larger (regardless of the order of arguments). Call the function four times using the following arguments: (75, 59) (43, 45) (-5, 19) (35, -35) Output Example: 16 2 24 70 Part II Gas Price Averaging a) Write a function average with a parameter prices that can accept an arbitrary number of integer values. This function returns the average of all values. b) Call the average function with the following arguments: 2.95, 3.25, 3.10, 3.19 c) Call the average function with the following arguments: 4.09, 3.89, 3.75 d) Print and format the returned results with the average computed to two decimal places. Match the output below. Output Example Village gas prices at the start of the year averaged $3.12 Village gas prices today average $3.91arrow_forwardby using C++arrow_forward
- Please answer it in python using function turtle -Write a polygon(nb cotes.dimension) function that plots a polygon that is regular to nb cotes sides (triangle, square, pentagon, hexagon..) and whose length of a east side. The first side drawn should be horizontal and you should rotate in clockwise (see figure opposite). polygone (6,50) -Write a function diametre polygone(nb cotes dimension) that returns the diameter a regular polygon with nb cotes length dimension. This diameter is given by the next formula, with n number of sides and c the length of the side (do not forget to import the math module): C sin (T/n)arrow_forwardPlease I need help implementing the BOOLEAN evaluation function in Python so that the bellow expression can return True. (or (> 2 3) (> 3 2))arrow_forwardplease use matlabarrow_forward
- *PLEASE SOLVE USING PYTHON* You are a nasa engineer who needs to monitor the situation every time a probe uses its thrusters. For a given day you are given the planned times when the thruster will be used. You need to be monitoring the situation at those boost times and for 5 minutes after. You want to figure out if you can take a break for a certain number of minutes. To achieve this you are given the planned boost times in in hours and minutes with an am/pm. And you are given a desired break time in minutes. Output if you can take the break or not given the monitoring you have to do. For example: If you know the thruster is fired at 5:00am and 12:50pm. You need to be monitoring the situation from 5:00am to 5:05am and again from 12:50pm to 12:55pm. Apart from those times you are free to take a break. So a 5 minute break is possible. But a 12 hour break is not possible.arrow_forwardAttempt to unify the following pairs of expressions. Either show their most general unifiers or explain why they will not unify. p(A,B,c) and p(Q,r,S)arrow_forwardCan someone help me making a factorial() function in python (DO NOT USE ONE fromt the math module)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY