instruction stringlengths 2.01k 8.44k | input stringclasses 1
value | output stringlengths 180 2.3k |
|---|---|---|
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_heat_transfer(n_moles, T_initial, T_final, Cv_m):
'''Compute the heat transferred during a reversible adiabatic process.
Inputs:
n_moles: amount of substance in moles, float
T_initial: initial temperature in Kelvin, float
T_final: final temperature in Kelvin, float
Cv_m: molar consta... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to de... | def solve_problem(n_moles, T_initial, T_final, Cv_m):
'''Solve for the heat transferred during the reversible adiabatic compression.
Inputs:
n_moles: amount of substance in moles, float
T_initial: initial temperature in Kelvin, float
T_final: final temperature in Kelvin, float
Cv_m: molar consta... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def calculate_gas_mole_change(moles_gas_products, moles_gas_reactants):
'''Calculate the change in the number of moles of gas for a reaction.
Inputs:
moles_gas_products: total moles of gaseous products, float
moles_gas_reactants: total moles of gaseous reactants, float
Output:
delta_nu_g: change... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_enthalpy_internal_energy_diff(delta_nu_g, temperature):
'''Compute the difference between enthalpy and internal energy for a reaction.
Inputs:
delta_nu_g: change in moles of gas, float
temperature: temperature in Kelvin, float
Output:
energy_diff: difference in energy in kJ/mol, fl... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_reaction_enthalpy(delta_u, energy_diff):
'''Calculate the standard reaction enthalpy.
Inputs:
delta_u: standard internal energy of reaction in kJ/mol, float
energy_diff: difference between enthalpy and internal energy in kJ/mol, float
Output:
delta_h: standard reaction enthalpy in ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_enthalpy_problem(moles_gas_products, moles_gas_reactants, temperature, delta_u):
'''Solve for the standard reaction enthalpy of the combustion reaction.
Inputs:
moles_gas_products: number of moles of gaseous products, float
moles_gas_reactants: number of moles of gaseous reactants, float
t... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def calculate_volume_change(V_initial, V_final):
'''Calculate the change in volume.
Inputs:
V_initial: initial volume, float
V_final: final volume, float
Output:
delta_V: change in volume, float
'''
delta_V = float(V_final - V_initial)
return delta_V | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_expansion_work(delta_V):
'''Compute the expansion work done on the system.
Inputs:
delta_V: change in volume, float
Output:
w: work done, float
'''
w = 0.0
return w | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_work(n, V, T_initial, q, T_final):
'''Calculate the work done on the CO2 sample.
Inputs:
n: amount of substance in moles, float
V: fixed volume in dm^3, float
T_initial: initial temperature in K, float
q: heat supplied in kJ, float
T_final: final temperature in K, float
Output:... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_pressure_kpa_to_pa(pressure_kpa):
'''Convert pressure from kPa to Pa.
Inputs:
pressure_kpa: pressure in kilopascals, float
Output:
pressure_pa: pressure in Pascals, float
'''
pressure_pa = float(pressure_kpa) * 1000.0
return pressure_pa | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def calculate_molar_volume(temperature, pressure_pa):
'''Calculate the molar volume of an ideal gas.
Inputs:
temperature: absolute temperature in Kelvin, float
pressure_pa: pressure in Pascals, float
Output:
molar_volume: molar volume in m^3/mol, float
'''
R = 8.314
molar_volume = (R... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_molar_mass(density, molar_volume):
'''Compute the molar mass of the gas in g/mol.
Inputs:
density: density of the gas in kg/m^3, float
molar_volume: molar volume in m^3/mol, float
Output:
molar_mass_g: molar mass in g/mol, float
'''
molar_mass_g = density * molar_volume * 100... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_gas_molar_mass(density, temperature, pressure_kpa):
'''Determine the molar mass of a gaseous compound.
Inputs:
density: density of the gas in kg/m^3, float
temperature: absolute temperature in Kelvin, float
pressure_kpa: pressure of the gas in kPa, float
Output:
final_molar_mass: m... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_initial_state(mass, molar_mass, v_initial_dm3, temperature):
'''Compute the initial state of the ideal gas.
Inputs:
mass: mass of the gas in grams, float
molar_mass: molar mass of the gas in g/mol, float
v_initial_dm3: initial volume in dm^3, float
temperature: temperature in Kelvin,... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_final_state(n_moles, v_initial_m3, v_increase_dm3, temperature):
'''Compute the final state of the gas after expansion.
Inputs:
n_moles: number of moles, float
v_initial_m3: initial volume in m^3, float
v_increase_dm3: volume increase in dm^3, float
temperature: temperature in Kelvin... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_reversible_work(n_moles, temperature, v_initial_m3, v_final_m3):
'''Calculate the work done during reversible isothermal expansion.
Inputs:
n_moles: number of moles, float
temperature: temperature in Kelvin, float
v_initial_m3: initial volume in m^3, float
v_final_m3: final volume in... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_expansion_work(mass, molar_mass, v_initial_dm3, v_increase_dm3, temperature):
'''Solve for the work done during the reversible expansion of the gas.
Inputs:
mass: mass of the gas in grams, float
molar_mass: molar mass of the gas in g/mol, float
v_initial_dm3: initial volume in dm^3, float
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def calculate_moles_h2(mass_mg, molar_mass_mg):
'''Calculate the moles of hydrogen gas produced.
Inputs:
mass_mg: mass of magnesium in grams, float
molar_mass_mg: molar mass of magnesium in g/mol, float
Output:
moles_h2: moles of hydrogen gas, float
'''
moles_h2 = float(mass_mg) / float(... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_expansion_work(moles_h2, temp_celsius, r_const):
'''Calculate the expansion work in Joules.
Inputs:
moles_h2: moles of hydrogen gas, float
temp_celsius: temperature in degrees Celsius, float
r_const: ideal gas constant in J/(mol K), float
Output:
work_joules: work done by the s... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_work_done(mass_mg, temp_celsius, molar_mass_mg, r_const):
'''Compute the total work done by the system in kilojoules.
Inputs:
mass_mg: mass of magnesium in grams, float
temp_celsius: temperature in degrees Celsius, float
molar_mass_mg: molar mass of magnesium in g/mol, float
r_const: i... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_vdw_constant_a(a_vdw):
'''Convert van der Waals constant a to SI units.
Inputs:
a_vdw: van der Waals constant a in dm^6 atm mol^-2, float
Outputs:
a_si: van der Waals constant a in J m^3 mol^-2, float
'''
a_si = a_vdw * 101325.0 * 1e-6
return a_si | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def convert_volumes(v_initial_dm3, v_final_dm3):
'''Convert volumes from dm^3 to m^3.
Inputs:
v_initial_dm3: initial volume in dm^3, float
v_final_dm3: final volume in dm^3, float
Outputs:
v_initial_m3: initial volume in m^3, float
v_final_m3: final volume in m^3, float
'''
v_initial... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_delta_u_m(a_si, v_initial_m3, v_final_m3):
'''Calculate the change in molar internal energy for an isothermal expansion.
Inputs:
a_si: van der Waals constant a in J m^3 mol^-2, float
v_initial_m3: initial molar volume in m^3, float
v_final_m3: final molar volume in m^3, float
Outputs... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_problem(initial_volume_dm3, final_volume_dm3, a_vdw):
'''Solve for the change in molar internal energy of a van der Waals gas.
Inputs:
initial_volume_dm3: initial volume in dm^3, float
final_volume_dm3: final volume in dm^3, float
a_vdw: van der Waals constant a in dm^6 atm mol^-2, float
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def joule_thomson_coeff(a, b, T, R, Cp_m):
'''Calculate the Joule-Thomson coefficient for a van der Waals gas.
Inputs:
a: van der Waals parameter a, float
b: van der Waals parameter b, float
T: temperature, float
R: gas constant, float
Cp_m: molar heat capacity at constant pressure, float
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def isothermal_jt_coeff(mu, Cp_m):
'''Calculate the isothermal Joule-Thomson coefficient.
Inputs:
mu: Joule-Thomson coefficient, float
Cp_m: molar heat capacity at constant pressure, float
Output:
mu_T: isothermal Joule-Thomson coefficient, float
'''
mu_T = -Cp_m * mu
return mu_T | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def enthalpy_change_kJ(mu_T, p1, p2):
'''Calculate the molar enthalpy change in kJ/mol.
Inputs:
mu_T: isothermal Joule-Thomson coefficient in dm^3/mol, float
p1: initial pressure in atm, float
p2: final pressure in atm, float
Output:
delta_H_kJ: molar enthalpy change in kJ/mol, float
'''... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def solve_problem(a, b, p1, p2, T):
'''Calculate the molar enthalpy change for a van der Waals gas.
Inputs:
a: van der Waals parameter a in dm^6 atm mol^-2, float
b: van der Waals parameter b in dm^3 mol^-1, float
p1: initial pressure in atm, float
p2: final pressure in atm, float
T: tempera... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def molar_heat_capacity_monatomic(R):
'''Calculate the constant-volume molar heat capacity for a monatomic perfect gas.
Inputs:
R: universal gas constant in J K^-1 mol^-1, float
Output:
C_v_m: constant-volume molar heat capacity in J K^-1 mol^-1, float
'''
C_v_m = 1.5 * R
return C_v_m | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def entropy_change_constant_volume(C_v_m, T1, T2):
'''Calculate the change in molar entropy for a constant-volume process.
Inputs:
C_v_m: constant-volume molar heat capacity in J K^-1 mol^-1, float
T1: initial temperature in Kelvin, float
T2: final temperature in Kelvin, float
Output:
delta_... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def final_molar_entropy(T1, T2, S1):
'''Calculate the final molar entropy of a monatomic perfect gas at constant volume.
Inputs:
T1: initial temperature in Kelvin, float
T2: final temperature in Kelvin, float
S1: initial molar entropy at T1 in J K^-1 mol^-1, float
Output:
S2: final molar ent... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_heat_capacity_ratio():
'''Compute the heat capacity ratio for a monatomic perfect gas.
Inputs:
None
Outputs:
gamma: heat capacity ratio, float
'''
gamma = 5.0 / 3.0
return gamma | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def compute_final_temperature(initial_temperature, initial_volume, final_volume, gamma):
'''Calculate the final temperature after a reversible adiabatic expansion.
Inputs:
initial_temperature: initial temperature in K, float
initial_volume: initial volume, float
final_volume: final volume, float
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_adiabatic_expansion(mass, initial_volume, initial_temperature, final_volume):
'''Calculate the final temperature of an argon gas sample after reversible adiabatic expansion.
Inputs:
mass: mass of the argon sample in grams, float
initial_volume: initial volume in dm^3, float
initial_tempera... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_temperature(T_C):
'''Convert temperature from Celsius to Kelvin.
Inputs:
T_C: temperature in degrees Celsius, float
Output: temperature in Kelvin, float
'''
T_K = T_C + 273.15
return T_K | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def convert_heat(q_kJ):
'''Convert heat from kilojoules to joules.
Inputs:
q_kJ: heat in kilojoules, float
Output: heat in joules, float
'''
q_J = q_kJ * 1000.0
return q_J | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def calculate_entropy_change(q_J, T_K):
'''Calculate the entropy change for a reversible isothermal process.
Inputs:
q_J: heat transferred reversibly in joules, float
T_K: absolute temperature in Kelvin, float
Output: entropy change in J/K, float
'''
delta_S = q_J / T_K
return delta_S | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def entropy_change_iron_block(q_kJ, T_C):
'''Calculate the change in entropy of the iron block.
Inputs:
q_kJ: heat transferred in kilojoules, float
T_C: temperature of the iron block in degrees Celsius, float
Output: change in entropy in J/K, float
'''
T_K = convert_temperature(T_C)
q_J ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def calculate_pressure_change(n, V, T1, T2, b, R):
'''Calculate the change in pressure for a van der Waals gas at constant volume.
Inputs:
n: amount of substance in moles, float
V: volume in cubic meters, float
T1: initial temperature in Kelvin, float
T2: final temperature in Kelvin, float
b... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_delta_pV(delta_p, V):
'''Calculate the change in the pV product at constant volume.
Inputs:
delta_p: change in pressure in Pascals, float
V: volume in cubic meters, float
Output:
delta_pV: change in pV product in Joules, float
'''
delta_pV = delta_p * V
return delta_pV | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_delta_H(q_V, delta_pV):
'''Calculate the change in enthalpy in kilojoules.
Inputs:
q_V: heat supplied at constant volume in Joules, float
delta_pV: change in pV product in Joules, float
Output:
delta_H: change in enthalpy in kilojoules, float
'''
delta_H = (q_V + delta_pV) ... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def enthalpy_change_vdw(n, V, T1, T2, q_V, b, R):
'''Calculate the change in enthalpy for a van der Waals gas heated at constant volume.
Inputs:
n: amount of substance in moles, float
V: volume in cubic meters, float
T1: initial temperature in Kelvin, float
T2: final temperature in Kelvin, float... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_joule_thomson_coefficient(dH_dp_T, Cp_m):
'''Compute the Joule-Thomson coefficient.
Inputs:
dH_dp_T: isothermal Joule-Thomson coefficient in J MPa^-1 mol^-1, float
Cp_m: molar heat capacity at constant pressure in J K^-1 mol^-1, float
Output:
mu: Joule-Thomson coefficient in K MPa^-1... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def solve_problem(dH_dp_T, Cp_m):
'''Solve for the Joule-Thomson coefficient of refrigerant 123.
Inputs:
dH_dp_T: isothermal Joule-Thomson coefficient in J MPa^-1 mol^-1, float
Cp_m: molar heat capacity at constant pressure in J K^-1 mol^-1, float
Output:
mu: Joule-Thomson coefficient in K MPa^-... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def compute_perfect_molar_volume(T, P, R):
'''Calculate the perfect gas molar volume.
Inputs:
T: temperature in Kelvin, float
P: pressure in atm, float
R: universal gas constant, float
Outputs:
perfect_molar_volume: ideal molar volume, float
'''
if P == 0.0:
if T == 0.0:
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def compute_actual_molar_volume(perfect_molar_volume, reduction_percentage):
'''Calculate the actual molar volume given the perfect molar volume and reduction percentage.
Inputs:
perfect_molar_volume: ideal molar volume, float
reduction_percentage: percentage by which the actual volume is smaller, float... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_gas_molar_volume(T, P, reduction_percentage):
'''Calculate the actual molar volume of the gas.
Inputs:
T: temperature in Kelvin, float
P: pressure in atm, float
reduction_percentage: percentage by which the actual volume is smaller, float
Outputs:
final_molar_volume: actual mol... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def calculate_pressure_change(p_initial, p_final):
'''Calculate the change in pressure during expansion.
Inputs:
p_initial: initial pressure in bar, float
p_final: final pressure in bar, float
Output:
delta_p: change in pressure in bar, float
'''
delta_p = float(p_final - p_initial)
... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def calculate_temperature_change(delta_p, mu):
'''Calculate the temperature change using the Joule-Thomson coefficient.
Inputs:
delta_p: change in pressure in bar, float
mu: Joule-Thomson coefficient in K/bar, float
Output:
delta_t: temperature change in Kelvin, float
'''
delta_t = float... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to ca... | def adiabatic_expansion_temp_change(n_moles, p_initial, p_final, t_initial, mu):
'''Compute the temperature change during adiabatic expansion.
Inputs:
n_moles: amount of the refrigerant in moles, float
p_initial: initial pressure in bar, float
p_final: final pressure in bar, float
t_initial: ini... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
NEXT STEP - PROBLEM ... | def convert_celsius_to_kelvin(T_hot_C, T_cold_C):
'''Convert temperatures from Celsius to Kelvin.
Inputs:
T_hot_C: Temperature of the hot reservoir in degrees Celsius, float
T_cold_C: Temperature of the cold reservoir in degrees Celsius, float
Outputs:
T_hot_K: Temperature of the hot reservoir i... | |
PROBLEM DESCRIPTION:
You will be provided with the main description of the problem, previous steps, and the next step. Your task will be to generate the disciplinary knowledge necessary for solving the next step and then develop a Python solution focused on this step.
PREVIOUS STEPS DESCRIPTION:
Write a function to co... | def calculate_carnot_efficiency(T_hot_K, T_cold_K):
'''Calculate the Carnot efficiency using absolute temperatures.
Inputs:
T_hot_K: Temperature of the hot reservoir in Kelvin, float
T_cold_K: Temperature of the cold reservoir in Kelvin, float
Outputs:
efficiency: The Carnot efficiency, float
... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 180