-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update exampleKcl.ts #2264
Update exampleKcl.ts #2264
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@@ -5,7 +5,7 @@ const sigmaAllow = 35000 // psi | |||
const width = 6 // inch | |||
const p = 300 // Force on shelf - lbs | |||
const distance = 12 // inches | |||
const M = 12 * 300 / 2 // Moment experienced at fixed end of bracket | |||
const M = distance * p / 2 // Moment experienced at fixed end of bracket | |||
const FOS = 2 // Factor of safety of 2 | |||
const shelfMountL = 8 // The length of the bracket holding up the shelf is 6 inches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stared at this more and now I'm realizing now that distance isn't related at all to shelfMountL or wallMountL. Just thinking through the problem, it would make sense to me the moment experienced at the end of the bracket would be related to those and not necessarily distance?
Also, why do we divide moment by 2? Is this just because we were originally assuming the distance of each arm of the bracket was 1/2 of the original distance of 12?
So, maybe it should be const M = shelfMountL * p
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking back at this, I don't like some of the variable names I chose.
We are dividing by two because there are two brackets holding up the shelf (assumed at equal distance apart from the load).
distance
in this example is supposed to be the shelf length from the wall. I'm going to add this picture to the onboarding to make it more clear and update the code to follow. This is what it should be:

const sigmaAllow = 35000 // psi
const w = 6 // width of the bracket - in
const p = 300 // Force on shelf - lbs
const L = 12 // Length of the shelf from the wall - in
const M = L * p / 2 // Moment experienced at fixed end of bracket. Divided by 2 since there are 2 brackets holding up the shelf.
const FOS = 2 // Factor of safety
const shelfMountL = 8 // The length of the bracket holding up the shelf - in
const wallMountL = 6 // the length of the bracket mounted on the wall - in
// Calculate the thickness off the allowable bending stress and factor of safety
const t = sqrt(6 * M * FOS / (w * sigmaAllow))
Calculating the bending stress, we have
where
plugging those in and simplifying:
so
I'm going to update the onboarding code and make it clearer. Thanks for bringing this up @iterion!
I updated the onboarding here Let me know if this makes more sense |
Thanks so much, for the improvements! |
@jgomez720 I recently went through onboarding again and noticed we duplicated some constants where we could just reuse the variable instead. I think my moment calculation is still correct, but wanted to get your thoughts and see if we can reuse any more.