Vectorize and pull data from Matrix

Vectorize and pull data from Matrix - Messages

#1 Posted: 4/13/2016 4:37:26 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Jean will be proud (algorithm) and disappointed (would like to use vectorize)
I would like to know two things ... Vectorize and Program.sm (14 KiB) downloaded 43 time(s).
1) Can I convert my algorithm and use vectorize?
2) I want to pull the diameter that corresponds to greater than Vel.min
#2 Posted: 4/13/2016 8:47:16 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

You can supply the data table to piping designers, and live them finish the work.
In 1987 and earlier, piping designer used a glorious software "Massbal"
At this time, none of these computing gadget existed. Vectorising does not apply
in your project. Smath is not equipped to search in table. For a unique scientific
application on long data table, one would have to design a lot of modules.

Jean

Forum Elsid Pipe Size.gif



Vectorize and Program.sm (28 KiB) downloaded 44 time(s).
2 users liked this post
ElSid 4/13/2016 9:07:00 PM, frapuano 4/14/2016 4:08:00 AM
#3 Posted: 4/13/2016 9:12:32 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Thank you. Never used Augment before ...
Not for the piping designers, for me to double check other calculation. Everything is off of "packaged" software and I like to double check the maths. Curious if a second routing can be used to solve for the the D. If V.i,j>V.max keep solving, else, stop. Putting kids to bed and will look into that
#4 Posted: 4/14/2016 12:58:57 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... brute force quick.

Forum Elsid Pipe Size. Search Diameter.gif
#5 Posted: 4/14/2016 9:12:40 PM
CBG

CBG

77 likes in 312 posts.

Group: User

I think the simplest solution is to include a conditional "if" in the loop "for"

Vectorizacion.png
#6 Posted: 4/15/2016 12:08:14 AM
Mike Kaganski

Mike Kaganski

184 likes in 434 posts.

Group: User

Just remove erroneous declarations, and use DS in function invocations (your D variable is defined having 11 rows, Q has 2 rows, you should use DS having 2 rows).

scr32.png

Vectorize and Program.sm (14 KiB) downloaded 45 time(s).

P.S. My screenshot is just a follow-up of previous suggestions (Jean's and CBJ's).
My sheet is another approach without any loops, just vectorize() end eval().
С уважением, Михаил Каганский
#7 Posted: 4/15/2016 12:20:58 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Virus on fresh computer ... had to restart. Never let spouse, kids, etc on administration account ... "just to check email".

CBG is more of what I envisioned. I don't understand the array variable. Will need to put in my sheet to fully understand. I was going about it in a different way, this i better.

Mike, your solution is when I know the pipe sizes. I am solving for the pipe sizes from a data table ... essentially, they don't want to solve, they want to use the Crane manual.
#8 Posted: 4/15/2016 1:44:15 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

In that project, there are two erroneous concepts:
1. Non SI systems are too specific. Behind the scene, the General Chemical Engineer
does lot of conversion to accomodate the low level Imperial team work in some way.
2. I Chemical Engineering, they don't use volumetric flow rate: they use "mas flow rate"
... Jean , I want 10 t/hr of water @ 100°C ... all that will come into my orifice
plate calculations. I better take into account the water weight density @ 100°C.
The error would be immense on the top of an unknown [+/-] 0.6%] error from the orifice plate.

From what I can see, tabulating some sort of useful data will be the other way around .
The first column is the Q [massflow rate], from which you calucalte the speed versus
the diameter. So, there will be as many speed column as there will be diameters.
Doing so: the data table will be visual for checking. QA controllers, they don't care
gadget calculations, they go by the book. Also, consider what a CAS like Smath can do.
The truth table is not a gadget, it is almost the only tool to search in data table
that dont have integer values , though you can round off but can't surely round the speed
to integer values.

Jean
#9 Posted: 4/15/2016 9:10:30 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

I agree that when I get into "processes" type items, I do all calculations in "mass flow rates". Hell, half my time is fixing systems due to that very issue.
Wrote

... the General Chemical Engineer does lot of conversion to accomodate the low level Imperial team work in some way.

That's what units in software is for
Wrote

...Chemical Engineering, they don't use volumetric flow rate: they use "mass flow rate" ...

Here I have to digress to some application knowledge. It really depends on WHAT you are after or doing. In terms of water, think HVAC or water works, between 100F and 40F, your "error" is 0.5% from standard conditions (density and specific heat). If you go to hot water (say 200F), that changes to 2%. Per Bell and Gossett 1960s design manual
Quote

the reduction in in the density and specific heat is not normally taken into account

Why? because the viscosity of water "decreases" as it becomes hotter. At 200F, the viscosity is ~80% of standard water. A net WIN hydraulically and it simplifies the calculations.

Many of us use tools like SMath, Mathcad (I refuse to use excel) for "engineering". You know what the difference between an engineer and a scientist is, right? Answer ... close enough! Using Pi=3.14 works for us. If you were to do the math and the answer is 498 and you use 500 in an empirical formula, that is close enough (just compensate for units in the empirical formula).

These sheets, for me, are sanity checks and done on my time.
#10 Posted: 4/15/2016 11:17:43 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

What's wrong with the counter? Getting "0" for first output, not 1.5.
Vectorize and Program a.sm (9 KiB) downloaded 42 time(s).
#11 Posted: 4/15/2016 12:10:37 PM
CBG

CBG

77 likes in 312 posts.

Group: User

You have an error, the "Line " command should be in the second loop.
Annex corrected fileVectorize and Program a_r1.sm (9 KiB) downloaded 45 time(s).
1 users liked this post
ElSid 4/15/2016 2:31:00 PM
#12 Posted: 4/17/2016 2:11:51 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Struggling with the matrices as I cannot figure out how to add components mid-way through the program loop. Right now, I drag down the handle, then individually cut and paste things down as necessary. If there is an easier way, please let me know

A little inspiration to conclude this project ...
  • CBG, you counter was what was perplexing me the most. This is originally what I was after Answer.smz (3 KiB) downloaded 32 time(s).
  • Jean, you always say to be get inspired. After looking at your table, I expanded on my output Answer with Table.smz (3 KiB) downloaded 38 time(s).

On to the other sheets
#13 Posted: 4/18/2016 12:59:01 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

at boiling 100°C atmos, pressure viscosity of water 0.282 cp
at 0°C => 1.787 cp , a ratio 16% ... not 80%
Pi is PI, Smath resident constant, not 3.14
Forget unit in calculations, use formulas based on unit, formulas
much older than software. Just put a "unit decoration" on last result.
HVAC made me freeze in summer ...
Engineering works are NOT empirical, they must be tracable not by rules of thumb.
The vectorise has been corrected already.

Cheers, Jean
#14 Posted: 4/18/2016 1:31:32 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Elsid,

Nowhere else than in my Mathcad web site [maybe killed by PTC] you will get the visosity of water
Here in Smath http://en.smath.info/forum/yaf_postst7460_Water-Viscisity--cp.aspx

Jean
  • New Posts New Posts
  • No New Posts No New Posts