cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Can't find variable with unit?

SA_10621772
8-Gravel

Can't find variable with unit?

SA_10621772_0-1700365528743.png

I want to find the variable Ag but can't export it as cm^2. Am I doing something wrong?

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:SA_10621772)

Why do you think the cm^2 would be the correct unit for Ag?

Actually its length * time^2!! [Ag] = kg/ksc

Werner_E_0-1700396699025.png

But by dividing by the constant of gravity g you can write it as

Werner_E_1-1700396767828.png

which is probably what you actually have in mind.

 

The symbolic engine you use when you make usage of "solve" is a third party add-on and does not integrate that perfectly in the philosophy of Mathcad or Prime as it does not know anything about units, They are treated as unknown variables and thats the reason you can't change the "units" you get in the result of a symbolic evaluation.

Normally you could follow the symbolic evaluation by a numeric (=) one or assign the result to a variable and evaluate it numerically in an extra region and then you could change the units as usual.

But you can see that the units in the symbolic result are not printed in bold blue which means that they are not recognized as units. This would make a numeric evaluation fail!

Werner_E_2-1700397454670.png

There is a calculation option you can set and sometimes helps with a problem like this

Werner_E_3-1700397563070.png

And you are lucky as in your case it does help

Werner_E_4-1700397774471.png

If it doesn't it may also help to replace the global definition of the unit ksc by a normal definition.

 

But as you are just looking for a numeric result, a suitable option would be to use a numeric method instead of the symbolic one. Prime offers a solve block with "find" or the "root" function.

For instance the root function used by providing an initial guess value

Werner_E_5-1700398259035.png

or use the root function by providing a range for Ag

Werner_E_6-1700398324620.png

 

As you can see I replaced Ast by the appropriate expression in Ag twice.

If you need to see Ast or if it would be a lengthier and more complex expression, you would have to define it as a function of Ag:

Werner_E_7-1700398562342.png

 

 

 

 

 

 

 

 

 

 

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:SA_10621772)

Why do you think the cm^2 would be the correct unit for Ag?

Actually its length * time^2!! [Ag] = kg/ksc

Werner_E_0-1700396699025.png

But by dividing by the constant of gravity g you can write it as

Werner_E_1-1700396767828.png

which is probably what you actually have in mind.

 

The symbolic engine you use when you make usage of "solve" is a third party add-on and does not integrate that perfectly in the philosophy of Mathcad or Prime as it does not know anything about units, They are treated as unknown variables and thats the reason you can't change the "units" you get in the result of a symbolic evaluation.

Normally you could follow the symbolic evaluation by a numeric (=) one or assign the result to a variable and evaluate it numerically in an extra region and then you could change the units as usual.

But you can see that the units in the symbolic result are not printed in bold blue which means that they are not recognized as units. This would make a numeric evaluation fail!

Werner_E_2-1700397454670.png

There is a calculation option you can set and sometimes helps with a problem like this

Werner_E_3-1700397563070.png

And you are lucky as in your case it does help

Werner_E_4-1700397774471.png

If it doesn't it may also help to replace the global definition of the unit ksc by a normal definition.

 

But as you are just looking for a numeric result, a suitable option would be to use a numeric method instead of the symbolic one. Prime offers a solve block with "find" or the "root" function.

For instance the root function used by providing an initial guess value

Werner_E_5-1700398259035.png

or use the root function by providing a range for Ag

Werner_E_6-1700398324620.png

 

As you can see I replaced Ast by the appropriate expression in Ag twice.

If you need to see Ast or if it would be a lengthier and more complex expression, you would have to define it as a function of Ag:

Werner_E_7-1700398562342.png

 

 

 

 

 

 

 

 

 

 

First, pay attention to the difference between mass and force.  the unit kg is mass, the unit kgf is force.

 

Second, you may not define a variable in terms of an undefined variable--The whole thing gets thrown out.

 

Third, symbolic math (your solve construct) does not usually understand units.

 

Fourth, a little basic algebra is all you need.  Attached file

Even basic algebra can have its pitfalls 😄

Werner_E_0-1700402052289.png

 

SA_10621772_0-1700412363597.png

 if I don't want to shift the equation. Can you find it in the first equation?

just like solve, solve block, or any command

Werner_E
25-Diamond I
(To:SA_10621772)


@SA_10621772 wrote:

SA_10621772_0-1700412363597.png

 if I don't want to shift the equation. Can you find it in the first equation?

just like solve, solve block, or any command


Then you should look at my first answer in this thread where I showed how to make your approach with the symbolic "solve" command work OK and how to get the solution using the numeric "root" function.

The picture you post was just the correction of a small oversight in Fred's sheet.

 

@SA_10621772 

Maybe you meant DL and LL to be in kgf rather than just kg ??
Then even the symbolic result looks like you expected it to be.
Here with an additional solution using a numeric solve block

Werner_E_0-1700414728449.png

 

Prime 9 file attached

 

Announcements

Top Tags