-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from virtual-labs/revert-16-dev
Revert "Dev"
- Loading branch information
Showing
14 changed files
with
286 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,10 @@ jobs: | |
node-version: '12' | ||
check-latest: true | ||
- run: | | ||
git clone --depth=1 https://github.com/virtual-labs/ph3-lab-mgmt | ||
git clone -b pipeline-new https://github.com/virtual-labs/ph3-lab-mgmt | ||
cd ph3-lab-mgmt | ||
npm install | ||
npm run build-exp | ||
node exp.js | ||
cd ../ | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "vleadadmin" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
**Introduction** | ||
|
||
Structural elements and machine components made of ductile material are usually designed so that the material will not yield under the expected loading conditions. When the element or component is under uniaxial stress, the value of the normal stress σ<sub>x</sub>, which will cause the material to yield, may be obtained readily from a tensile test conducted on a specimen of the same material, since the test specimen and the structural element or machine component are in the same state of stress. Thus, regardless of the actual mechanism which causes the material to yield, we may state that the element or component will be safe as long as σ<sub>x</sub> < σ<sub>y</sub>, where σ<sub>y</sub> is the yield strength of the test specimen. | ||
|
||
|
||
**Objective** | ||
|
||
- To investigate the principal stresses σ<sub>a</sub> and σ<sub>b</sub> at any given point of a structural element or machine component when it is in a state of plane stress. | ||
|
||
- To evaluate the two different yield criteria ( Tresca and Von Mises ) for ductile materials under plane stresses. | ||
### Aim of the experiment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
## Principal Stresses | ||
## Experiment name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the below code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
(function() { | ||
function buildQuiz() { | ||
// we'll need a place to store the HTML output | ||
const output = []; | ||
|
||
// for each question... | ||
myQuestions.forEach((currentQuestion, questionNumber) => { | ||
// we'll want to store the list of answer choices | ||
const answers = []; | ||
|
||
// and for each available answer... | ||
for (letter in currentQuestion.answers) { | ||
// ...add an HTML radio button | ||
answers.push( | ||
`<label> | ||
<input type="radio" name="question${questionNumber}" value="${letter}"> | ||
${letter} : | ||
${currentQuestion.answers[letter]} | ||
</label>` | ||
); | ||
} | ||
|
||
// add this question and its answers to the output | ||
output.push( | ||
`<div class="question"> ${currentQuestion.question} </div> | ||
<div class="answers"> ${answers.join("")} </div>` | ||
); | ||
}); | ||
|
||
// finally combine our output list into one string of HTML and put it on the page | ||
quizContainer.innerHTML = output.join(""); | ||
} | ||
|
||
function showResults() { | ||
// gather answer containers from our quiz | ||
const answerContainers = quizContainer.querySelectorAll(".answers"); | ||
|
||
// keep track of user's answers | ||
let numCorrect = 0; | ||
|
||
// for each question... | ||
myQuestions.forEach((currentQuestion, questionNumber) => { | ||
// find selected answer | ||
const answerContainer = answerContainers[questionNumber]; | ||
const selector = `input[name=question${questionNumber}]:checked`; | ||
const userAnswer = (answerContainer.querySelector(selector) || {}).value; | ||
|
||
// if answer is correct | ||
if (userAnswer === currentQuestion.correctAnswer) { | ||
// add to the number of correct answers | ||
numCorrect++; | ||
|
||
// color the answers green | ||
//answerContainers[questionNumber].style.color = "lightgreen"; | ||
} else { | ||
// if answer is wrong or blank | ||
// color the answers red | ||
answerContainers[questionNumber].style.color = "red"; | ||
} | ||
}); | ||
|
||
// show number of correct answers out of total | ||
resultsContainer.innerHTML = `${numCorrect} out of ${myQuestions.length}`; | ||
} | ||
|
||
const quizContainer = document.getElementById("quiz"); | ||
const resultsContainer = document.getElementById("results"); | ||
const submitButton = document.getElementById("submit"); | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the above code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
|
||
|
||
|
||
|
||
/////////////// Write the MCQ below in the exactly same described format /////////////// | ||
|
||
|
||
const myQuestions = [{ | ||
question: "1.This is a sample question:", ///// Write the question inside double quotes | ||
answers: { | ||
a: "This is a sample answer A", ///// Write the option 1 inside double quotes | ||
b: "This is a sample answer B", ///// Write the option 2 inside double quotes | ||
}, | ||
correctAnswer: "a" ///// Write the correct option inside double quotes | ||
}, | ||
|
||
{ | ||
question: "<img src='images/8.PNG'><br>Identify the location of Secondary electron detector", ///// Write the question inside double quotes | ||
answers: { | ||
a: "<img src='images/1b.png'>", ///// Write the option 1 inside double quotes | ||
b: "<img src='images/1a.png'>", ///// Write the option 2 inside double quotes | ||
c: "<img src='images/1c.PNG'>", }, | ||
correctAnswer: "c" ///// Write the correct option inside double quotes | ||
}, | ||
|
||
|
||
|
||
]; | ||
|
||
|
||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the below code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
// display quiz right away | ||
buildQuiz(); | ||
|
||
// on submit, show results | ||
submitButton.addEventListener("click", showResults); | ||
})(); | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the above code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the below code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
(function() { | ||
function buildQuiz() { | ||
// we'll need a place to store the HTML output | ||
const output = []; | ||
|
||
// for each question... | ||
myQuestions.forEach((currentQuestion, questionNumber) => { | ||
// we'll want to store the list of answer choices | ||
const answers = []; | ||
|
||
// and for each available answer... | ||
for (letter in currentQuestion.answers) { | ||
// ...add an HTML radio button | ||
answers.push( | ||
`<label> | ||
<input type="radio" name="question${questionNumber}" value="${letter}"> | ||
${letter} : | ||
${currentQuestion.answers[letter]} | ||
</label>` | ||
); | ||
} | ||
|
||
// add this question and its answers to the output | ||
output.push( | ||
`<div class="question"> ${currentQuestion.question} </div> | ||
<div class="answers"> ${answers.join("")} </div>` | ||
); | ||
}); | ||
|
||
// finally combine our output list into one string of HTML and put it on the page | ||
quizContainer.innerHTML = output.join(""); | ||
} | ||
|
||
function showResults() { | ||
// gather answer containers from our quiz | ||
const answerContainers = quizContainer.querySelectorAll(".answers"); | ||
|
||
// keep track of user's answers | ||
let numCorrect = 0; | ||
|
||
// for each question... | ||
myQuestions.forEach((currentQuestion, questionNumber) => { | ||
// find selected answer | ||
const answerContainer = answerContainers[questionNumber]; | ||
const selector = `input[name=question${questionNumber}]:checked`; | ||
const userAnswer = (answerContainer.querySelector(selector) || {}).value; | ||
|
||
// if answer is correct | ||
if (userAnswer === currentQuestion.correctAnswer) { | ||
// add to the number of correct answers | ||
numCorrect++; | ||
|
||
// color the answers green | ||
//answerContainers[questionNumber].style.color = "lightgreen"; | ||
} else { | ||
// if answer is wrong or blank | ||
// color the answers red | ||
answerContainers[questionNumber].style.color = "red"; | ||
} | ||
}); | ||
|
||
// show number of correct answers out of total | ||
resultsContainer.innerHTML = `${numCorrect} out of ${myQuestions.length}`; | ||
} | ||
|
||
const quizContainer = document.getElementById("quiz"); | ||
const resultsContainer = document.getElementById("results"); | ||
const submitButton = document.getElementById("submit"); | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the above code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
|
||
|
||
|
||
|
||
/////////////// Write the MCQ below in the exactly same described format /////////////// | ||
|
||
|
||
const myQuestions = [{ | ||
question: "1.This is a sample question:", ///// Write the question inside double quotes | ||
answers: { | ||
a: "This is a sample answer A", ///// Write the option 1 inside double quotes | ||
b: "This is a sample answer B", ///// Write the option 2 inside double quotes | ||
}, | ||
correctAnswer: "a" ///// Write the correct option inside double quotes | ||
}, | ||
|
||
{ | ||
question: "<img src='images/8.PNG'><br>Identify the location of Secondary electron detector", ///// Write the question inside double quotes | ||
answers: { | ||
a: "<img src='images/1b.png'>", ///// Write the option 1 inside double quotes | ||
b: "<img src='images/1a.png'>", ///// Write the option 2 inside double quotes | ||
c: "<img src='images/1c.PNG'>", }, | ||
correctAnswer: "c" ///// Write the correct option inside double quotes | ||
}, | ||
|
||
|
||
|
||
]; | ||
|
||
|
||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the below code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
// display quiz right away | ||
buildQuiz(); | ||
|
||
// on submit, show results | ||
submitButton.addEventListener("click", showResults); | ||
})(); | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////// Do not modify the above code //////////////////////// | ||
|
||
///////////////////////////////////////////////////////////////////////////// |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
**Procedure** | ||
1. Change the value of stress(σ) along different components with the sliders. | ||
2. Change the orientation(Θ) of the cube along all three directions using the sliders. | ||
3. Observe the values of Principal Stress(σ') obtained across all the components in the table provided. | ||
### Procedure |
Oops, something went wrong.