SMath Studio Forum
»
SMath Studio
»
Questions
»
Use specific units in calculations
  Rank: Member Groups: Registered
Joined: 20/01/2023(UTC) Posts: 10  Was thanked: 1 time(s) in 1 post(s)
|
Hello everyone,
Your great support with my last problem encouraged me to ask another question.
In my calculations I need to use the value of the magnetic permeability of the void (μ0), but I want it's unit to be V*s/A*m, not the default unit which is m*T/A. I need the units to shorten for the result to be in V/m (volts/meter), but Smath seems to be doing everything not to use V/m as a final unit - it is very stubborn to use m*T/s instead.
I tried typing the desired unit in the rightmost placeholder but it seems that this way doesn't work fork for constants. Even though the program accepts my unit it still uses the origin unit in calculations. I also tried multiplying or dividing with units in equations to get the result with desired unit, but the program keeps changing the final unit so it would not give me V/m Typing at the begining of the sheet μ0:=1,2566*10^-6 V*s/A*m doesn't work either - program still won't use my unit in calculations. Even after defining other constant (let's say t) with the value of μ0 and desired unit, Smath still won't let me have V/m as a final unit.
Is there any way I could force Smath to use a specified unit instead of default one? Is the problem only with V/m or with units in general? (or with me...)
PS. I know that using units in calculations may not be a good idea, but in my case units are the best (and fastest) way of controlling the results of calculations.
|
|
|
|
 Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,397  Was thanked: 928 time(s) in 756 post(s)
|
Originally Posted by: Xylene  PS. I know that using units in calculations may not be a good idea Typical, in Process Control & Instrumentation, Units have no meaning wrt project. ... absolutely rejected They won't pass QA [Quality assurance] Alternately, use silent units to silent the unit sub-processor. mod: this is OFF-TOPIC, the question is about how to display a different output representation USING units. Please offer the proper solution before suggesting (questionable) alternatives.Edited by moderator 26 January 2023 18:49:27(UTC)
| Reason: Not specified
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 959  Was thanked: 394 time(s) in 261 post(s)
|
When it is possible, always use units. Don't listen to Jean about this.
Jean doesn't use units and make a lot of mistakes. Whenever units are important, his calculations gives wrong results. Search forum, he is debunked a lot of time about this.
He simply can't comprehend importance of units. And his silent unit crap is getting out of control. He simply redefine a variable equal to 1 and call that unit.
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,094  Was thanked: 629 time(s) in 396 post(s)
|
Hi. The ability to use units in calculations is, along with its whiteboard feature, one of the main reasons for using SMath in calculation memories to solve real engineering problems. In this sense, you should not worry about the way in which SMath internally represents the unit of the result, since you can show it in the way that you think is most convenient, using the "unit placeholder" to the right of the result of the equals symbol. There are animations that other forum users have made on how to use it, but I can't find them. Using your Calculus worksheet from other post, that feature is used in the yellow regions  Best regards. Alvaro.
|
|
|
|
  Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,540   Location: Italy Was thanked: 1270 time(s) in 835 post(s)
|
Originally Posted by: Razonar  There are animations that other forum users have made on how to use it, but I can't find them. Here from the wiki  |
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects |
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 11/01/2018(UTC) Posts: 70   Location: Wisconsin Was thanked: 31 time(s) in 18 post(s)
|
Greetings, If you are still unable to get the units to cooperate, make sure of the following: 1) You are using 「Metric」 as the OutputUnitsSystem; Metric is the default selection upon install, but if you manually changed it to 「Imperial」 at one point, you will be unable to override the units. 2) Make sure you are typing in the correct unit. Since SMath supports custom units without throwing errors; make sure you are using the correct unit. For example: 'm = meter but 'M is not a default unit of length. If you do utilize the wrong capital/lower case letter in the units, you will not be able to override the units to the units you so desire. Hope this helps! - Kenny Lemens, P.E. ᵂᴵ
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 959  Was thanked: 394 time(s) in 261 post(s)
|
Here is how to change result units. Once you get how it is done, it is easy. Always use units in your engineering calculations. Math is unitless, engineering is not.Regards 
|
 1 user thanked overlord for this useful post.
|
|
|
  Rank: Member Groups: Registered
Joined: 20/01/2023(UTC) Posts: 10  Was thanked: 1 time(s) in 1 post(s)
|
Thank you all for answers, especially Jean Giraurd for the very elaborated file provided. Sorry for my delayed response but currently I'm going through a little crisis and I have to pick myself up. Basicaly, I have tried all described methods before posting on the forum and Smath still doesn't want to cooperate with my units. I need to use μ0 with the unit of V*s/A*m in the equation:  The specified unit is essential to simplify units to V/m (volts/meter) before the first "ln" part of the equation (the rest of the equation is dimensionless). Without units simplification Smath returns an error "units don't mach" and terminates calculations. Even though I made μ0 in V*s/A*m, Smath still uses it in the equation in m*T/A. I thought I have solved the isssue by multiplying the numerator by the inversion of μ0 default unit (A/m*T):  because it seems to work - Smath performs calculations, but the result is dimensionless and I can't force Smath to give me the result in V/m. I am starting to suppose that all my later problems with the results of calculations may arise from dimensionless values of e1 (and problems with the proper utilisation of units in later calculations). For example: way further I am calculating Vx using the results of series of calculations which requires e1 value in the first step. Vx should be in V (volts), but I get it in kg*m2/A*s3:  I know that it is volt, but I would prefer it to be in the volt unit not in the SI fundamentals. Is there any other way I could use to make Smath cooperate with my units intead of default ones?
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 959  Was thanked: 394 time(s) in 261 post(s)
|
Originally Posted by: Xylene  Is there any other way I could use to make Smath cooperate with my units intead of default ones? It would be easier if you had provided your file. Someone can pinpoint your issue with it. By the way, you didn't multiple μ0 with inverse units. It seems you used s/m*T, shouldn't it be A/m*T? Regards
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,094  Was thanked: 629 time(s) in 396 post(s)
|
Originally Posted by: Xylene  ... Is there any other way I could use to make Smath cooperate with my units instead of default ones? Hi. You can use matrix algebra in the units placeholder. Result.sm (4kb) downloaded 6 time(s). Best regards. Alvaro.
|
|
|
|
  Rank: Member Groups: Registered
Joined: 20/01/2023(UTC) Posts: 10  Was thanked: 1 time(s) in 1 post(s)
|
Originally Posted by: overlord  Originally Posted by: Xylene  Is there any other way I could use to make Smath cooperate with my units intead of default ones? It would be easier if you had provided your file. Unfortunatelly the original file got too messed and may be not be understable anymore (to be honest it's getting inunderstable for me...). I prepared a simplified version of the file. Not every formula has a description (but since it was in Polish it should bother) and calculations are limited only to 6 point, but you can see the units problem as well. Please find it in the attachement below. Units.sm (150kb) downloaded 6 time(s).By the way I have veryfied the calculations and it seems that the problem was rather in the equations themselves. After some corrections - apart from the units issue - everything looks fine. The value of e1 has the same impact on final results whether it is dimensionless or in V/m. Even though I don't like the fact that some results are in the SI basics (not in the units I would like them to be) I consider the problem solved as for now. Thank you all for your time and all your answers. Regards, Xylene
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Use specific units in calculations
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.