Skip to main content
1-Visitor
October 30, 2015
Solved

Beginner Programming Doubt

  • October 30, 2015
  • 2 replies
  • 4175 views

Hi !,

I trying to learn the programming methods at mathcad, for that I'm triyng to make a loop to classificate a Pressure Vessel according to the fluid,Pressure, Volume. But i cant get it, if any one could help me with that.

2015-10-30_10-41-13.png

Best answer by MJG

I think he correctly handled that by defining "l" which removes the units from L.

The problem I think was the use of "while" in the second program.  It should really be another "if" statement.  See attached.

Alternatively, I would recommend the use of a matrix "lookup" function.  I think that might provide a more concise solution.

2 replies

1-Visitor
October 30, 2015

How about the attached?

You were comparing L which had the units of energy to the values in your program.

Mike

MJG1-VisitorAnswer
1-Visitor
October 30, 2015

I think he correctly handled that by defining "l" which removes the units from L.

The problem I think was the use of "while" in the second program.  It should really be another "if" statement.  See attached.

Alternatively, I would recommend the use of a matrix "lookup" function.  I think that might provide a more concise solution.

ejanssen1-VisitorAuthor
1-Visitor
October 30, 2015

Can you show me an example of this oder way to do it ? It is always good to know more than one method.

23-Emerald V
October 30, 2015

Emilio Janssen wrote:

Hi !,

I trying to learn the programming methods at mathcad, for that I'm triyng to make a loop to classificate a Pressure Vessel according to the fluid,Pressure, Volume. But i cant get it, if any one could help me with that.

2015-10-30_10-41-13.png

Noting that you had made the argument to Grupo dimensionless, does the attached do the kind of thing you want?

Stuart

23-Emerald V
October 30, 2015

StuartBruff wrote:

Emilio Janssen wrote:

Hi !,

I trying to learn the programming methods at mathcad, for that I'm triyng to make a loop to classificate a Pressure Vessel according to the fluid,Pressure, Volume. But i cant get it, if any one could help me with that.

2015-10-30_10-41-13.png

Noting that you had made the argument to Grupo dimensionless, does the attached do the kind of thing you want?

I had a few spare minutes, so I tidied the worksheet up a bit and handled L with units:

Stuart

ejanssen1-VisitorAuthor
1-Visitor
October 30, 2015

Thanks Stuart, very usefull those examples and methods !!