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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Unit issue in solve block

athurin
4-Participant

Unit issue in solve block

Hi,

I have tried to solve equations of current ramping up and down in a power converter, including the series (parasitic) resistances in the circuit. Solve block works fine and finds sensible results, except ... one of the 2 parameters I am searching (aa) is a duty cycle, and therefore, should be unitless, and it comes out of the solve block with a unit (Amps, like the other variable). I just can't find what I've got wrong, since all the equations I input will only work if the variable is unitless, so why on earth would the solve block add a unit that doesn't work ? Unless I missed something ...

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Seems to be a bug in Prime. You can avoid this effect if you provide a (unitless) guess value different to 0 (e.g. 0.01). As an alternative you could write aa:=0*UnitsOf(1) to use zero as guess and make it clear for Prime that its unitless.

View solution in original post

6 REPLIES 6

Seems to be a bug in Prime. You can avoid this effect if you provide a (unitless) guess value different to 0 (e.g. 0.01). As an alternative you could write aa:=0*UnitsOf(1) to use zero as guess and make it clear for Prime that its unitless.

athurin
4-Participant
(To:Werner_E)

Thanks Werner. I should have remembered I had unit issues with zeros before...

Werner Exinger wrote:

Seems to be a bug in Prime.

Yes.

In Prime 0-1A=-1A but must bee an error.

In Prime we have dynamic unit checking and this enables the long asked for feature of being able to use different dimensions in a matrix. Static unit checking made it possible for Mathcad to detect the correct unit when the value was zero and no unit was provided. Obviously the developers tried to rescue some of this convenience and so we have 0+1A=1A (which is not that bad) but in other cases Primes produces wrong results as in the case of the sove block Adrien provided.

athurin
4-Participant
(To:Werner_E)

It makes a lot of sense, and it is the second time already that you help me with this issue, and I should have remembered from last time. I am happy with the benefits of dynamic unit checking, and as long as the problem is known and has workarounds (no 0 initial guess, use of Zero and zero, etc), I'm fine with it. It's just important to understand the situation.

Thanks again Werner !

use of Zero and zero,

Ahhh! I wasn't thinking of the units(!) "zero" and "Zero". Of course using aa:=zero would be the best way to cope with your problem.

I didn't know about zero and Zero unless Jonathan mentioned them here http://communities.ptc.com/message/265787#265787 but obviously I completely forgot about them.

I wasn't able to find those "units" mentioned in the help and they are not offered by the insert unit button either.

Top Tags