Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

General formula for an entire MathCad document

Status
Not open for further replies.

tails009

Mechanical
Jun 9, 2009
13
US
Hi all,

I work in pressure vessel design and therefore do alot of von mises stress equations. However, when using MathCad, I am needing to put the equations in for each new part I do and sometimes my calculations worksheets incorporate multiple parts. This makes the whole document look somewhat messy as I'm having to repeat the formulae over and over.

Is there someway that I can input the formulae at the begining of the document and then simply change the variables throughout each time I start calcs on a new part?

I have been looking through "introduction to MathCad 13" by Ronald Larsen and the closest thing I have come to is to create some kind of program (page 229). But this still doesn't seem to be working - having said that, I'm not too hot on computer programming (mech engineer) so I might be missing something.

I have attached an example of the eqations to which I refer. Any help would be gretly appreciated, thanks!
 
Replies continue below

Recommended for you

create functions at the head of the document


Then just call each function for each new section of the design



Cheers

Greg Locock

SIG:please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Hi,

thanks for that. I started doing it this way and it seems to work, however I can't get the output from one function to be one of the variables for another function. Is this possible?

e.g. Trying to find the force created by a pressure acting on a cylinder. I realise you can do this all in one function but I am simplifying for the sake of argument.

first create a function to determine the area of the piston. A_piston(OD,ID):=(PI*(OD^2-ID^2))/4.

As force is pressure*Area, is it possible to create a function along the lines of
F_piston(Pressure,A_piston):=????????


i.e. using the results from the previous calculation without having to re-enter the Outer and inner diameters of the piston and thus allowing to show results for both piston area and the resultant force.
 
F_piston(Pressure,A_piston(OD,ID))

Cumbersome, but doable.

TTFN

FAQ731-376
 
F_piston(Pressure,OD,ID):=Pressure*A_piston(OD,ID)
 
Hmmm, still can't seem to get that to work. I've uplaoded another file with what I'm doing now.

Taking away the bit I've highlighted in red, it works fine, it just means that I have to put in all the variables for each function. I thought I might be able to someway link them but if not, it isn't a huge concern.

Thanks for your help though.
 
I don't seem to be able to see your file, but one option if all else fails is to group the common (repetitive) statements together into an Area and collapse it. You can then copy the Area and paste it as many times as is convenient. This will improve the appearance somewhat, and you can even make them invisible.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top