File Reference

File Reference - MathCAD "Reference" Function - Сообщения

#1 Опубликовано: 27.01.2016 16:52:00
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Moving forward on transferring some engineering calculation sheets from Mathcad to SMath ...
Did the file "Reference" feature get added to SMath? I have several files where I calculate one variable and that value is an variable to another sheet
Example (theoretical files): Calculate heat load due to room geometry and construction in Heatload.sm and import that value to Pump_Flow.sm which feeds into my Pump_Head_Design.sm.

Many of my calculations are cascading. I saw some mention of it on structural type files, but no closure on how to do this.
#2 Опубликовано: 28.01.2016 00:06:37
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

AFAIU [As Far As I Understand], your approach is over killed.
Make a matrix of the Heatload for so many geometry/construction,
Plug that at the top of a work sheet. Next, depending upon the
Heatlod wrt season, determine the min/max massflow rate [on the
same work sheet]. Next proceed to pump sizing wrt the piping
configuration, i.e: the geometry and construction.
Pump sizing is done vs type/supplier of the pump, it is an
iterative procedure in few steps done manually or automatically
from advanced software like "MassBall".
Result: you have ONE work sheet.

That stand alone setup will delight QA control.

Jean
#3 Опубликовано: 28.01.2016 07:54:02
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Jean,
This is a simplified example. Others also tie in to a calculation. Electrical, process, mechanical, civil.structural ... I have Mathcad sheets that are set up this way, in use, and already QC'd from back to MathCAD 8 and others love that it's modular.
Question remains, did SMATH ever get the file cascade feature (i.e MathCAD "refeferce")? I know some structural people were discussing this with beams, but I found no resolution.
#4 Опубликовано: 28.01.2016 11:25:23
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Write/read file is only valid for data, not formulae.
I never tried plugging formulae [formulas] in a reference sheet,
but can see a good use of it, vg: collect all dozen PDF/CDF ...
statistical formulas. Also, the monkey busines Bessel that I have
already published in Smath forum [the visitor never acknowledged !].
Another application would be collecting "Image matrices".

Salut Ioan !
comme dans "La Guerre des Tuques" on garde le Fort.

Jean
#5 Опубликовано: 29.01.2016 15:46:54
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Wrote

Write/read file is only valid for data, not formulae.
Jean


For now, data is fine. I know there is a different discussion about passing functions from sheet to sheet ... which would be awesome!

I'm OK with "global" definitions of functions being copied from sheet to sheet (e.g d and placed in hidden areas as I ended up doing that in several Mathcad sheets until I started "referencing" a "function" sheet.

Wrote

For my practice I use this steps:

* I write all values that I need as commons in one ore more files, using wfile() command.
* Anywhere I need such already known values, I read these files, using rfile() command.


Thank you, I'll look into these commands as I was blissfully unaware of them
---
Update: How do you get "rfile" to read in the same directory? Attaching two general sheets that are on my desktop. "wfile" appears to work, but "rfile" does not. Working in a network, I would like "rfile" to open the file in the same directory.
Thanks
Файл не найден. Файл не найден.
#6 Опубликовано: 01.02.2016 14:46:27
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

ioan92
Ha. I figured it out using the structural Beam thread (Your work). Here is my simplified working version for reference.
Not sure what the other items in your files do for me?Файл не найден.Файл не найден.
#7 Опубликовано: 01.02.2016 17:34:43
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Wrote

