Skip to main content
1-Visitor
March 1, 2014
Question

Problem with subscript in thermodynamic problem

  • March 1, 2014
  • 4 replies
  • 6019 views

Good night.

I'm using mathcad prime 3.0. I try to solve a problem as stated in my textbook "Introduction to Thermodynamics in Chemical Engineering" Smith & Van Ness but I define the variables that tell me or how to resolve the situation subscript "i, j" which are integers. If anyone can help me I appreciate fully. Attached the document.

 

 

thanks

4 replies

5-Regular Member
March 21, 2014

Moved to the Mathcad Usage community in order to get you a response.

Thanks!

1-Visitor
March 21, 2014

Have a look at the attached. The subscripts are not required.

25-Diamond I
March 21, 2014

The subscripts are not required.

Not sure about that. If the calculated variables should be (symmetrical) 3x3 matrices, the subscripts would be necessary.

@Ricardo: You made (at least 😉 three errors in your sheet

1) Mathcad by default begins counting vector and matrix element with 0, not with 1. Thats the reason Mike had set n:=2. Alternatively you could set the system variable ORIGIN:=1, so your approach could work.

2) you used the literal index (Ctrl + -) instead of the vector index ([) on the LHS of your assignments.

3) When you assign Zc[i,j:=Zc[+Zc[j you are not allowed to use the same variable name (Zc) for the 3x3 matrix (LHS) and the 3x1 vector (RHS) because that assignment will be evaluated step by step and Tc can't be matrix and variable at the same time.

1-Visitor
March 21, 2014

Werner Exinger wrote:

The subscripts are not required.

Not sure about that. If the calculated variables should be (symmetrical) 3x3 matrices, the subscripts would be necessary.

Good point Werner I didn't think of that.

25-Diamond I
March 21, 2014

Find attached a version which fixes the above mentioned 3 errors and 3 further ones.

4) The definitions of Vc and Pc are missing the matrix indices i,j on the LHS

5) The definition of the matrix Tr makes use of the matrix Tc, so it should be move after the definition of Tc

6) you define a vector Pc at the top, but you don't use it and at the end you overwrite by a matrix Pc!?

Hope the attached is what you are trying to do.

1-Visitor
March 21, 2014

Nice work. I have never seen integers used like that before.

25-Diamond I
March 21, 2014

I simply tried to keep as close to the orgiginal file as possible. So lets see if that is what Ricardo was looking for and if he ever will find this thread again as it obviously was placed at the wrong subspace at first and moved over to here by Mark.

24-Ruby IV
March 21, 2014

Sorry, R is a built-in constant:

R.png