// Numbas version: finer_feedback_settings {"name": "Chemical Thermodynamics: Gibbs Free Energy of Mixing", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Chemical Thermodynamics: Gibbs Free Energy of Mixing", "tags": [], "metadata": {"description": "
Public
", "licence": "Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International"}, "statement": "", "advice": "The Gibbs free energy change from the mixing of ideal gases is given by:
\n$\\mathrm{\\Delta G_{mix} = nRT\\sum_i x_i ln(x_i)}$ ,
\nwhere $\\mathrm{n}$ is the total number of moles of gas being mixed; $\\mathrm{R=8.314\\space J\\space K^{-1}\\space mol^{-1}}$ is the universal gas constant; $\\mathrm{T}$ is the temperature of the gases, in $\\mathrm{K}$; and $\\mathrm{x_i}$ is the mole fraction of the $\\mathrm{i^{th}}$ gas in the mixture. The $\\mathrm{\\sum_i}$ indicates that we calculate its following term for each gas individually, then sum them all up.
\n\nTo use this formula for our situation, we must first calculate the mole fractions for each of our two gases. Recall that mole fraction is given by the number of moles of our specific component, divided by the total number of moles of all components:
\n$\\mathrm{x_i=\\frac{n_i}{n_{tot}}}$ .
\n\nFor our situation, we are given the number of moles of hydrogen and nitrogen, $\\mathrm{n_{_{H_2}}=\\var{nh}\\space mol}$ and $\\mathrm{n_{_{N_2}}=\\var{nn}\\space mol}$, so:
\n$\\mathrm{x_{_{H_2}}=\\frac{n_{_{H_2}}}{n_{_{H_2}}+n_{_{N_2}}}=\\frac{\\var{nh}}{\\var{nh}+\\var{nn}}=\\var{siground(xh,3)}}$ ,
\n$\\mathrm{x_{_{N_2}}=\\frac{n_{_{N_2}}}{n_{_{N_2}}+n_{_{H_2}}}=\\frac{\\var{nn}}{\\var{nn}+\\var{nh}}=\\var{siground(xn,3)}}$ .
\nAlso, we can sum our individual mole numbers to find the total number of moles in the mixture, $\\mathrm{n=\\var{n}\\space mol}$ .
\n\nWe are additionally given the temperature of the gases, $\\mathrm{T=\\var{temp}\\space K}$, so we can now use our original equation:
\n$\\mathrm{\\Delta G_{mix} = nRT\\sum_i x_i ln(x_i)=nRT[x_{_{H_2}}ln(x_{_{H_2}})+x_{_{N_2}}ln(x_{_{N_2}})]}$
\n$\\mathrm{\\Rightarrow\\space\\space\\space \\Delta G_{mix} =\\var{n}\\times8.314\\times\\var{temp}\\times([\\var{siground(xh,3)}\\times ln(\\var{siground(xh,3)})]+[\\var{siground(xn,3)}\\times ln(\\var{siground(xn,3)})])=\\var{dpformat(gibbs,0)}\\space J}$ .
\n\nTo quote our answer in the units asked for, we divide by one thousand to obtain:
\n$\\mathrm{\\Delta G_{mix}=\\var{sigformat(g,3)}\\space kJ}$ .
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"nh": {"name": "nh", "group": "Ungrouped variables", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "nn": {"name": "nn", "group": "Ungrouped variables", "definition": "nh*rand", "description": "", "templateType": "anything", "can_override": false}, "rand": {"name": "rand", "group": "Ungrouped variables", "definition": "random(1 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "xh": {"name": "xh", "group": "Ungrouped variables", "definition": "nh/(nh+nn)", "description": "", "templateType": "anything", "can_override": false}, "xn": {"name": "xn", "group": "Ungrouped variables", "definition": "nn/(nh+nn)", "description": "", "templateType": "anything", "can_override": false}, "gibbs": {"name": "gibbs", "group": "Ungrouped variables", "definition": "(nh*ln(xh)*temp*8.314)+(nn*ln(xn)*temp*8.314)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "gibbs/1000", "description": "", "templateType": "anything", "can_override": false}, "temp": {"name": "temp", "group": "Ungrouped variables", "definition": "random(250 .. 350#1)", "description": "", "templateType": "randrange", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "nh+nn", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["temp", "nh", "rand", "nn", "xh", "xn", "gibbs", "g", "n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "At $\\mathrm{\\var{temp}\\space K}$, $\\mathrm{\\var{nh} \\space moles}$ of $\\mathrm{H_2}$ at $\\mathrm{2\\space atm}$ and $\\mathrm{\\var{nn} \\space moles}$ of $\\mathrm{N_2}$ at $\\mathrm{2\\space atm}$ are mixed together at constant volume.
\n
What is the value of $\\mathrm{\\Delta G_{mixing}}$?
[[0]] $\\mathrm{kJ}$ .
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "g-(g/200)", "maxValue": "g+(g/200)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": "50", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en", "scientific"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Frances Docherty", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4059/"}, {"name": "Michael McFadden", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18132/"}], "resources": []}]}], "contributors": [{"name": "Frances Docherty", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4059/"}, {"name": "Michael McFadden", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18132/"}]}