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:
Write a function to co... | def compute_gibbs_energy_change(volume_m3, delta_p_pa):
'''Compute the change in Gibbs energy in kJ.
Inputs:
volume_m3: volume in m^3, float
delta_p_pa: change in pressure in Pa, float
Outputs:
delta_g_kj: change in Gibbs energy in kJ, float
'''
delta_g_kj = (volume_m3 * delta_p_pa) / 10... | |
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 estimate_gibbs_change_benzene(volume_dm3, p1_atm, p2_atm):
'''Estimate the change in Gibbs energy of benzene.
Inputs:
volume_dm3: initial volume of benzene in dm^3, float
p1_atm: initial pressure in atm, float
p2_atm: final pressure in atm, float
Outputs:
delta_g_kj: change in Gibbs ener... | |
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(mass_g, density_g_cm3):
'''Calculate the volume of the substance in cubic meters.
Inputs:
mass_g: mass of the substance in grams, float
density_g_cm3: mass density in g/cm^3, float
Output: volume in m^3, float
'''
if mass_g == 0:
return 0.0
volume_cm3 = mass_... | |
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_pressure_change(p1_atm, p2_atm):
'''Calculate the change in pressure in Pascals.
Inputs:
p1_atm: initial pressure in atm, float
p2_atm: final pressure in atm, float
Output: pressure change in Pa, float
'''
delta_p_pa = (p2_atm - p1_atm) * 101325.0
return delta_p_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 ca... | def calculate_gibbs_energy_change(volume_m3, delta_p_pa):
'''Calculate the change in Gibbs energy in kJ.
Inputs:
volume_m3: volume of the substance in m^3, float
delta_p_pa: change in pressure in Pa, float
Output: change in Gibbs energy in kJ, float
'''
if volume_m3 == 0 or delta_p_pa == 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 solve_problem(mass_g, density_g_cm3, p1_atm, p2_atm):
'''Calculate the change in Gibbs energy of ethanol when pressure is increased isothermally.
Inputs:
mass_g: mass of ethanol in grams, float
density_g_cm3: mass density of ethanol in g/cm^3, float
p1_atm: initial pressure in atm, float
p2_... | |
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_initial_volume(final_volume, volume_reduction):
'''Calculate the initial volume of the gas before compression.
Inputs:
final_volume: final volume of the gas, float
volume_reduction: reduction in volume during compression, float
Output:
initial_volume: initial volume of the gas, flo... | |
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_initial_pressure(final_pressure, final_volume, initial_volume):
'''Calculate the initial pressure of the gas using Boyle's Law.
Inputs:
final_pressure: final pressure of the gas, float
final_volume: final volume of the gas, float
initial_volume: initial volume of the gas, float
Out... | |
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_original_pressure(final_pressure, final_volume, volume_reduction):
'''Solve for the original pressure of the gas undergoing isothermal compression.
Inputs:
final_pressure: final pressure of the gas in bar, float
final_volume: final volume of the gas in dm^3, float
volume_reduction: reducti... | |
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(temp_celsius):
'''Convert temperature from Celsius to Kelvin.
Inputs:
temp_celsius: temperature in degrees Celsius, float
Output:
temp_kelvin: temperature in Kelvin, float
'''
temp_kelvin = temp_celsius + 273.15
return temp_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_molar_volume(volume_dm3, n_moles):
'''Compute the molar volume of the gas.
Inputs:
volume_dm3: total volume in dm^3, float
n_moles: amount of substance in moles, float
Output:
molar_volume: molar volume in dm^3/mol, float
'''
if n_moles == 0:
if volume_dm3 == 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 co... | def compute_vdw_pressure(molar_volume, temp_kelvin, a, b, R):
'''Compute the pressure using the van der Waals equation.
Inputs:
molar_volume: molar volume in dm^3/mol, float
temp_kelvin: absolute temperature in Kelvin, float
a: van der Waals constant a, float
b: van der Waals constant b, 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_problem(n_moles, volume_dm3, temp_celsius, a, b, R):
'''Calculate the pressure of Xenon gas using the van der Waals equation.
Inputs:
n_moles: amount of Xenon in moles, float
volume_dm3: volume of the container in dm^3, float
temp_celsius: temperature in degrees Celsius, float
a: van d... | |
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_initial_volume(final_volume, volume_reduction):
'''Calculate the initial volume of the gas before compression.
Inputs:
final_volume: final volume of the gas, float
volume_reduction: amount by which the volume was reduced, float
Output:
initial_volume: initial volume of the gas, flo... | |
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 apply_boyles_law(final_pressure, final_volume, initial_volume):
'''Calculate the initial pressure using Boyle's Law.
Inputs:
final_pressure: final pressure of the gas, float
final_volume: final volume of the gas, float
initial_volume: initial volume of the gas, float
Output:
initial_pres... | |
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 convert_pressure_bar_to_atm(pressure_bar):
'''Convert pressure from bar to atm.
Inputs:
pressure_bar: pressure in bar, float
Output:
pressure_atm: pressure in atm, float
'''
pressure_atm = pressure_bar / 1.01325
return pressure_atm | |
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_original_pressure(final_pressure_bar, final_volume_dm3, volume_reduction_dm3):
'''Calculate the original pressure of the gas in atm.
Inputs:
final_pressure_bar: final pressure of the gas in bar, float
final_volume_dm3: final volume of the gas in dm^3, float
volume_reduction_dm3: amount by ... | |
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_to_pa(pressure_MPa):
'''Convert pressure from MPa to Pa.
Inputs:
pressure_MPa : float
Pressure in Megapascals.
Outputs:
pressure_Pa : float
Pressure in Pascals.
'''
pressure_Pa = float(pressure_MPa) * 1e6
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_vdw_b(a, molar_volume, temperature, pressure_Pa):
'''Calculate the van der Waals constant b.
Inputs:
a : float
The van der Waals constant a in m^6 Pa mol^-2.
molar_volume : float
The molar volume in m^3 mol^-1.
temperature : float
The temperature in K.
press... | |
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_compression_factor(pressure_Pa, molar_volume, temperature):
'''Calculate the compression factor Z.
Inputs:
pressure_Pa : float
The pressure in Pa.
molar_volume : float
The molar volume in m^3 mol^-1.
temperature : float
The temperature in K.
Outputs:
Z :... | |
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_vdw_gas_properties(a, molar_volume, temperature, pressure_MPa):
'''Calculate the van der Waals constant b and the compression factor Z.
Inputs:
a : float
The van der Waals constant a in m^6 Pa mol^-2.
molar_volume : float
The molar volume in m^3 mol^-1.
temperature : 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_specific_volumes(densities):
'''Compute the specific volumes from densities.
Inputs:
densities: array of gas densities, list or numpy array of floats
Outputs:
specific_volumes: array of specific volumes, numpy array of floats
'''
densities_arr = np.array(densities, dtype=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 fit_charles_law_line(temperatures, specific_volumes):
'''Perform a linear fit of specific volume vs temperature.
Inputs:
temperatures: array of temperatures in Celsius, list or numpy array of floats
specific_volumes: array of specific volumes, list or numpy array of floats
Outputs:
slope: sl... | |
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_absolute_zero(slope, intercept):
'''Calculate absolute zero from the linear fit parameters.
Inputs:
slope: slope of the volume-temperature line, float
intercept: intercept of the volume-temperature line, float
Outputs:
absolute_zero: absolute zero temperature in Celsius, 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_absolute_zero(temperatures, densities):
'''Determine absolute zero from temperature and density data.
Inputs:
temperatures: array of temperatures in Celsius, list or numpy array of floats
densities: array of gas densities, list or numpy array of floats
Outputs:
absolute_zero: absolute ... | |
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_moles(mass, molar_mass):
'''Calculate the number of moles of a substance.
Inputs:
mass: mass of the sample in grams, float
molar_mass: molar mass of the substance in g/mol, float
Output:
moles: number of moles, float
'''
moles = mass / molar_mass
return moles | |
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_system_entropy_change(moles, volume_ratio, R):
'''Compute the entropy change of the system for an isothermal expansion.
Inputs:
moles: number of moles of the gas, float
volume_ratio: ratio of final volume to initial volume, float
R: ideal gas constant in J/(mol 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:
Write a function to ca... | def compute_surroundings_entropy_change(delta_S_sys):
'''Compute the entropy change of the surroundings for a reversible process.
Inputs:
delta_S_sys: entropy change of the system in J/K, float
Output:
delta_S_surr: entropy change of the surroundings in J/K, float
'''
delta_S_surr = -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 ca... | def total_entropy_change(mass, molar_mass, volume_ratio, R):
'''Compute the total entropy change for an isothermal reversible expansion.
Inputs:
mass: mass of the gas sample in grams, float
molar_mass: molar mass of the gas in g/mol, float
volume_ratio: ratio of final volume to initial 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:
NEXT STEP - PROBLEM ... | def compute_Cp_m(Cv_m):
'''Calculate the molar constant-pressure heat capacity.
Inputs:
Cv_m: molar constant-volume heat capacity in J/(K*mol), float
Outputs:
Cp_m: molar constant-pressure heat capacity in J/(K*mol), float
'''
R = 8.314
Cp_m = Cv_m + R
return Cp_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 compute_delta_H_Joules(n_moles, Cp_m, T_initial, T_final):
'''Calculate the change in enthalpy in Joules.
Inputs:
n_moles: amount of substance in moles, float
Cp_m: molar constant-pressure heat capacity in J/(K*mol), float
T_initial: initial temperature in Kelvin, float
T_final: final temper... | |
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_compression_enthalpy(n_moles, T_initial, T_final, Cv_m):
'''Calculate the change in enthalpy in kJ for the 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: 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 calculate_gibbs_change_j_mol(p_initial, p_final, temperature, r_const):
'''Calculate the change in molar Gibbs energy in J/mol.
Inputs:
p_initial: initial pressure, float
p_final: final pressure, float
temperature: temperature in Kelvin, float
r_const: universal gas constant in J/(K*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 convert_to_kj_mol(energy_j):
'''Convert energy from J/mol to kJ/mol.
Inputs:
energy_j: energy in J/mol, float
Output:
energy_kj: energy in kJ/mol, float
'''
energy_kj = energy_j / 1000.0
return energy_kj | |
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 molar_gibbs_energy_change(p_initial, p_final, temperature):
'''Calculate the change in molar Gibbs energy in kJ/mol for an isothermal process.
Inputs:
p_initial: initial pressure in atm, float
p_final: final pressure in atm, float
temperature: absolute temperature in Kelvin, 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 compute_volume_change_and_work(cross_section_cm2, distance_cm, p_ex_atm):
'''Compute the volume change and work done on the gas.
Inputs:
cross_section_cm2: cross-sectional area in cm^2, float
distance_cm: distance moved in cm, float
p_ex_atm: external pressure in atm, float
Outputs:
delt... | |
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(work_j, n_mol, cv_m, t1_c):
'''Compute the final temperature of the gas after adiabatic expansion.
Inputs:
work_j: work done on the gas in Joules, float
n_mol: amount of gas in moles, float
cv_m: molar heat capacity at constant volume in J/(K mol), float
t1_c: initi... | |
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_volumes(n_mol, t1_c, p1_atm, delta_v_m3):
'''Compute the initial and final volumes of the gas.
Inputs:
n_mol: amount of gas in moles, float
t1_c: initial temperature in Celsius, float
p1_atm: initial pressure in atm, float
delta_v_m3: volume change in m^3, float
Outputs:
v1_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 co... | def compute_entropy_change(n_mol, cv_m, t1_c, t2_k, v1_m3, v2_m3):
'''Compute the entropy change of the perfect gas.
Inputs:
n_mol: amount of gas in moles, float
cv_m: molar heat capacity at constant volume in J/(K mol), float
t1_c: initial temperature in Celsius, float
t2_k: final temperature 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 adiabatic_expansion_entropy(n_mol, t1_c, p1_atm, cross_section_cm2, p_ex_atm, distance_cm, cv_m):
'''Calculate the entropy change of a perfect gas undergoing adiabatic expansion.
Inputs:
n_mol: amount of gas in moles, float
t1_c: initial temperature in Celsius, float
p1_atm: initial pressure 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:
NEXT STEP - PROBLEM ... | def convert_units(mass_kg, t1_c, t2_c):
'''Convert mass to grams and temperatures to Kelvin.
Inputs:
mass_kg: mass in kilograms, float
t1_c: temperature 1 in Celsius, float
t2_c: temperature 2 in Celsius, float
Outputs:
mass_g: mass in grams, float
t1_k: temperature 1 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:
Write a function to co... | def compute_final_temperature(mass1_g, mass2_g, cs, t1_k, t2_k):
'''Calculate the final equilibrium temperature of the two blocks.
Inputs:
mass1_g: mass of block 1 in grams, float
mass2_g: mass of block 2 in grams, float
cs: specific heat capacity in J/(K*g), float
t1_k: initial temperature of 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 co... | def compute_total_enthalpy_change(mass1_g, mass2_g, cs, t1_k, t2_k, t_final_k):
'''Calculate the total enthalpy change of the system.
Inputs:
mass1_g: mass of block 1 in grams, float
mass2_g: mass of block 2 in grams, float
cs: specific heat capacity in J/(K*g), float
t1_k: initial temperature o... | |
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_enthalpy_change(mass_kg, t1_c, t2_c, cs):
'''Calculate the total enthalpy change when two copper blocks are placed in contact.
Inputs:
mass_kg: mass of each block in kilograms, float
t1_c: initial temperature of block 1 in Celsius, float
t2_c: initial temperature of block 2 in Celsius, flo... | |
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(mass_mg, molar_mass_g_mol):
'''Calculate the amount of substance in moles.
Inputs:
mass_mg: mass of the sample in milligrams, float
molar_mass_g_mol: molar mass of the substance in grams per mole, float
Output:
n_moles: amount of substance in moles, float
'''
n_moles ... | |
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_ideal_gas_pressure(n_moles, volume_dm3, temperature_k, R):
'''Calculate the pressure of an ideal gas.
Inputs:
n_moles: amount of substance in moles, float
volume_dm3: volume of the gas in cubic decimeters, float
temperature_k: temperature of the gas in Kelvin, float
R: ideal gas co... | |
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_neon_pressure(mass_mg, volume_dm3, temperature_k, molar_mass_g_mol, R):
'''Calculate the pressure of the neon gas sample.
Inputs:
mass_mg: mass of the neon sample in milligrams, float
volume_dm3: volume occupied by the gas in cubic decimeters, float
temperature_k: temperature of the gas 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:
NEXT STEP - PROBLEM ... | def convert_entropy_units(delta_S_J):
'''Convert entropy from J/(K*mol) to kJ/(K*mol).
Inputs:
delta_S_J: standard reaction entropy in J/(K*mol), float
Outputs:
delta_S_kJ: standard reaction entropy in kJ/(K*mol), float
'''
delta_S_kJ = float(delta_S_J) / 1000.0
return delta_S_kJ | |
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_gibbs_energy(T2, delta_H_ref, delta_S_kJ):
'''Compute the standard reaction Gibbs energy at T2.
Inputs:
T2: target temperature in Kelvin, float
delta_H_ref: standard reaction enthalpy in kJ/mol, float
delta_S_kJ: standard reaction entropy in kJ/(K*mol), float
Outputs:
delta_G_T2:... | |
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 estimate_gibbs_energy_at_T(T1, T2, delta_H_ref, delta_S_ref):
'''Estimate the standard reaction Gibbs energy at T2.
Inputs:
T1: reference temperature in Kelvin, float
T2: target temperature in Kelvin, float
delta_H_ref: standard reaction enthalpy at T1 in kJ/mol, float
delta_S_ref: standard ... | |
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_units(pressure_atm, B_cm3_mol, C_cm6_mol2):
'''Convert pressure and virial coefficients to SI units.
Inputs:
pressure_atm: pressure in atm, float
B_cm3_mol: second virial coefficient in cm^3/mol, float
C_cm6_mol2: third virial coefficient in cm^6/mol^2, float
Outputs:
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 compute_molar_volume(pressure_pa, temperature, B_m3_mol, C_m6_mol2):
'''Compute the molar volume of the gas by solving the cubic equation of state.
Inputs:
pressure_pa: pressure in Pa, float
temperature: temperature in K, float
B_m3_mol: second virial coefficient in m^3/mol, float
C_m6_mol2:... | |
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_fugacity_coefficient(pressure_pa, temperature, V_m, B_m3_mol, C_m6_mol2):
'''Compute the fugacity coefficient of the gas.
Inputs:
pressure_pa: pressure in Pa, float
temperature: temperature in K, float
V_m: molar volume in m^3/mol, float
B_m3_mol: second virial coefficient in m^3/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:
Write a function to co... | def solve_problem(pressure_atm, temperature, B_cm3_mol, C_cm6_mol2):
'''Estimate the fugacity of the gas in atm.
Inputs:
pressure_atm: pressure of the gas in atm, float
temperature: temperature of the gas in K, float
B_cm3_mol: second virial coefficient in cm^3/mol, float
C_cm6_mol2: third viria... | |
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(T1_C, T2_C):
'''Convert temperatures from Celsius to Kelvin.
Inputs:
T1_C : float
Initial temperature in degrees Celsius.
T2_C : float
Final temperature in degrees Celsius.
Outputs:
T1_K, T2_K : tuple of floats
Initial and final temperatures in Kel... | |
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_temperature(n, cp_m, T1_K, T2_K):
'''Calculate the entropy change due to temperature change at constant pressure.
Inputs:
n : float
Amount of substance in moles.
cp_m : float
Molar heat capacity at constant pressure in J/(K*mol).
T1_K : float
Initial temper... | |
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_pressure(n, p1, p2):
'''Calculate the entropy change due to pressure change at constant temperature.
Inputs:
n : float
Amount of substance in moles.
p1 : float
Initial pressure.
p2 : float
Final pressure.
Outputs:
delta_S_p : float
Entropy c... | |
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 total_entropy_change(n, cp_m, T1_C, p1_atm, T2_C, p2_atm):
'''Calculate the total entropy change of the perfect gas.
Inputs:
n : float
Amount of substance in moles.
cp_m : float
Molar heat capacity at constant pressure in J/(K*mol).
T1_C : float
Initial temperature in deg... | |
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_parameters(a_atm, b_L):
'''Convert van der Waals parameters to SI units.
Inputs:
a_atm: parameter a in L^2 atm mol^-2, float
b_L: parameter b in L mol^-1, float
Outputs:
a_si: parameter a in Pa m^6 mol^-2, float
b_si: parameter b in m^3 mol^-1, float
'''
a_si = 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 compute_boyle_temperature(a_si, b_si):
'''Compute the Boyle temperature from SI van der Waals parameters.
Inputs:
a_si: parameter a in Pa m^6 mol^-2, float
b_si: parameter b in m^3 mol^-1, float
Outputs:
T_B: Boyle temperature in Kelvin, float
'''
R = 8.31446
if b_si == 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 co... | def boyle_temperature_of_chlorine(a_atm, b_L):
'''Calculate the Boyle temperature of chlorine.
Inputs:
a_atm: parameter a in L^2 atm mol^-2, float
b_L: parameter b in L mol^-1, float
Outputs:
T_B: Boyle temperature in Kelvin, float
'''
a_si, b_si = convert_vdw_parameters(a_atm, b_L)
... | |
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_volume_change(area_cm2, distance_cm):
'''Compute the change in volume in cubic meters.
Inputs:
area_cm2: cross-sectional area in square centimeters, float
distance_cm: distance the piston is pushed in centimeters, float
Output:
volume_change_m3: change in volume in cubic meters, floa... | |
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_pressure(pressure_atm, atm_to_pa):
'''Convert pressure from atmospheres to Pascals.
Inputs:
pressure_atm: external pressure in atmospheres, float
atm_to_pa: conversion factor from atm to Pa, float
Output:
pressure_pa: external pressure in Pascals, float
'''
pressure_pa = floa... | |
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_work(pressure_pa, volume_change_m3):
'''Calculate the expansion work done by the system.
Inputs:
pressure_pa: external pressure in Pascals, float
volume_change_m3: change in volume in cubic meters, float
Output:
work_joules: work done by the system in Joules, float
'''
work_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_total_work(area_cm2, distance_cm, pressure_atm, atm_to_pa):
'''Calculate the total work done by the system during expansion.
Inputs:
area_cm2: cross-sectional area in square centimeters, float
distance_cm: distance the piston is pushed in centimeters, float
pressure_atm: external press... | |
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 prepare_thermodynamic_state(mass_g, molar_mass, temp_celsius):
'''Prepare the thermodynamic state variables by calculating moles and absolute temperature.
Inputs:
mass_g: mass of the gas in grams, float
molar_mass: molar mass of the gas in grams per mole, float
temp_celsius: temperature in degre... | |
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 pr... | def calculate_ideal_gas_pressure(n_moles, volume_dm3, temp_kelvin, R):
'''Compute the pressure of an ideal gas.
Inputs:
n_moles: amount of substance in moles, float
volume_dm3: volume of the vessel in cubic decimeters, float
temp_kelvin: absolute temperature in Kelvin, float
R: ideal gas constan... | |
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 pr... | def solve_xenon_pressure(mass_g, volume_dm3, temp_celsius, molar_mass, R):
'''Solve for the pressure exerted by the Xenon gas.
Inputs:
mass_g: mass of the xenon gas in grams, float
volume_dm3: volume of the vessel in cubic decimeters, float
temp_celsius: temperature of the gas in degrees Celsius, 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:
NEXT STEP - PROBLEM ... | def compute_proportionality_constant(pressure_ref, temperature_ref):
'''Compute the proportionality constant for a constant-volume gas thermometer.
Inputs:
pressure_ref: pressure at the reference state, float
temperature_ref: temperature at the reference state, float
Output: proportionality constant... | |
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_pressure_change(prop_constant, delta_temperature):
'''Compute the change in pressure for a given temperature change.
Inputs:
prop_constant: proportionality constant of the thermometer, float
delta_temperature: change in temperature, float
Output: change in pressure, float
'''
if ... | |
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_pressure_change(pressure_ref, temperature_ref, delta_temperature):
'''Solve for the pressure change given a temperature change and reference conditions.
Inputs:
pressure_ref: pressure at the reference state, float
temperature_ref: temperature at the reference state, float
delta_temperature... | |
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_volume_conversion_factor(length_factor):
'''Compute the volume conversion factor from a linear length conversion factor.
Inputs:
length_factor: conversion factor from the given length unit to meters, float
Output:
volume_factor: conversion factor for volume to cubic meters, 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 convert_van_der_waals_b(b_value, volume_factor):
'''Convert the van der Waals parameter b to SI units using the volume conversion factor.
Inputs:
b_value: van der Waals parameter b in original units, float
volume_factor: conversion factor for volume, float
Output:
b_value_si: van der Waals p... | |
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 express_vdw_b_in_si(b_value, length_factor):
'''Express the van der Waals parameter b in SI base units.
Inputs:
b_value: van der Waals parameter b in dm^3/mol, float
length_factor: conversion factor from dm to m, float
Output:
b_value_si: van der Waals parameter b in m^3/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:
NEXT STEP - PROBLEM ... | def compute_total_heat_capacity(heat_supplied, delta_T):
'''Compute the total heat capacity at constant pressure.
Inputs:
heat_supplied: energy supplied as heat in Joules, float
delta_T: increase in temperature in Kelvin, float
Outputs:
total_heat_capacity: total heat capacity in J/K, 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 compute_molar_heat_capacity(total_heat_capacity, n_moles):
'''Compute the molar heat capacity from total heat capacity and moles.
Inputs:
total_heat_capacity: total heat capacity in J/K, float
n_moles: amount of substance in moles, float
Outputs:
molar_heat_capacity: molar heat capacity in 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 ca... | def molar_heat_capacity_argon(heat_supplied, n_moles, delta_T):
'''Calculate the molar heat capacity of Argon gas given heat, moles, and temperature change.
Inputs:
heat_supplied: energy supplied as heat in Joules, float
n_moles: amount of substance in moles, float
delta_T: increase in temperature 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 calculate_moles(mass, molar_mass):
'''Calculate the number of moles of a substance.
Inputs:
mass: mass of the sample in grams, float
molar_mass: molar mass of the substance in g/mol, float
Output:
n_moles: amount of substance in moles, float
'''
n_moles = float(mass) / float(molar_ma... | |
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_system(n_moles, volume_ratio, R):
'''Calculate the entropy change of the system for an isothermal expansion.
Inputs:
n_moles: amount of substance in moles, float
volume_ratio: ratio of final volume to initial volume (V_f / V_i), float
R: ideal gas constant in J/(K*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 entropy_change_surroundings(n_moles, temperature, p_initial, volume_ratio, p_ex, R):
'''Calculate the entropy change of the surroundings for an expansion against constant external pressure.
Inputs:
n_moles: amount of substance in moles, float
temperature: absolute temperature in Kelvin, float
p_... | |
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 total_entropy_change(mass, molar_mass, temperature, p_initial, volume_ratio, p_ex, R):
'''Calculate the total entropy change for the isothermal expansion of a perfect gas.
Inputs:
mass: mass of the gas sample in grams, float
molar_mass: molar mass of the gas in g/mol, float
temperature: absolute... | |
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_energy_to_joules(heat_production_mj):
'''Convert heat energy from Megajoules to Joules.
Inputs:
heat_production_mj: heat energy in Megajoules, float
Output:
heat_production_j: heat energy in Joules, float
'''
heat_production_j = heat_production_mj * 1e6
return heat_production... | |
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_moles_water(heat_production_j, enthalpy_vap_j_mol):
'''Compute the number of moles of water evaporated to dissipate the given heat.
Inputs:
heat_production_j: total heat energy to dissipate in Joules, float
enthalpy_vap_j_mol: enthalpy of vaporization of water in J/mol, 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:
Write a function to co... | def compute_mass_water(moles_water, molar_mass_g_mol):
'''Compute the mass of water in kilograms given the number of moles.
Inputs:
moles_water: amount of water in moles, float
molar_mass_g_mol: molar mass of water in g/mol, float
Output:
mass_kg: mass of water in kilograms, float
'''
ma... | |
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_evaporation_mass(heat_production_mj, enthalpy_vap_j_mol, molar_mass_g_mol):
'''Calculate the mass of water that must be evaporated to maintain constant temperature.
Inputs:
heat_production_mj: daily metabolic heat production in MJ, float
enthalpy_vap_j_mol: standard enthalpy of vaporization of... | |
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_gibbs_energy_change(T, a, b):
'''Compute the change in Gibbs energy at a given temperature.
Inputs:
T: absolute temperature in Kelvin, float
a: constant term in the Gibbs energy expression in Joules, float
b: temperature coefficient in the Gibbs energy expression in J/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:
Write a function to co... | def compute_entropy_change(a, b):
'''Compute the entropy change of the process using the temperature dependence of Gibbs energy.
Inputs:
a: constant term in the Gibbs energy expression in Joules, float
b: temperature coefficient in the Gibbs energy expression in J/K, float
Output:
delta_S: entro... | |
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_entropy_change(a, b):
'''Calculate the value of delta S for the process.
Inputs:
a: constant term in the Gibbs energy expression in Joules, float
b: temperature coefficient in the Gibbs energy expression in J/K, float
Output:
delta_S: entropy change of the process in J/K, 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_volume_change(area_cm2, distance_cm):
'''Calculate the change in volume in cubic meters.
Inputs:
area_cm2: cross-sectional area in cm^2, float
distance_cm: distance moved by the piston in cm, float
Output:
delta_v_m3: change in volume in m^3, float
'''
delta_v_m3 = float(ar... | |
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_work_done(p_ex_atm, delta_v_m3):
'''Calculate the work done on the gas in Joules.
Inputs:
p_ex_atm: external pressure in atm, float
delta_v_m3: change in volume in m^3, float
Output:
work_j: work done in Joules, float
'''
p_ex_pa = p_ex_atm * 101325
work_j = -p_ex_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 ca... | def calculate_temperature_change(work_j, n_mol, cv_m):
'''Calculate the change in temperature of the gas.
Inputs:
work_j: work done on the gas in Joules, float
n_mol: amount of gas in moles, float
cv_m: molar heat capacity at constant volume in J/(K mol), float
Output:
delta_t: change in tem... | |
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_adiabatic_expansion(n_mol, area_cm2, distance_cm, p_ex_atm, cv_m):
'''Calculate the temperature change for the adiabatic expansion of a perfect gas.
Inputs:
n_mol: amount of gas in moles, float
area_cm2: cross-sectional area of the cylinder in cm^2, float
distance_cm: distance the piston 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 convert_celsius_to_kelvin(temp_c):
'''Convert temperature from Celsius to Kelvin.
Inputs:
temp_c: temperature in degrees Celsius, float
Output:
temp_k: temperature in Kelvin, float
'''
temp_k = temp_c + 273.15
return temp_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 compute_isochoric_constant(pressure, temp_k):
'''Compute the ratio of pressure to temperature for a constant-volume process.
Inputs:
pressure: pressure of the gas, float
temp_k: absolute temperature of the gas in Kelvin, float
Output:
k_constant: the ratio of pressure to temperature, 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 compute_target_pressure(k_constant, target_temp_k):
'''Calculate the pressure at a target temperature given the isochoric constant.
Inputs:
k_constant: the ratio of pressure to temperature (P/T), float
target_temp_k: target absolute temperature in Kelvin, float
Output:
target_pressure: press... | |
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 thermometer_pressure(p_triple, t_triple_k, t_target_c):
'''Determine the pressure of a constant-volume gas thermometer at a target Celsius temperature.
Inputs:
p_triple: pressure at the triple point of water in kPa, float
t_triple_k: absolute temperature of the triple point of water 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 sum_enthalpies_of_products(delta_H_f_NH3, delta_H_f_SO2):
'''Calculate the total standard enthalpy of formation of the products.
Inputs:
delta_H_f_NH3: standard enthalpy of formation of NH3 in kJ/mol, float
delta_H_f_SO2: standard enthalpy of formation of SO2 in kJ/mol, float
Output:
total_H... | |
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_of_formation_complex(delta_H_decomp, total_H_f_products):
'''Calculate the standard enthalpy of formation of the complex.
Inputs:
delta_H_decomp: standard enthalpy of decomposition of the complex in kJ/mol, float
total_H_f_products: total standard enthalpy of formation of the prod... | |
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(delta_H_decomp, delta_H_f_NH3, delta_H_f_SO2):
'''Calculate the standard enthalpy of formation of H3NSO2.
Inputs:
delta_H_decomp: standard enthalpy of decomposition of the complex in kJ/mol, float
delta_H_f_NH3: standard enthalpy of formation of NH3 in kJ/mol, float
delta_H_f_SO2: ... | |
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_density(density_g_cm3):
'''Convert density from g/cm^3 to kg/m^3.
Inputs:
density_g_cm3: density of the fluid in g/cm^3, float
Output:
density_kg_m3: density of the fluid in kg/m^3, float
'''
density_kg_m3 = density_g_cm3 * 1000.0
return density_kg_m3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.