Skip to main content
1-Visitor
January 29, 2014
Solved

regarding absorber stage modelling

  • January 29, 2014
  • 9 replies
  • 4409 views

Hi All,

I am new to Mathcad and i am trying to design a framework for absorber modelling.

With a simple function i am able to solve the mass and energy balance for the absorber on a vertical slice of the packing with 3 horizontal sections.

But when i try to do the same for the vertical section.

It gives the error.

Thanks

Lisa

Best answer by AndyWesterman

H San,

try this...

regards

Andy

9 replies

12-Amethyst
January 29, 2014

Hi Lisa,

I don't know if its all of the problem, but MathCad does struggle with units.

For some of your functions you are returning variables with units of either mol/s or K & this is not allowed in MC15.

In these cases you have to strip the ubits & reinstate them later. see attachment.

regards

Andy

1-Visitor
January 29, 2014

Hi Westerman,

Thanks for the reply. I am considering a 3 horizontal section and 3 vertical section of the packing. I started with one vertical slice. But when i solve i could see that for my liquid it gives a 4th column.

I didnt understnad that.

In your attached file the last section with function f2 when it tries to solve both rows and columns it gives me an error saying the function should be unitless. How can i handle this.

Also instead of calling the f0 function again and again would it be possible to speed up the calculation by any means.

thanks for your time.

san

12-Amethyst
January 30, 2014

HI,

The problem you are having with the 4th row stems from the way you address the various arrays.

Capture.PNG

For GMout & TGMout you are creating a new variable & storing the output of the fo function in elements 0-2 ( [i ).

For LM & TLM element 0 is the initial value & the outputs store in elements 1-3 ( [i+1 ) , hence the extra row.

Youo will need to decide what information you want to return from this function & it should be possible to modify the code.

The last (re-definition) of f2 needs a few changes to match what has been done in the preeceding functions, e.g. f1 as above:

Capture.PNG

1. LM[0 & TLM[0 will need to be defined, otherwise the function call does not have a value & will fail.

2. Each of the definitions for GMout, TGMout , LM & TLM will need to have the units added to ensure that each array element has the same units

Remember that mathcad 15 cannot allow different units for elements in the same array.

e.g. each element in array TLM must have the units of "K"

3. then there is an issue that I can't resolve. You refer to LM & TLM inconsistently, some places use "LM[i" other places use "LM[i,j" . You will need to decide what is correct for your application & make the appropriate changes.

After that (if you change to the LM[i,j form) then the initialising of the LM array changes to LM[0,0 & may , or may not work - it will need to be looked at again.

Regards

Andy

Werner_E
25-Diamond I
January 29, 2014

Apart from having all function definitions disabled there was a problem with f0. You had defined (and used) two different definitions of f0 - I renamed one of them f00.

Furthermore theres seems to be a problem with the definition of f3(). I guess v should be w and in calling the function to calculate c the second parameter can't be 0, I guess.

PS.: If you repost fur a further question it may help if you reformat you sheet trying to fit everything neatly in order preferrably just within one page widht.