I coupled many informations in a sys { compound.


"{ compound" ??? I missed that. In the side panel, under functions, correct?

I'm reading into the work being done for structural beam so I can use it on some mechanical items!
The w/rfile is what I need. Instead of using the whole sheet, I'll just have a bunch of "data" files for all values that need to be sent. I can live with that.

If I wanted to bury the data into a subfolder of the working directory, can that be done? Something like putting all of the write data in currentdirectory/DoNotDelete

Also; settingdirectory (CWD) does not appear to do anything. Different directory from everything else
#8 Опубликовано: 01.02.2016 18:24:40
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Settingsdirectory() is different than other directories. What does this do? Capture.PNG

Also, can you set the output directory to one level down, automatically?
Something like CWD:=concat(CurrentDirectory(""),"DoNotDelete")
I would like to create a subfolder for the data files.
The directory did not get created, but the output is fine
#9 Опубликовано: 01.02.2016 18:49:50
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Not allowed to add semicolon before "fordata". I've tried. Latest version of SMath

OK, you need to PHYSICALLY create the subfolder in the working directory. Your screenshot is similar to what I posted but didn't work. Wondering why your screen shot shows a semicolon, and mine worked with a comma delimeter. Adding the subdirectory is the ticket.
#10 Опубликовано: 02.02.2016 00:14:45
Ryan Freund

Ryan Freund

19 сообщений из 339 понравились пользователям.

Группа: User

Increasing demand for a "better (no offense intended)" include() function... Yeah! :d
#11 Опубликовано: 02.02.2016 01:16:13
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Elsid,

I like simple setups, things that go like the horse back home.
As you open this work sheet, it will assign the file WRITE/READ
directory [in C:\SmathFile] .The remaining is Smath functionality.

No problem to store formulas, recover via symbolic.
You could get the formula calculate a discrete data set,
write to file and recover. But that would be scratching
the left ear with the right hand.

"append" to file does not exist in Smath. Lot more simple
and genious is the "collector", example given.
I have not exhausted filing matrices and nested data.

Maybe like Mathcad: WRITE/READ in program ? RemToDo.

Jean

File WriteRead.sm (24 КиБ) скачан 80 раз(а).
#12 Опубликовано: 02.02.2016 01:28:55
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

As a side note, "Append" in Mathcad was used to collect results
that appear/disappear [temporary results]. A good example is the
advection wave bouncing/back phenomenon.

Jean
#13 Опубликовано: 02.02.2016 11:22:35
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Wrote


... it will assign the file WRITE/READ directory [in C:\SmathFile].
File WriteRead.sm (24 КиБ) скачан 80 раз(а).


Jean,
1) Deleted
2) You are naming both data dump files "Belzier" so yes, the second write is overwriting the first, even with different variables (p and p1)
3) Yes, you can fix the working directory; however, I want it with the project. Much like item 2, I do not want to re-write files that are used for other calculations/projects.
#14 Опубликовано: 02.02.2016 13:00:10
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Yes Elsid: it does exactly what you want it to do,
even store/retrieve formulas [retrieve symbolic].

Jean
#15 Опубликовано: 02.02.2016 21:21:30
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Salut Ioan, thanks for commenting.

However, you can't create a folder with the CurrentDirrectory command; the folder must be created from outside, previously. What you can is only to set the current folder.
==> With such direct short addressing in C, it creates the special folder Microsoft style, opens NotePad. But it is resident only from the Smath work sheet it was created.

==> "copy/paste" ... you can't me more right ! the simplest/safest way to work, as long as within Smath work sheets. No point to copy an image or graph from work sheet to any other application , the "World" is blind to Smath creation.

==> as you say: no much use for storing formulas in file [deceptive to some user]. No matter how good one may think of himself, between the mind spark and the keyboard, the passage must be treated via the eye. "logistic", simple ? not so yet if you would have to see the expansion of "exp" ... you would drop on the knees if instead of "exp" it would be "x^y"... you would drop dead [tout mouru] on more complex formulation . As far as I have seen in Smath, there is NO use for storing formulas in file, even as referenced work sheets. The only use for cross referencing work sheets is for Hanbook of multiple functionalities.
I started Mathsoft Collaboratory on its birthday, few visitors. When I left it, I was read 3000 times in two days, no demand for cross referenced work sheets ... No need in Mathcad, why needed in Smath ?

It is obvious that each of these files is created with a different codification: mat(), sys() and el().
==> Right: we are used to Smath as an equation editor but within itself it works in its own code that NotePad opens in Smath script format. Quite instructive for those mad of scripting maths [from my innocent view point]. How would it work copying an Smath code to Sagemath, Scilab, Matlab ... ?

Very interesting thread.

Jean
1 пользователям понравился этот пост
ioan92 03.02.2016 02:49:00
#16 Опубликовано: 02.02.2016 23:13:34
Ryan Freund

Ryan Freund

19 сообщений из 339 понравились пользователям.

Группа: User

I can assure you that there is much demand to transfer information between worksheets.
Maybe not so much if you are just using Smath for Math equations, etc. but once you want to use it for some sort of engineering application/project. The ability to transfer information would be awesome.
Read/write is good because it offers lots of control but it is a bit messy and cumbersome. I think the include() function has promise.
1 пользователям понравился этот пост
ioan92 03.02.2016 02:50:00
#17 Опубликовано: 02.02.2016 23:54:53
Ruben Sidranski

Ruben Sidranski

17 сообщений из 463 понравились пользователям.

Группа: User

Wrote

...Mathsoft Collaboratory on its birthday, few visitors. When I left it, I was read 3000 times in two days, no demand for cross referenced work sheets ... No need in Mathcad, why needed in Smath ?

Jean


Jean,
I too was in the collab. And much like your argument against units (there are merits). I can assure you that the vast amount of help on my questions, yours responses included, went into sheets that where referenced in one way or another. I always "dumbed" down the questions on a single sheet for ease of explanation to my question. Example: see my posted sheets/attachements above vs. ioan's and your responding sheets/attachments. Mind you, I always learn oodles more from these types of responses, so thanks to all who go above and beyond in answering the question and showing more uses. You saw the forest from the trees!
Ciao
---
BTW, from our internal Mathcad collab
Цитата

This 5-Part set of linked Mathcad sections is intended both for use as a project design template and as a training tool.

1 пользователям понравился этот пост
ioan92 03.02.2016 02:49:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений