Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hey I don't know if chegg does coding but this is in my c++ class and I am having a very hard time getting the
Hey I don't know if chegg does coding but this is in my c++ class and I am having a very hard time getting the velocity squared function into my code using random numbers. Once I get help with the velocity squared sum I should be able to compute the Tg function. Thank you so much!
where Boltzmann's constant is kg = 1.38064852x10-23 in Joules per Kelvin (J/K) and each particle with mass m in kilograms (kg) is travelling at velocity v1, v2, ..., Vn meters per second (m/s). This can be written as m T= (1) (v + v +...+ v). 3kg N If two gases that are initially at different temperatures are brought together, they eventually achieve thermal equilibrium through heat conduction. Heat conduction is the direct microscopic exchange of kinetic energy of particles. During the process of reaching thermal equilibrium, heat is transferred between the gases. The amount of heat transferred, AQ in Joules (J), is proportional to the temperature difference AT between these gases. For a mole of the gas, the heat transfer is AQ = cNAMAT (2) where c is the specific heat capacity in Joule per kilogram per Kelvin (J/kgK), Avogadro's constant NA is 6.02214076x1023. Tasks: Write a C++ program that: 1. Asks the user for minimum and maximum speeds, Vmin and Vmax , of the gas particles. 2. Asks the user for the temperature of surrounding air Ts. 3. Have the program generate random speeds v1, v2, ..., Vn between the minimum and maximum for each of the N particles. 4. Use constants for: a. N= 10000 b. c = 1000.0 (J/kgK) c. m = 2 X 1.00784 (AMU) 5. Compute the gas temperature T, using Equation (1) and output it to the console. a. Use the mass for nitrogen, m = 14.0067 AMU. b. An AMU is an atomic mass unit and is equal to 1.660538921x10-27kgStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started