// Numbas version: exam_results_page_options {"navigation": {"allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "reverse": true, "showfrontpage": true, "browse": true, "onleave": {"message": "", "action": "none"}}, "percentPass": "50", "showstudentname": true, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Basic calculation of 3D stresses.

"}, "feedback": {"showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "feedbackmessages": [], "intro": "", "advicethreshold": 0, "showactualmark": true}, "showQuestionGroupNames": true, "duration": 0, "name": "3D Stress", "timing": {"timeout": {"message": "", "action": "none"}, "allowPause": true, "timedwarning": {"message": "", "action": "none"}}, "question_groups": [{"name": "Basic Calculation - 3D Stresses", "pickQuestions": 1, "pickingStrategy": "random-subset", "questions": [{"name": "Sign Post - von Mises Stress at Base", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Francis Franklin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1887/"}], "tags": [], "metadata": {"description": "

Calculate the von Mises stress at the base of a post subject to axial compression, bending and torsion.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

The principal stresses and maximum shear stress, and the von Mises stress, can all be determined from the 3D stress matrix and its invariants, i.e., if:

\n

\\[\\sigma=\\begin{pmatrix}\\sigma_x & \\tau_{xy} & \\tau_{zx} \\\\ \\tau_{xy} & \\sigma_y & \\tau_{yz} \\\\ \\tau_{zx} & \\tau_{yz} & \\sigma_z\\end{pmatrix}\\]

\n

then the three invariants are:

\n
    \n
  1. The sum of the diagonal elements (the 'trace'): $I_1 = \\sigma_x + \\sigma_y + \\sigma_z$ [Units: Pa].
  2. \n
  3. An expression that is a sum of sub-determinants: $I_2 = \\sigma_x \\sigma_y + \\sigma_y \\sigma_z + \\sigma_z \\sigma_x - \\tau_{xy}^2 - \\tau_{yz}^2 - \\tau_{zx}^2$ [Units: Pa$^2$].
  4. \n
  5. The determinant: $I_3 = \\sigma_x \\sigma_y \\sigma_z + 2 \\tau_{xy} \\tau_{yz} \\tau_{zx} - \\sigma_x \\tau_{yz}^2 -\\sigma_y \\tau_{zx}^2 - \\sigma_z \\tau_{xy}^2$ [Units: Pa$^3$].
  6. \n
\n

From these we can easily calculate:

\n
    \n
  1. The mean ('hydrostatic') stress, which is the sum of the diagonal elements divided by three: $\\sigma_\\text{mean} = I_1 / 3$ [Units: Pa].
  2. \n
  3. The second deviatoric stress invariant: $J_2 = I_2 - I_1^2 / 3$ [Units: Pa$^2$].
  4. \n
  5. The von Mises ('equivalent') stress: $\\sigma_V = \\sqrt{-3J_2}$ [Units: Pa].
  6. \n
\n

The principal stresses can be found by solving the eigenvalue/eigenvector matrix problem (the eigenvalues are the principal stresses), or by finding the three roots (the three roots - $\\lambda_1$, $\\lambda_2$, $\\lambda_3$ - are the principal stresses) of the equation:

\n

\\[\\lambda^3 - I_1 \\lambda^2 + I_2 \\lambda - I_3 = 0\\]

\n

Note A. If the three principal stresses [Units: Pa] are different (which is usually but not always the case):

\n
    \n
  1. The maximum principal stress, $\\sigma_\\text{max}$, is the most tensile (most positive or least negative) of the principal stresses.
  2. \n
  3. The minimum principal stress, $\\sigma_\\text{min}$, is the most compressive (most negative or least positive) of the principal stresses.
  4. \n
  5. The middle principal stress, $\\sigma_\\text{middle}$, is in between the other two, so that $\\sigma_\\text{min} \\le \\sigma_\\text{middle} \\le \\sigma_\\text{max}$.
  6. \n
\n

Note B: 1 MPa = $10^6$ Pa = $10^6$ N/m$^2$ = 1 N/mm$^2$

\n

Note C: 1 MPa$^2$ = $10^{12}$ Pa$^2$, etc.

", "advice": "

Calculate the invariants:

\n
    \n
  1. $I_1 = \\sigma_x + \\sigma_y + \\sigma_z = 0 + 0 + (\\var{sigmaz}) = \\var{sigmaz}$MPa.
  2. \n
  3. $I_2 = \\sigma_x \\sigma_y + \\sigma_y \\sigma_z + \\sigma_z \\sigma_x - \\tau_{xy}^2 - \\tau_{yz}^2 - \\tau_{zx}^2 =0 \\times 0 + 0 \\times (\\var{sigmaz}) + (\\var{sigmaz}) \\times 0 - 0^2 - 0^2 - (\\var{tauzx})^2 = \\var{I2}$MPa$^2$.
  4. \n
\n

The von Mises stress is $\\sigma_V=\\sqrt{-3J_2}=\\sqrt{I_1^2 - 3 I_2}=\\sqrt{(\\var{sigmaz})^2 - 3 \\times (\\var{I2})} = \\var{siground(sigmav,3)}$MPa.

", "rulesets": {}, "variables": {"tauzx": {"name": "tauzx", "group": "Ungrouped variables", "definition": "random(5..25)", "description": "

Shear stress from torsion / twist.

", "templateType": "anything"}, "J2": {"name": "J2", "group": "Ungrouped variables", "definition": "I2-I1^2/3", "description": "

Second deviatoric invariant.

", "templateType": "anything"}, "I1": {"name": "I1", "group": "Ungrouped variables", "definition": "sigmaz", "description": "

First invariant.

", "templateType": "anything"}, "sigmav": {"name": "sigmav", "group": "Ungrouped variables", "definition": "sqrt(-3*J2)", "description": "

von Mises stress.

", "templateType": "anything"}, "I2": {"name": "I2", "group": "Ungrouped variables", "definition": "-tauzx^2", "description": "

Second invariant.

", "templateType": "anything"}, "sigmaz": {"name": "sigmaz", "group": "Ungrouped variables", "definition": "-random(50..150)", "description": "

Maximum compressive axial stress.

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sigmaz", "tauzx", "I1", "I2", "J2", "sigmav"], "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": "

A sign post is subject to bending and torsion from the applied wind load, as well as axial compression from the weight of the sign. At the point of maximum compression, from the combined weight and bending, the axial stress is $\\sigma_z = \\var{sigmaz}$ MPa. The only other component of stress at this location is the shear stress from the torsion: $\\tau_{zx}=\\var{tauzx}$ MPa.

\n

Calculate the invariants:

\n
    \n
  1. $I_1=$[[0]] [Units: MPa].
  2. \n
  3. $I_2=$[[1]] [Units: MPa$^2$].
  4. \n
\n

And thus the von Mises stress is $\\sigma_V=$[[2]] [Units: MPa].

", "gaps": [{"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": "I1", "maxValue": "I1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "I2", "maxValue": "I2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "sigmav", "maxValue": "sigmav", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "3D Stress - General case and von Mises calculation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Francis Franklin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1887/"}], "tags": [], "metadata": {"description": "

Calculate invariants and von Mises stress for a general 3D stress state.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

The principal stresses and maximum shear stress, and the von Mises stress, can all be determined from the 3D stress matrix and its invariants, i.e., if:

\n

\\[\\sigma=\\begin{pmatrix}\\sigma_x & \\tau_{xy} & \\tau_{zx} \\\\ \\tau_{xy} & \\sigma_y & \\tau_{yz} \\\\ \\tau_{zx} & \\tau_{yz} & \\sigma_z\\end{pmatrix}\\]

\n

then the three invariants are:

\n
    \n
  1. The sum of the diagonal elements (the 'trace'): $I_1 = \\sigma_x + \\sigma_y + \\sigma_z$ [Units: Pa].
  2. \n
  3. An expression that is a sum of sub-determinants: $I_2 = \\sigma_x \\sigma_y + \\sigma_y \\sigma_z + \\sigma_z \\sigma_x - \\tau_{xy}^2 - \\tau_{yz}^2 - \\tau_{zx}^2$ [Units: Pa$^2$].
  4. \n
  5. The determinant: $I_3 = \\sigma_x \\sigma_y \\sigma_z + 2 \\tau_{xy} \\tau_{yz} \\tau_{zx} - \\sigma_x \\tau_{yz}^2 -\\sigma_y \\tau_{zx}^2 - \\sigma_z \\tau_{xy}^2$ [Units: Pa$^3$].
  6. \n
\n

From these we can easily calculate:

\n
    \n
  1. The mean ('hydrostatic') stress, which is the sum of the diagonal elements divided by three: $\\sigma_\\text{mean} = I_1 / 3$ [Units: Pa].
  2. \n
  3. The second deviatoric stress invariant: $J_2 = I_2 - I_1^2 / 3$ [Units: Pa$^2$].
  4. \n
  5. The von Mises ('equivalent') stress: $\\sigma_V = \\sqrt{-3J_2}$ [Units: Pa].
  6. \n
\n

The principal stresses can be found by solving the eigenvalue/eigenvector matrix problem (the eigenvalues are the principal stresses), or by finding the three roots (the three roots - $\\lambda_1$, $\\lambda_2$, $\\lambda_3$ - are the principal stresses) of the equation:

\n

\\[\\lambda^3 - I_1 \\lambda^2 + I_2 \\lambda - I_3 = 0\\]

\n

Note A. If the three principal stresses [Units: Pa] are different (which is usually but not always the case):

\n
    \n
  1. The maximum principal stress, $\\sigma_\\text{max}$, is the most tensile (most positive or least negative) of the principal stresses.
  2. \n
  3. The minimum principal stress, $\\sigma_\\text{min}$, is the most compressive (most negative or least positive) of the principal stresses.
  4. \n
  5. The middle principal stress, $\\sigma_\\text{middle}$, is in between the other two, so that $\\sigma_\\text{min} \\le \\sigma_\\text{middle} \\le \\sigma_\\text{max}$.
  6. \n
\n

Note B: 1 MPa = $10^6$ Pa = $10^6$ N/m$^2$ = 1 N/mm$^2$

\n

Note C: 1 MPa$^2$ = $10^{12}$ Pa$^2$, etc.

", "advice": "

Calculate the invariants:

\n
    \n
  1. $I_1=\\sigma_x + \\sigma_y + \\sigma_z = \\var{sigmax} +\\var{sigmay} +\\var{sigmaz} = \\var{I1}$MPa.
  2. \n
  3. $I_2=\\sigma_x \\sigma_y + \\sigma_y \\sigma_z + \\sigma_z \\sigma_x - \\tau_{xy}^2 - \\tau_{yz}^2 - \\tau_{zx}^2 = (\\var{sigmax}) \\times (\\var{sigmay}) + (\\var{sigmay}) \\times (\\var{sigmaz}) + (\\var{sigmaz}) \\times (\\var{sigmax}) - (\\var{tauxy})^2 - (\\var{tauyz})^2 - (\\var{tauzx})^2 = \\var{I2}$MPa$^2$.
  4. \n
  5. $I_3=\\sigma_x \\sigma_y \\sigma_z + 2 \\tau_{xy} \\tau_{yz} \\tau_{zx} - \\sigma_x \\tau_{yz}^2 -\\sigma_y \\tau_{zx}^2 - \\sigma_z \\tau_{xy}^2$ = $(\\var{sigmax}) \\times (\\var{sigmay}) \\times (\\var{sigmaz}) + 2 \\times (\\var{tauxy}) \\times (\\var{tauyz}) \\times (\\var{tauzx}) - (\\var{sigmax}) \\times (\\var{tauyz})^2 - (\\var{sigmay}) \\times (\\var{tauzx})^2 - (\\var{sigmaz}) \\times (\\var{tauxy})^2 = \\var{I3}$MPa$^3$.
  6. \n
\n

and thus calculate:

\n
    \n
  1. The mean ('hydrostatic') stress: $\\sigma_\\text{mean} = I_1 / 3 = \\var{I1} / 3 = \\var{siground(sigmamean,3)}$MPa.
  2. \n
  3. The second deviatoric stress invariant: $J_2 = I_2 - I_1^2 / 3 = \\var{I2} - (\\var{I1})^2 / 3 = \\var{siground(J2,3)}$MPa$^2$.
  4. \n
  5. The von Mises stress: $\\sigma_V = \\sqrt{-3 J_2} = \\sqrt{-3 \\times (\\var{siground(J2,3)})} = \\var{siground(sigmav,3)}$MPa.
  6. \n
\n

", "rulesets": {}, "variables": {"tauyz": {"name": "tauyz", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "

Shear stress in $yz$ plane.

", "templateType": "anything"}, "tauzx": {"name": "tauzx", "group": "Ungrouped variables", "definition": "random(5..15)", "description": "

Shear stress in $zx$ plane.

", "templateType": "anything"}, "I1": {"name": "I1", "group": "Ungrouped variables", "definition": "sigmax+sigmay+sigmaz", "description": "

First invariant.

", "templateType": "anything"}, "sigmaz": {"name": "sigmaz", "group": "Ungrouped variables", "definition": "-random(-16..17#3)", "description": "

Normal stress in $z$ direction

", "templateType": "anything"}, "sigmay": {"name": "sigmay", "group": "Ungrouped variables", "definition": "random(-18..15#3)", "description": "

Normal stress in $y$ direction.

", "templateType": "anything"}, "sigmamean": {"name": "sigmamean", "group": "Ungrouped variables", "definition": "I1/3", "description": "

Mean stress.

", "templateType": "anything"}, "sigmax": {"name": "sigmax", "group": "Ungrouped variables", "definition": "random(-17..16#3)", "description": "

Normal stress in $x$ direction.

", "templateType": "anything"}, "tauxy": {"name": "tauxy", "group": "Ungrouped variables", "definition": "random(-15..-5)", "description": "

Shear stress in $xy$ plane.

", "templateType": "anything"}, "I2": {"name": "I2", "group": "Ungrouped variables", "definition": "sigmax*sigmay+sigmay*sigmaz+sigmaz*sigmax-tauzx^2-tauxy^2-tauyz^2", "description": "

Second invariant.

", "templateType": "anything"}, "J2": {"name": "J2", "group": "Ungrouped variables", "definition": "I2-I1^2/3", "description": "

Second deviatoric invariant.

", "templateType": "anything"}, "I3": {"name": "I3", "group": "Ungrouped variables", "definition": "sigmax*sigmay*sigmaz+2*tauxy*tauyz*tauzx-sigmax*tauyz^2-sigmay*tauzx^2-sigmaz*tauxy^2", "description": "

Third invariant.

", "templateType": "anything"}, "sigmav": {"name": "sigmav", "group": "Ungrouped variables", "definition": "sqrt(-3*J2)", "description": "

von Mises stress.

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sigmax", "sigmay", "sigmaz", "tauxy", "tauyz", "tauzx", "I1", "I2", "I3", "J2", "sigmav", "sigmamean"], "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": "

The stress at a particular point in a component has been calculated as:

\n

\\[\\sigma=\\begin{pmatrix} \\var{sigmax} & \\var{tauxy} & \\var{tauzx} \\\\ \\var{tauxy} & \\var{sigmay} & \\var{tauyz} \\\\ \\var{tauzx} & \\var{tauyz} & \\var{sigmaz} \\end{pmatrix} \\text{[Units: MPa]}\\]

\n

Calculate the invariants:

\n
    \n
  1. $I_1=$[[0]] [Units: MPa].
  2. \n
  3. $I_2=$[[1]] [Units: MPa$^2$].
  4. \n
  5. $I_3=$[[2]] [Units: MPa$^3$].
  6. \n
\n

and thus calculate:

\n
    \n
  1. The mean stress: $\\sigma_\\text{mean}=$[[3]] [Units: MPa].
  2. \n
  3. The second deviatoric stress invariant: $J_2=$[[4]] [Units: MPa$^2$]
  4. \n
  5. The von Mises stress: $\\sigma_V=$[[5]] [Units: MPa].
  6. \n
", "gaps": [{"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": "I1", "maxValue": "I1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "I2", "maxValue": "I2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "I3", "maxValue": "I3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "sigmamean", "maxValue": "sigmamean", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "J2", "maxValue": "J2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "sigmav", "maxValue": "sigmav", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "3D Stress - Principal stresses calculation", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Francis Franklin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1887/"}], "tags": [], "metadata": {"description": "

Determine the principal stresses for a 3D stress state (with null third invariant).

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

The principal stresses and maximum shear stress, and the von Mises stress, can all be determined from the 3D stress matrix and its invariants, i.e., if:

\n

\\[\\sigma=\\begin{pmatrix}\\sigma_x & \\tau_{xy} & \\tau_{zx} \\\\ \\tau_{xy} & \\sigma_y & \\tau_{yz} \\\\ \\tau_{zx} & \\tau_{yz} & \\sigma_z\\end{pmatrix}\\]

\n

then the three invariants are:

\n
    \n
  1. The sum of the diagonal elements (the 'trace'): $I_1 = \\sigma_x + \\sigma_y + \\sigma_z$ [Units: Pa].
  2. \n
  3. An expression that is a sum of sub-determinants: $I_2 = \\sigma_x \\sigma_y + \\sigma_y \\sigma_z + \\sigma_z \\sigma_x - \\tau_{xy}^2 - \\tau_{yz}^2 - \\tau_{zx}^2$ [Units: Pa$^2$].
  4. \n
  5. The determinant: $I_3 = \\sigma_x \\sigma_y \\sigma_z + 2 \\tau_{xy} \\tau_{yz} \\tau_{zx} - \\sigma_x \\tau_{yz}^2 -\\sigma_y \\tau_{zx}^2 - \\sigma_z \\tau_{xy}^2$ [Units: Pa$^3$].
  6. \n
\n

From these we can easily calculate:

\n
    \n
  1. The mean ('hydrostatic') stress, which is the sum of the diagonal elements divided by three: $\\sigma_\\text{mean} = I_1 / 3$ [Units: Pa].
  2. \n
  3. The second deviatoric stress invariant: $J_2 = I_2 - I_1^2 / 3$ [Units: Pa$^2$].
  4. \n
  5. The von Mises ('equivalent') stress: $\\sigma_V = \\sqrt{-3J_2}$ [Units: Pa].
  6. \n
\n

The principal stresses can be found by solving the eigenvalue/eigenvector matrix problem (the eigenvalues are the principal stresses), or by finding the three roots (the three roots - $\\lambda_1$, $\\lambda_2$, $\\lambda_3$ - are the principal stresses) of the equation:

\n

\\[\\lambda^3 - I_1 \\lambda^2 + I_2 \\lambda - I_3 = 0\\]

\n

Note A. If the three principal stresses [Units: Pa] are different (which is usually but not always the case):

\n
    \n
  1. The maximum principal stress, $\\sigma_\\text{max}$, is the most tensile (most positive or least negative) of the principal stresses.
  2. \n
  3. The minimum principal stress, $\\sigma_\\text{min}$, is the most compressive (most negative or least positive) of the principal stresses.
  4. \n
  5. The middle principal stress, $\\sigma_\\text{middle}$, is in between the other two, so that $\\sigma_\\text{min} \\le \\sigma_\\text{middle} \\le \\sigma_\\text{max}$.
  6. \n
\n

Note B: 1 MPa = $10^6$ Pa = $10^6$ N/m$^2$ = 1 N/mm$^2$

\n

Note C: 1 MPa$^2$ = $10^{12}$ Pa$^2$, etc.

", "advice": "

Calculate the invariants:

\n
    \n
  1. $I_1=\\sigma_x + \\sigma_y + \\sigma_z = \\var{sigmax} +\\var{sigmay} +\\var{sigmaz} = \\var{siground(I1,3)}$MPa.
  2. \n
  3. $I_2=\\sigma_x \\sigma_y + \\sigma_y \\sigma_z + \\sigma_z \\sigma_x - \\tau_{xy}^2 - \\tau_{yz}^2 - \\tau_{zx}^2 = (\\var{sigmax}) \\times (\\var{sigmay}) + (\\var{sigmay}) \\times (\\var{sigmaz}) + (\\var{sigmaz}) \\times (\\var{sigmax}) - (\\var{tauxy})^2 - (\\var{tauyz})^2 - (\\var{tauzx})^2 = \\var{siground(I2,3)}$MPa$^2$.
  4. \n
  5. $I_3=\\sigma_x \\sigma_y \\sigma_z + 2 \\tau_{xy} \\tau_{yz} \\tau_{zx} - \\sigma_x \\tau_{yz}^2 -\\sigma_y \\tau_{zx}^2 - \\sigma_z \\tau_{xy}^2$ = $(\\var{sigmax}) \\times (\\var{sigmay}) \\times (\\var{sigmaz}) + 2 \\times (\\var{tauxy}) \\times (\\var{tauyz}) \\times (\\var{tauzx}) - (\\var{sigmax}) \\times (\\var{tauyz})^2 - (\\var{sigmay}) \\times (\\var{tauzx})^2 - (\\var{sigmaz}) \\times (\\var{tauxy})^2 = \\var{siground(I3,3)}$MPa$^3$.
  6. \n
\n

\n

To calculate the principal stresses, solve the cubic equation:

\n

\\[\\lambda^3 - I_1 \\lambda^2 + I_2 \\lambda - I_3 = 0\\]

\n

which, since $I_3 \\approx 0$, simplifies to:

\n

\\[\\lambda^3 - I_1 \\lambda^2 + I_2 \\lambda =\\lambda \\left( \\lambda^2 - I_1 \\lambda + I_2 \\right) = 0\\]

\n

which has a root at $\\lambda = 0$ and the quadratic formula can be used to find the other two roots:

\n

$\\lambda = {I_1 \\pm \\sqrt{I_1^2 - 4 I_2} \\over 2} = {\\var{siground(I1,3)} \\pm \\sqrt{(\\var{siground(I1,3)})^2 - 4 \\times (\\var{siground(I2,3)})} \\over 2} = \\var{siground(lambda1,3)}$MPa or $\\var{siground(lambda2,3)}$MPa.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"lambda2": {"name": "lambda2", "group": "Ungrouped variables", "definition": "(I1-delta)/2", "description": "

Root of cubic poly - principal stress.

", "templateType": "anything", "can_override": false}, "tauyz": {"name": "tauyz", "group": "Ungrouped variables", "definition": "random(-5..5)/10", "description": "

Shear stress in $yz$ plane.

", "templateType": "anything", "can_override": false}, "sigmay": {"name": "sigmay", "group": "Ungrouped variables", "definition": "random(-16..17#3)/10", "description": "

Normal stress in $y$ direction.

", "templateType": "anything", "can_override": false}, "sigmaz": {"name": "sigmaz", "group": "Ungrouped variables", "definition": "-siground((2*tauxy*tauyz*tauzx-sigmax*tauyz^2-sigmay*tauzx^2)/(sigmax*sigmay-tauxy^2),3)", "description": "

Normal stress in $z$ direction

", "templateType": "anything", "can_override": false}, "I3": {"name": "I3", "group": "Ungrouped variables", "definition": "sigmax*sigmay*sigmaz+2*tauxy*tauyz*tauzx-sigmax*tauyz^2-sigmay*tauzx^2-sigmaz*tauxy^2", "description": "

Third invariant.

", "templateType": "anything", "can_override": false}, "delta": {"name": "delta", "group": "Ungrouped variables", "definition": "sqrt(I1^2-4*I2)", "description": "

Part of root solution.

", "templateType": "anything", "can_override": false}, "tauxy": {"name": "tauxy", "group": "Ungrouped variables", "definition": "random(-15..-5)/10", "description": "

Shear stress in $xy$ plane.

", "templateType": "anything", "can_override": false}, "I2": {"name": "I2", "group": "Ungrouped variables", "definition": "sigmax*sigmay+sigmay*sigmaz+sigmaz*sigmax-tauzx^2-tauxy^2-tauyz^2", "description": "

Second invariant.

", "templateType": "anything", "can_override": false}, "sigmamax": {"name": "sigmamax", "group": "Ungrouped variables", "definition": "if(lambda1<0,0,lambda1)", "description": "

Maximum principal stress.

", "templateType": "anything", "can_override": false}, "I1": {"name": "I1", "group": "Ungrouped variables", "definition": "sigmax+sigmay+sigmaz", "description": "

First invariant.

", "templateType": "anything", "can_override": false}, "sigmamiddle": {"name": "sigmamiddle", "group": "Ungrouped variables", "definition": "if(lambda1<0,lambda1,if(lambda2>0,lambda2,0))", "description": "

Middle principal stress.

", "templateType": "anything", "can_override": false}, "sigmamin": {"name": "sigmamin", "group": "Ungrouped variables", "definition": "if(lambda2>0,0,lambda2)", "description": "

Minimum principal stress.

", "templateType": "anything", "can_override": false}, "lambda1": {"name": "lambda1", "group": "Ungrouped variables", "definition": "(I1+delta)/2", "description": "

Root of cubic poly - principal stress.

", "templateType": "anything", "can_override": false}, "sigmax": {"name": "sigmax", "group": "Ungrouped variables", "definition": "random(-17..16#3)/10", "description": "

Normal stress in $x$ direction.

", "templateType": "anything", "can_override": false}, "tauzx": {"name": "tauzx", "group": "Ungrouped variables", "definition": "random(5..15)/10", "description": "

Shear stress in $zx$ plane.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["sigmax", "sigmay", "sigmaz", "tauxy", "tauyz", "tauzx", "I1", "I2", "I3", "delta", "lambda1", "lambda2", "sigmamax", "sigmamin", "sigmamiddle"], "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": "

The stress at a particular point in a component has been calculated as:

\n

\\[\\sigma=\\begin{pmatrix} \\var{sigmax} & \\var{tauxy} & \\var{tauzx} \\\\ \\var{tauxy} & \\var{sigmay} & \\var{tauyz} \\\\ \\var{tauzx} & \\var{tauyz} & \\var{sigmaz} \\end{pmatrix} \\text{[Units: MPa]}\\]

\n

Calculate the invariants:

\n
    \n
  1. $I_1=$[[0]] [Units: MPa].
  2. \n
  3. $I_2=$[[1]] [Units: MPa$^2$].
  4. \n
  5. $I_3=$[[2]] [Units: MPa$^3$].
  6. \n
\n

Assuming $I_3 \\approx 0$ and can be neglected, determine:

\n
    \n
  1. The maximum principal stress: $\\sigma_\\text{max}=$[[3]] [Units: MPa].
  2. \n
  3. The middle principal stress: $\\sigma_\\text{middle}=$[[4]] [Units: MPa]
  4. \n
  5. The minimum principal stress: $\\sigma_\\text{min}=$[[5]] [Units: MPa].
  6. \n
", "gaps": [{"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": "I1", "maxValue": "I1", "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": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "I2", "maxValue": "I2", "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": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "I3-10^-8", "maxValue": "I3+10^-8", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": "100", "precisionMessage": "

(The answer here should be close to zero.)

", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "sigmamax", "maxValue": "sigmamax", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": "45", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "sigmamiddle", "maxValue": "sigmamiddle", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": "45", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"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": "sigmamin", "maxValue": "sigmamin", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": "45", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "type": "exam", "contributors": [{"name": "Francis Franklin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1887/"}], "extensions": [], "custom_part_types": [], "resources": []}