Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spreadsheet program for engineering units? 5

Status
Not open for further replies.

chrisjj

Computer
Jun 22, 2012
10
0
0
GB
Can anyone recommend a Windows spreadsheet program that understands engineering units?

E.g. will convert values automatically between units I have specified, and automatically display the units of the results of expressions of values in units e.g. energy (J) / mass (g) / temperature (J) -> specific heat (J/g/K).

Thanks.
 
Replies continue below

Recommended for you

In the specific heat example, while J and kJ work as an output unit, e, Wh, BTU do not seem to work. It seems to accept BTU as an input unit, and the return unit not specified appears to do the conversion correctly, but when I put BTU.kg-1.K-1 in H53, it claims to not be able find a "To" unit.

TTFN
faq731-376
7ofakss
 
surfer200 & IRstuff - there is a similar problem in both cases with non-SI compound return units. The program can handle input made up of any combination of recognised input units (including kg, kgf, and m with any prefix), but if these combine to make a unit that is not in the list it can't break down the compound non-SI units into their constituent parts. The solution is to add more units to the non-SI list.

For stressess I will certainly add kgf/cm2, kgf/m2, and also kgf.cm and kgf.m for moments. At the moment I don't intend to add ton/m2 and ton.m because of the numerous different "ton" definitions. Note that the "tonne" (1000 kg) is already listed as a unit of mass, but a tonne.m will not be a recognised unit of bending moment, so you won't be able to convert lbf ft to tonne.m, but you will be able to go from lbf ft to kgf.cm.

For specific heat I will add common non-SI units to the list, but they won't include BTU.kg-1.K-1 or other mixed systems (unless there are examples of mixed units in common use).

Regardless of what I add to the list, it is editable, so people can add whatever they like. I'll describe the procedure for doing that in my next blog post on the units topic.

Thanks for the feedback.

Doug Jenkins
Interactive Design Services
 
While Modelica isn't a spreadsheet program, it does feature exactly the capability described by the OP:


"The acausality makes Modelica library classes more reusable than traditional classes containing assignment
statements where the input-output causality is fixed"

which means that Modelica can solve for any variable defined in a system model.

TTFN
faq731-376
7ofakss
 
Whilst Modelica certainly looks interesting, the linked presentation says it is "a language for modeling of complex cyber physical systems i.e., Modelica is not a tool", so it doesn't seem to be what was asked for in the OP.

I was hoping I might get some feedback on my spreadsheet:
- Does it do what was wanted?
- If not, what is lacking?
- Any other comments?

Doug Jenkins
Interactive Design Services
 
"Modelica," in the abstract, is indeed only the specification for the language. However, there are at least 4 different implementations of Modelica, of which, OpenModelica is an open-source and free implementation. OpenModelica's install file is about 350MB, so not a tool for the faint of heart or short of memory.

TTFN
faq731-376
7ofakss
 
I have recently posted a new version of my Units4Excel spreadsheet, which you can download from here:

I have also asked the Wikipedia people if they would like to post a link to it, but they seem a bit skeptical at the moment (uderstandably, I suppose), so if anyone thinks it's the best thing since sliced bread, could you post a comment to that effect here:

If on the other hand you think it's a load of rubbish, please let me know :)

Doug Jenkins
Interactive Design Services
 
I just downloaded the latest version of the spreadsheet and I am having issues with the evalu function. It says that N is not a compatible unit but when I leave off a set unit it gives kg.m.s-2 which = N. I can use the convertA function to then convert the result of evalu which correctly gives N as the units though. I tried with both the spreadsheet and the add-in and had the same issue with both.

Thanks,
Daniel
 
I just downloaded the latest version of the spreadsheet and I am having issues with the evalu function. It says that N is not a compatible unit but when I leave off a set unit it gives kg.m.s-2 which = N. I can use the convertA function to then convert the result of evalu which correctly gives N as the units though. I tried with both the spreadsheet and the add-in and had the same issue with both.

I'll have a look. Could you post the actual example you are having the problem with?

Doug Jenkins
Interactive Design Services
 
I downloaded the updated version and N seems to be working fine now. However, I'm now having an issue with Pa. It is giving the same units not compatible message that N was. I've attached the sheet that I was using (I was testing on the EvalU tab near the bottom). Great work on this spreadsheet though, probably the most useful add-in that I've come across.

Thanks,
Daniel
 
 http://files.engineering.com/getfile.aspx?folder=2e7b6bd7-3208-439e-9c51-782b02723ed0&file=Units4Excel_Ds.xlsb
Daniel - thanks for the comments and the feedback.

The problem with Pa was I had it defined in the table as m-2.N, rather than N.m-2. I forget why I did that, but I suspect it was a workaround for N not working properly, which stopped working when N was fixed. Anyway, now both N and Pa seem to work OK, both with other SI units and non-SI units.

One thing that still doesn't work as well as I would like is that it doesn't recognise N.m as being equivalent to J. The problem is that the way it is set up at the moment I can't specify N.m as being both a bending moment or torque and energy. I'll see if I can fix that in the next version.

Download as before:

Doug Jenkins
Interactive Design Services
 
Status
Not open for further replies.
Back
Top