cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Programming in Matchad

Ermis76
1-Newbie

Programming in Matchad

Hi!

I would like to program the following 20 steps (see the attached file) in Mathacad. It is an itteration process.

Is it easy to do it if you have the right programming skills or is it to big of a problem to tackle in mathcad?

Appreciate any help, thanks in advance!

10 REPLIES 10
IRstuff
3-Visitor
(To:Ermis76)

All modern mathematics programs, Excel, Mathcad, and Matlab, have built-in facilities to solve problems like this without user programming. I suggest you read "Mathcad Solve Block" in the help files. A solve block simply requires that you provide an expression that could produce the result that you want, provided that some variable is changed. You close the solve block with Find(variable)= or Minerr(variable)=.

No programming required. See Excel's "Goal Seek" and "Solver" for similar functionality.

TTFN

Ok, Thanks a lot!

After a quick look att the help files i´m wondering how the solve block works. Could you see what is the problem in the attached file.

I´would like to solve x. There is a angle x who gives the right τxy.

/E

IRstuff
3-Visitor
(To:Ermis76)

I'm sorry, I don't see what you are attempting to do. What equation is satisfied when x is found? You have nothing in the expressions that depend on x.

N.B, there should be no := expressions within a solve block. The only thing that should be within the block are constraints, i.e., something like:

TTFN

RichardJ
19-Tanzanite
(To:Ermis76)

You already asked this question: http://communities.ptc.com/message/225226#225226

As already pointed out by Werner, your first and third equations are identical. Also I don't see the relevenace of the second equation. You define sigma_cy in terms of a chosen angle, x. If you then solve the third equation for x all you will get back is your initial x, because the third equation is identical to the one you used to calculate sigma_cy.

Hi again and thanks both of you for your help!

Sorry for the confusion regarding the third equation. It´s true that the third and the first equation are identical and perhaps unnecessary.

What i´m trying to do herer is to solve σsy.To do so there is a unik angle (x) and a value of σcy in the third equation who equalls with τ.xy = 5.07*MP.

What i would like Mathcad to perform is with a guess value of x calculate a σcy with the first equation. Then put the value of the calculated σcy and the associated angle in the third equation and compare τxy with the Given τxy.

If not equal then change the value of x and try again. When the condition is met τxy=Given τxy then stop.

Use now σcy to calculate σsy.

I´m sure therer are several ways to do it but i dont think that i have the rights skills here

./E

IRstuff
3-Visitor
(To:Ermis76)

Your equations don't seem to make sense unless the σcy equation is eliminated. This results in x=0.184986, but as written, the value can be simply solved algebraicly

TTFN

tension.gif

Thanks! You are right, i nedd to find one more unik expression for sigma_cy.

Where does sigma_sy fit into this puzzle?

Can you relate tau, sigma_cy and sigma_sy?

As written I can't figure out how sigma_sy affects what you're trying to solve

You are right now that i´m looking att it again the puzzle dont fit. I need to find one more association.

Back to the drawing board.

RichardJ
19-Tanzanite
(To:Ermis76)

Is it easy to do it if you have the right programming skills or is it to big of a problem to tackle in mathcad?

Yes, it would be easy to do with the right skills. A lot easier than doing it in Excel, and no harder than doing it in another high level language such as Matlab. If you don't have the right skills though, well...

The key to doing most things in Mathcad that are a step beyond trivial is to write the worksheet in terms of functions. If you want to solve for angle, write your expressions as functions of angles.

As already pointed out though, unless there is something very unusual about the iterative process you can probably use the built in solvers to find your answer.

Top Tags