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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

regarding absorber stage modelling

ptc-5491269
1-Newbie

regarding absorber stage modelling

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

1 ACCEPTED SOLUTION

Accepted Solutions

H San,

try this...

regards

Andy

View solution in original post

9 REPLIES 9

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

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

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

HI Andy,

Thanks for your reply, i have made it bit more consistent now.

But still getting the following error,

The array index is invalid for the array.

Not sure. Any help.

Thanks

Santhosh

Hi,

2 further items to fix.

1. in the f2 function GMw and TGMw are referenced as 2-D arrays so they need to be defined as 3 X 3 array when f2 is callednot the 1-D as current.

2. LM & TLM both need to be initialised for some of the range.

I'm not sure which are necessary:

it is easy to set up 2 for loops for i & j & set LM[i,j<-LMw & the same for TLM

defining 1 or 2 edges LM[i,0<-LMw and/or LM[0,j<-LMw might be sufficient

If i & j are the same ranges this can be simplified.

Regards

Andy

Hi Andy,

Thanks for the reply. I am sorry i dint get your point.

Can you please help with the file.

Thanks

San

H San,

try this...

regards

Andy

Thanks Andy once again.

San

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.

Top Tags