// Numbas version: finer_feedback_settings {"name": "Calculating Heating Degree Days", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Calculating Heating Degree Days", "tags": [], "metadata": {"description": "", "licence": "None specified"}, "statement": "
A building has a base temperature of {base_temp}°C. Below is the recorded temperature data for a given day in 6 hour intervals:
\n00:00 - 06:00 → {temp_1}°C
06:00 - 12:00 → {temp_2}°C
12:00 - 18:00 → {temp_3}°C
18:00 - 00:00 → {temp_4}°C
Calculate the total heating degree days for the day.
\n\n", "advice": "Using the heating degree day (HDD) formula:
\nHDD = (Base Temperature−Outside Temperature)×Time Fraction
\n\nHDD = ({base_temp}°C - {temp_1}°C × 6/24) + ({base_temp}°C - {temp_2}°C × 6/24) + ({base_temp}°C - {temp_3}°C × 6/24) + ({base_temp}°C - {temp_4}°C × 6/24)
\n\nHDD = ({base_temp - temp_1}°C × 0.25) + ({base_temp - temp_2}°C × 0.25) + ({base_temp - temp_3}°C × 0.25) + ({base_temp - temp_4}°C × 0.25)
\n\nRemember to not include temperatures that exceed our base temperature.
\nHDD = ({dd1/0.25} × 0.25) + ({dd2/0.25} × 0.25) + ({dd3/0.25} × 0.25) + ({dd4/0.25} × 0.25)
\nHDD = {dd1} + {dd2} + {dd3} + {dd4}
\nHDD = {dd1+dd2+dd3+dd4}
", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"temp_1": {"name": "temp_1", "group": "Ungrouped variables", "definition": "random(base_temp - 3 .. base_temp + 1#0.5)", "description": "Temperature for the first 6 hour period
", "templateType": "randrange", "can_override": false}, "temp_2": {"name": "temp_2", "group": "Ungrouped variables", "definition": "random(base_temp - 3 .. base_temp + 1#0.5)", "description": "", "templateType": "randrange", "can_override": false}, "temp_3": {"name": "temp_3", "group": "Ungrouped variables", "definition": "random(base_temp - 3 .. base_temp + 1#0.5)", "description": "", "templateType": "randrange", "can_override": false}, "temp_4": {"name": "temp_4", "group": "Ungrouped variables", "definition": "random(base_temp - 3 .. base_temp + 1#0.5)", "description": "", "templateType": "randrange", "can_override": false}, "base_temp": {"name": "base_temp", "group": "Ungrouped variables", "definition": "random(17 .. 20#1)", "description": "The building's base temperature
", "templateType": "randrange", "can_override": false}, "dd1": {"name": "dd1", "group": "Ungrouped variables", "definition": "max((base_temp-temp_1)*0.25,0)", "description": "Degree day for the 6 hour period.
", "templateType": "anything", "can_override": false}, "dd2": {"name": "dd2", "group": "Ungrouped variables", "definition": "max((base_temp-temp_2)*0.25,0)", "description": "", "templateType": "anything", "can_override": false}, "dd3": {"name": "dd3", "group": "Ungrouped variables", "definition": "max((base_temp-temp_3)*0.25,0)", "description": "", "templateType": "anything", "can_override": false}, "dd4": {"name": "dd4", "group": "Ungrouped variables", "definition": "max((base_temp-temp_4)*0.25,0)", "description": "", "templateType": "anything", "can_override": false}, "total_hdd": {"name": "total_hdd", "group": "Ungrouped variables", "definition": "dd1+dd2+dd3+dd4", "description": "Variable to store the total heating degree days for the entire period
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["temp_1", "temp_2", "temp_3", "temp_4", "base_temp", "dd1", "dd2", "dd3", "dd4", "total_hdd"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "total_hdd", "maxValue": "total_hdd", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Simon Stuttaford", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/26443/"}], "resources": []}]}], "contributors": [{"name": "Simon Stuttaford", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/26443/"}]}