SMath Studio Forum
»
SMath Studio
»
Questions
»
Formula returning units don't match.
 Rank: Newbie
Groups: Registered
Joined: 26/07/2024(UTC) Posts: 7  Location: Winnipeg
|
Hey all,
I was wondering if there was a way to make a formula run even if the units don't match. I've tried right clicking the box and ignoring units and sometimes this works, but more often than not it doesn't. This mostly happens with empirical equations for calculating constants/reduction factors. For a simple example, one of the equations might be " 1- P/Pf " for instance, where P and Pf have the same units. This is obviously simplified, and that specific example may in fact work with the ignore units. But if I have an example similar to that, with different units it just refuses to work unless I manually input the value.
I just want the equation to run with whatever value is outputted from prior equations. I'm not sure if this is possible but I'm hoping someone here can help; I don't want to re-input numbers every time I make a change to something above in my sheet.
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 289   Location: Cali, Colombia Was thanked: 124 time(s) in 83 post(s)
|
Hi, Please attach your file to try to deal with it.
best,
Oscar
|
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 26/07/2024(UTC) Posts: 7  Location: Winnipeg
|
Test.sm (31kb) downloaded 5 time(s).See attached. It is the calculation near the bottom of the last sheet. I have manually inputted the unit of 'N' to the Pr equation on page 1, since the Kzcg and Kc constants were making it not run, even though they are unitless. I had to override Kzcg and Kc as well since they are empirical and the units are not to be used in the Pr equation.
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 289   Location: Cali, Colombia Was thanked: 124 time(s) in 83 post(s)
|
Hi, The problem is that Kzcg MUST BE adimensional. Please see attached file Test UNITS CHECKED.sm (35kb) downloaded 7 time(s).Edited by user about a month ago
| Reason: Not specified
|
|
|
|
 Rank: Newbie
Groups: Registered
Joined: 26/07/2024(UTC) Posts: 7  Location: Winnipeg
|
Originally Posted by: oscampo  Hi, The problem is that Kzcg MUST BE adimensional. Please see attached file Test UNITS CHECKED.sm (35kb) downloaded 7 time(s). So to clarify for my own understanding, any time I want to use a constant I must divide out my units instead of setting the equation to ignore units. Does this apply if I am dividing two numbers of the same unit; will it auto-cancel out my units to make it dimensionless? Further to this, if I override the units in my output, say I set Kzcg to "Newtons" by editing the right hand side of the equals sign, will this unit carry to every other instance I use Kzcg? I notcied that the value for Kzcg changed when you made your change, from 0.77 to 0.1279. My hand calculated number is 0.77. When I change your denmomintor of d^2 from mm to m, I get the correct number of 0.77. Is this to say, that you must divide out the base unit for example meters, newtons, etc when calculating the factors? Or more likely case is that I divide out whichever unit is used in the empirical equation; if it calls for an input of meters, I divide out meters.
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 289   Location: Cali, Colombia Was thanked: 124 time(s) in 83 post(s)
|
Ok. Your analysis is correct. You must observe that base units on SMath are [m,kg,s, ...etc] so, when you need express a dimensionless factor you must operate with the apropriate base unit to cancel it.
Best, Oscar
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Formula returning units don't match.
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.