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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

solve function without a symbolic answer

maggen
5-Regular Member

solve function without a symbolic answer

is there a way you can make solve not make the symbolic answer and go directly to the numeral solution. when i turn in rapports is seems unnecessary to include it. i linked an example. just to be clear i want the big unusable chunk in the middle out.

maggen_0-1611328968111.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:maggen)

Yes it is possible to get a numeric answer straight away. There are two options:

1.

Define C() as a function of all (other) symbols in the expression, and use the symbolic solve to get its expression.

The call C() with the actual numerical values supplied as arguments, in numerical evaluation.

Here's an example:

LucMeekes_0-1611334866050.png

 

2.

Use not the symbolic solve but use the numeric root() function.

 

 

Success!

Luc

View solution in original post

9 REPLIES 9
LucMeekes
23-Emerald III
(To:maggen)

Yes it is possible to get a numeric answer straight away. There are two options:

1.

Define C() as a function of all (other) symbols in the expression, and use the symbolic solve to get its expression.

The call C() with the actual numerical values supplied as arguments, in numerical evaluation.

Here's an example:

LucMeekes_0-1611334866050.png

 

2.

Use not the symbolic solve but use the numeric root() function.

 

 

Success!

Luc

maggen
5-Regular Member
(To:LucMeekes)

how would the root function look for this because i cant seem to make it work

 

Werner_E
24-Ruby V
(To:maggen)

I guess that the use of the root function as suggested by Luc seems to be the most straight forward way.

His functional approach is the way I would prefer, though.

 

If you want to use the symbolic "solve" the way you did, you should use additional the "simplify" command.

Furthermore it looks like you ran into a problem with Primes infamous autolabeling - the various Omega seems to be labelled differently as otherwise the symbolic (which does not know anything about units) would collect and/or cancel them.

It also seems that you don't use units consequently as C comes out dimensionless in your picture. Or you didn't use any units at all and your Omega was meant to be a lower case omega (s = j*omega) ?

 

A word of caution: When using symbolic evaluation you should use the modifier "float" with great care, because it not only affects the display of the result but also limits the precision of the whole calculation!

You may consider posting the worksheet.

maggen
5-Regular Member
(To:Werner_E)

i tried to use units in the function altogether but that wouldnt work so i ended up removing the units from all of them and then manually putting units on C to get units on the result. but anyway here is the sheet

 

Werner_E
24-Ruby V
(To:maggen)

If you work with units, then s must be of dimension frequency, unit Hz or 1/s

And you'll have to check your equations, especially:

Werner_E_0-1611341640333.png

As r is a length (9 cm), you can't add it to a scalar (10*1=10).

 

maggen
5-Regular Member
(To:Werner_E)

i know that you cant add a unit to something without unit, which is why i removed all units. the problem is that this is some wierd function. our teacher told us there were "hidden units" so the 9 that is multiplied by the radius might have some unit, but i dont know which.

the 10*1 isnt a scalar the 1 has the unit mm but i removed mm from it since i removed all units. if i gave units to the 1 and the radius the answer would be given in meters which i know is wrong. The formula has stated that the answer is in Henry so i just put that in the end.

Yeah i know but s is unit Hz but if i give all components of the C equation units it says the units dont match up which is because of the part in the picture, however the formula for Ztrans is a formula given by the teacher so i doubt that it's wrong. i linked the 2 formulas given by the teacher

maggen_0-1611351561426.png

 

ttokoro
20-Turquoise
(To:maggen)

If A, the length of winding in cm, is not 1 cm, then, 

 

image.png

Werner_E
24-Ruby V
(To:maggen)

The formula given for the calculation of the self inductance is the approximation formula by Wheeler. Its an empirical formula which expects dimensionless variables representing the exact units given in the explanation for that formula. I would suggest to divide by the appropriate units directly in the formula rather than tampering with the variables:

Werner_E_0-1611379042470.png

But I doubt the correctness of the formula given for Z.s ! Either it should be named Y.s=.... and Y.s=1/Z.s or you have to switch nominator and denominator.

make a simple unit check - the fraction as shown in the screenshot gives you the complex conductivity (usually named Y) and not the complex resistance!

Using the correct units you may solve for C symbolically

Werner_E_1-1611379768152.png

but you can also use Prime numerical methods, which are

1) a solve block:

Werner_E_2-1611380081271.png

or 2) the "root" command

Werner_E_3-1611380138179.png

You may notice the very small imaginary parts we get when using numerical methods which actually should be zero. You may cope with that by using just the real part or using the absolute value:

Werner_E_5-1611380604059.png

 

Prime 6 worksheet attached

 

 

 

maggen
5-Regular Member
(To:Werner_E)

I didn't think about removing units in the formula i will for sure do that in the future. and thanks for showing the multiple ways to get a numeral solution.

Top Tags