Units into a loop - units - Сообщения
I need help with a problem:
There is a loop for (_;_;_) and a lot of lines below it. One variable, with formula, automatically, in the loop, has unit [s2/kg], but should be [mm/N]. I can see the unit from loop outside it. I cannot change the unit inside the loop and the "result" of this variable is "The result is higher then maximum available positive number". Outside the loop, when I change the unit to [mm/N] the result is correct.
How can I change the unit inside of loop?
sergio
(I hope) I resolved the problem changing Oprimization of the for loop from symbolic to nomeric. But the behavior of the program is quite strange for me.
One part of my formula looks like this (other parts are similar):
Y := ZF*hG*(hH-hP+hQ) / EF using the unit we have: mm-3 * mm *(mm-mm+mm) / MPa and it should give as the result unit mm/N. But smath gives s^2 / kg !!! Very strange.
I tried to set the unit of Y value before loop - no effect. The result of Y is using inside the loop to calculate other formulas and seting this unit after the loop is useless.
Wroteit is necessary to sterilize the units
Engineering works have their own units from Standards, easy to manage.
SterilizeUnits.sm (16 КиБ) скачан 51 раз(а).
Wrote..., in the loop, has unit [s2/kg], but should be [mm/N]. ..
Hi. But that's correct: [mm/N] = 0.001 [s2/kg]. They have the same dimensions.
Wrote...
One part of my formula looks like this (other parts are similar):
Y := ZF*hG*(hH-hP+hQ) / EF using the unit we have: mm-3 * mm *(mm-mm+mm) / MPa and it should give as the result unit mm/N. ...
This seems some kind of Bernoulli energy balance, but can't identify which one. Notice that you can't get from [mm^3/MPa] values in [mm/N]
Wrote...
But smath gives s^2 / kg !!! Very strange. ...
Again, if you want something in [s2/kg], [mm/N] have the same dimensions.
Wrote...
The result of Y is using inside the loop to calculate other formulas and setting this unit after the loop is useless.
That's the power of using units: that's a symptom that Y could be bad defined inside of the loop. Eventually it's only a dimensional mistake which have not effect in the final numeric unitless value, but usually it isn't the case. Maybe if you post your file someone can give better help.
Best regards.
Alvaro.
My formula is from the standard for flange connection calculation EN 1591-1.
Y [mm/N] value(s) is axial compliance of the bolted joint related to F force(s).
mm/N and s^2/kg it is indeed the same unit.
WroteThanks for reply.My formula is from the standard for flange connection calculation EN 1591-1.Y [mm/N] value(s) is axial compliance of the bolted joint related to F force(s).mm/N and s^2/kg it is indeed the same unit.
So, z isn't an elevation and h's aren't heads!.
In Y := ZF*hG*(hH-hP+hQ) / EF
ZF rotational flexibility in mm^-3 (I misread that before and take only mm), EF modulus of elasticity in MPa and h's geometrical parameters for the gasket in mm. Then [mm^-3]*mm*mm/MPa gives mm/N, and all looks correct. Notice that in this case the "M" of MPa kills two "m" from mm. Usually formulas in the normative have the coefficients for transforming units inside, which make confusing write them in SMath, where you need to take out those coeffs. But here the answer in the "calculator mode" don't need those coeffs because the cancelation.
Given that you're translating a copyright standard I understand that you can't share the worksheet. But maybe can share a screenshot with one of the Y' loops with units showing the error message.
Best regards.
Alvaro.
WroteMy formula is from the standard for flange connection calculation EN 1591-1.
Maybe be you know already but you can check EN 13445-3 for flange calculations too.
It uses Taylor Forge method for calculations and results have bigger thickness values.
Regards
WroteWroteMy formula is from the standard for flange connection calculation EN 1591-1.
Maybe be you know already but you can check EN 13445-3 for flange calculations too.
It uses Taylor Forge method for calculations and results have bigger thickness values.
Regards
Yes, I know that. But I have to work with 1591-1. I try create a tool for check results of our software (written with Delphi).
-
Новые сообщения
-
Нет новых сообщений