import math
# Given constants
D0 = 7.85e-5 # m^2/s
Q_d = 3.63 # eV/atom
R = 8.314 # J/(mol·K)
eV_to_J = 1.602e-19 # Conversion factor: 1 eV = 1.602e-19 J
Q_d_J = Q_d * eV_to_J # Convert activation energy to Joules
T1 = 1175 + 273 # Temperature in Kelvin for 1175°C
T2 = 925 + 273 # Temperature in Kelvin for 925°C
delta_x = 2.35e-6 # Depth in meters (2.35 μm)
t1_hours = 2 # Time at T1 in hours
t1_seconds = t1_hours * 3600 # Convert hours to seconds
# Function to calculate diffusion coefficient
def diffusion_coefficient(D0, Q_d, R, T):
return D0 * math.exp(-Q_d / (R * T))
# Calculate D1 at T1
D1 = diffusion_coefficient(D0, Q_d_J, R, T1)
# Calculate D2 at T2
D2 = diffusion_coefficient(D0, Q_d_J, R, T2)
# Calculate t2 at T2 using the diffusion depth formula: delta_x = sqrt(2 * D * t)
# Rearrange to solve for t: t = (delta_x^2) / (2 * D)
t2_seconds = (delta_x**2) / (2 * D2)
t2_hours = t2_seconds / 3600 # Convert seconds to hours
D1, D2, t2_hours
aW1wb3J0IG1hdGgKCiMgR2l2ZW4gY29uc3RhbnRzCkQwID0gNy44NWUtNSAgIyBtXjIvcwpRX2QgPSAzLjYzICAjIGVWL2F0b20KUiA9IDguMzE0ICAjIEovKG1vbMK3SykKZVZfdG9fSiA9IDEuNjAyZS0xOSAgIyBDb252ZXJzaW9uIGZhY3RvcjogMSBlViA9IDEuNjAyZS0xOSBKClFfZF9KID0gUV9kICogZVZfdG9fSiAgIyBDb252ZXJ0IGFjdGl2YXRpb24gZW5lcmd5IHRvIEpvdWxlcwpUMSA9IDExNzUgKyAyNzMgICMgVGVtcGVyYXR1cmUgaW4gS2VsdmluIGZvciAxMTc1wrBDClQyID0gOTI1ICsgMjczICAjIFRlbXBlcmF0dXJlIGluIEtlbHZpbiBmb3IgOTI1wrBDCmRlbHRhX3ggPSAyLjM1ZS02ICAjIERlcHRoIGluIG1ldGVycyAoMi4zNSDOvG0pCnQxX2h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