As usual, LitDev has concocted some great November challenges, based on ideas from the Small Basic community!

Today we're going to focus on a Physics Challenge that's challenging even to think about... The Difficult Gas Challenge!

Welcome to the monthly Small Basic Challenge!

These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using SmallBasic.  Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!

Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain 'sticky' for the month.  The only rule is that your solution must use standard Small Basic methods (no extensions).

Physics Challenge

Running out of simple physics challenges - this one isn't much harder, just takes more explaining.

An ideal gas has the following equation relating its pressure (P Bars), volume (V litres) and temperature (T degC).  http://en.wikipedia.org/wiki/Ideal_gas

(1)    P * V / (273 + T) = constantA (ideal gas equation)

This means that if we know the starting state (P, V & T) and any 2 quantities are changed then the 3rd can be calculated.

If we start at P = 2 Bar, V = 1 litre and T = 20 C and change the pressure, volume or temperature, then the others will change to keep the equation equal to constantA.

For example if we keep the temperature constant and double the volume, then the pressure will half (Boyle’s Law).

If there is no heat transfer (or technically no entropy change), then the following equation also holds for gases.  https://en.wikipedia.org/wiki/Isentropic_process

(2)    P * V^g = constantB (isentropic or adiabatic expansion)

g is a property of the gas (isentropic exponent), for air it is about 1.4.

V^g means V to the power of g; in SmallBasic this is Math.Power(V, g).  If you don’t know about powers then use P * V * V = constantB.

If we know the starting pressure and volume, then we can calculate the change in either P or V if the other is changed.

An example of gas compression heating a gas is the warming of a bicycle pump, and gas expansion cooling a gas might be ice that forms on the nozzle when a CO2 fire extinguisher is used, or even how a fridge works.

So if the volume changes, then the pressure will change according to (eqn 2) and the resulting pressure and volume change lead to a change in temperature (eqn 1).

Calculate and perhaps plot the change in temperature and pressure as we increase (expand) or decrease (compress) the gas volume.

Hint: Equations 1 and 2 can be written to show how the initial and new values of P,V,T are related:

(273 + T2) / (P2 * V2) = (273 + T1) / (P1 * V1)
P2 = P1 * (V1/V2)^g
where P1,V1,T1 are initial values and P2,V2,V2 are new values.

How much must we expand 1 litre of air to cool it from 20C to 0C?  What is the pressure change if we start at 2 Bar?

Not a programming question, but would it take more or less or similar effort pump up a cycle tire on a hot or cold day?

Join this challenge here: Challenge of the Month - November 2012

Thanks!

- Tall Basic Ed
The passage describes a physics challenge involving the calculation of changes in pressure, volume, and temperature of an ideal gas under different conditions. It includes specific equations and an example problem to solve.
single_question_with_answer

the text contains a specific mathematical question: "how much must we expand 1 litre of air to cool it from 20c to 0c? what is the pressure change if we start at 2 bar?" the question is accompanied by the necessary equations and initial conditions to solve it, but the actual numerical answer is not provided in the text. however, the question is framed in a way that implies the reader should calculate the answer, so it can be considered as having an answer in the context of the challenge.
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
As usual, LitDev has concocted some great November challenges, based on ideas from the Small Basic community!

Today we're going to focus on a Physics Challenge that's challenging even to think about... The Difficult Gas Challenge!

Welcome to the monthly Small Basic Challenge!

These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using SmallBasic.  Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!

Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain 'sticky' for the month.  The only rule is that your solution must use standard Small Basic methods (no extensions).

Physics Challenge

Running out of simple physics challenges - this one isn't much harder, just takes more explaining.

An ideal gas has the following equation relating its pressure (P Bars), volume (V litres) and temperature (T degC).  http://en.wikipedia.org/wiki/Ideal_gas

(1)    P * V / (273 + T) = constantA (ideal gas equation)

This means that if we know the starting state (P, V & T) and any 2 quantities are changed then the 3rd can be calculated.

If we start at P = 2 Bar, V = 1 litre and T = 20 C and change the pressure, volume or temperature, then the others will change to keep the equation equal to constantA.

For example if we keep the temperature constant and double the volume, then the pressure will half (Boyle’s Law).

If there is no heat transfer (or technically no entropy change), then the following equation also holds for gases.  https://en.wikipedia.org/wiki/Isentropic_process

(2)    P * V^g = constantB (isentropic or adiabatic expansion)

g is a property of the gas (isentropic exponent), for air it is about 1.4.

V^g means V to the power of g; in SmallBasic this is Math.Power(V, g).  If you don’t know about powers then use P * V * V = constantB.

If we know the starting pressure and volume, then we can calculate the change in either P or V if the other is changed.

An example of gas compression heating a gas is the warming of a bicycle pump, and gas expansion cooling a gas might be ice that forms on the nozzle when a CO2 fire extinguisher is used, or even how a fridge works.

So if the volume changes, then the pressure will change according to (eqn 2) and the resulting pressure and volume change lead to a change in temperature (eqn 1).

Calculate and perhaps plot the change in temperature and pressure as we increase (expand) or decrease (compress) the gas volume.

Hint: Equations 1 and 2 can be written to show how the initial and new values of P,V,T are related:

(273 + T2) / (P2 * V2) = (273 + T1) / (P1 * V1)
P2 = P1 * (V1/V2)^g
where P1,V1,T1 are initial values and P2,V2,V2 are new values.

How much must we expand 1 litre of air to cool it from 20C to 0C?  What is the pressure change if we start at 2 Bar?

Not a programming question, but would it take more or less or similar effort pump up a cycle tire on a hot or cold day?

Join this challenge here: Challenge of the Month - November 2012

Thanks!

- Tall Basic Ed
user
The passage describes a physics challenge involving the calculation of changes in pressure, volume, and temperature of an ideal gas under different conditions. It includes specific equations and an example problem to solve.

TYPE: SINGLE_QUESTION_WITH_ANSWER

The text contains a specific mathematical question: "How much must we expand 1 litre of air to cool it from 20C to 0C? What is the pressure change if we start at 2 Bar?" The question is accompanied by the necessary equations and initial conditions to solve it, but the actual numerical answer is not provided in the text. However, the question is framed in a way that implies the reader should calculate the answer, so it can be considered as having an answer in the context of the challenge.