Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello,
I have a variable that will be called "S". I would like to be able to have a program in Mathcad that calculates a range for "S ", so the smallest value will be called Smin, and the largest value is Smax. we need to define another variable "Increment" so that the program will be checking between Smin and Smax by incrementing based on the user input for "Increment".
Each value of satisfactory S that falls between Smin and Smax must satisfy the following conditions :
S/D <= 1.5 where D is the Opening diameter defined by the user.
S/D>1.08
Ratio#1 <=1.0
Ratio #2 <= 1.0
The first S value that satisfy the above conditions will be called Smin, then we increment based on a user input value for the variable "Increment". so the second value for S will be the first value that satisfies the above conditions + increment and so on. we keep iterating until we reach the maximum value for S that satisfies the above conditions and this will be called Smax.
Thanks a lot to all the helpers!
Would you be able to provide a worksheet with the expected results.
Mike
Hello Mike,
it is a huge Mathcadsheet. I am using Mathcad14. I am just trying to get how to setup the program since i am not familar with it in Mathcad. but once i see the logic i could probably make little modifications to it. Please see my response to Fred below. Thanks Mike
I can see your point, but you do not have to post the whole worksheet, just an example for users to work with.
Mike
Hello!
Please attach a Mathcad worksheet. What version of Mathcad are you using?
Hello Vladimir,
i am using Mathcad14. Please see my response to Mike above, and Fred below. Thanks Vladimir!
Vladimir,
Attached is the mathcadsheet with notes and explanations. Thanks!
SAM FARES wrote:
Hello,
I have a variable that will be called "S". I would like to be able to have a program in Mathcad that calculates a range for "S ", so the smallest value will be called Smin, and the largest value is Smax. we need to define another variable "Increment" so that the program will be checking between Smin and Smax by incrementing based on the user input for "Increment".
Each value of satisfactory S that falls between Smin and Smax must satisfy the following conditions :
S/D <= 1.5 where D is the Opening diameter defined by the user.
S/D>1.08
Ratio#1 <=1.0
Ratio #2 <= 1.0
The first S value that satisfy the above conditions will be called Smin, then we increment based on a user input value for the variable "Increment". so the second value for S will be the first value that satisfies the above conditions + increment and so on. we keep iterating until we reach the maximum value for S that satisfies the above conditions and this will be called Smax.
Thanks a lot to all the helpers!
We're missing some information. What are Ratio #1 and #2?
Hello Fred,
I am using Mathcad14.
Ratio #1 and Ratio #2 will result from beam checks( Demand/Strength). i have many checks for shear, moment, and (Axial + Bending). I only listed Ratio#1, and Ratio#2 just to give you an idea. Once i get the code, i will modify it to suit my calculations. For now set Ratio #1 and Ratio #2 as variables (user input) just to get the routine. i will customize once i get the idea from you.
Thank you all!
Hello Fred,
I am using Mathcad14.
Ratio #1 and Ratio #2 will result from beam checks( Demand/Strength). i have many checks for shear, moment, and (Axial + Bending). I only listed Ratio#1, and Ratio#2 just to give you an idea. Once i get the code, i will modify it to suit my calculations. For now set Ratio #1 and Ratio #2 as variables (user input) just to get the routine. i will customize once i get the idea from you.
Thank you all!
Any chance of a worksheet?
Mike
Mike,
attached is the mathcadsheet with explanations of what i am trying to accomplish. Thanks!
Thanks a lot Fred!
i am attaching the Mathcadsheet that you sent with more explanations and notes as to what exactly i would like accomplished. Thank you all
Thanks Fred!!
your sheet is working as i described how i would like it work. But when i went to implement it into my Mathcad sheet,i don't think i am doing it correctly.
Here is how my mathsheet works. i start with few variables, like dt, Do= Hole diameter. i vary the hole spacing "S" which is the variable that i input at the top of the sheet so that all my end results at the bottom of the sheet which include seven unity checks must be less than 1 at every valid value for "S". right now i manually change or increment the "S", then go to the bottom of the sheet ( Longsheet) to see if all my unity checks are less than one. i keep varying "S", until i get to an "S" that makes at least one of the unity checks larger than one then that "S" before the nonworking "S" will be Smax. that is what i am trying to automate.
i am attaching what i modified to your mathcadsheet that you did earlier. but i am sure there is more to it than i think as far where to place it in the sheet.
I gave you a sheet that worked, that you could use as a template for what you needed.
You have returned a broken sheet with a scriptable component (?) that I don't understand, that has several undefined variables.
If you can clearly explain what tests you want (please start with a physical description of your problem) then maybe I can help more.
I can't move you forward from what this is. Sorry!
Thanks Fred!
i might've over simplified the issue i have. i did not want to send my mathcadsheet becuase it is a large one. but i am attaching it. i highlighted in green the variable that i want to vary or find a working range for which is "Scell". you will see it near the top below the beam sizes. all the beam checks are done between after "Scell". the resulting checks or ratios are under section called "Final results" which is down the middle of the sheet or a little lower, and i also i highlighted it in green. right now these check ratios are only for one "Scell" value at the top of the sheet. if you vary "Scell" you will see some of these ratios will change as a result. So is it possible in Mathcad to have a button for lack of better words that is programmed so that when you push on it it will come up with "Scell" that meet the criteria ( all these ratios in the final results are less or equal to one? please see the mathcadsheet that i am developing.
You're right! That's quite a sheet. Buttons (and text boxes, and other things) are scripted components--they get programed in script, not mathcad.