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 called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Circuit ODE set up and solution - symmetrical faults

cadtelsim
10-Marble

Circuit ODE set up and solution - symmetrical faults

I have the step by step hand calculations for this type of problem but I really would like to learn the ptc Mathcad analysis for it and somehow the ODE Mass Spring problem doesn't help me make the connection. Could someone please help get me started with this?

ACCEPTED SOLUTION

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

Older versions of Prime would not have allowed to evaluate a solve block with "Find" symbolically, but Prime 9 does.

But you can't symbolically evaluate a solve block with "odesolve". "odesolve" relies on numerical algorithms and will never return a symbolic result.

If you need a symbolic solution for an ODE, you can't use a solve block with "odesolve" but rather a symbolic evaluation with "solve" as shown in the help here: Solving ODEs Symbolically

Keep in mind that this feature is new and a work in progress. Don't expect it to provide solutions for more complicated ODEs. Nonetheless its worth to give it a try.

But then, are you sure that you really need a symbolic solution?

If you just want to play around and compare the results with different input values you could also use a parametrized solve block.

For example the example from the help: Solving ODEs

Lets make the coefficients of x'' and x and also the first initial value x(0) a variable. As you can see we can turn the solve block into a function x(...).

Werner_E_0-1726704757522.png

f1 is the function as given in the help, the other two stem from the same ODE but with different coefficients and initial condition.

 

View solution in original post

24 REPLIES 24
LucMeekes
23-Emerald III
(To:cadtelsim)

You should state that you're using Prime 9...

Looks like homework, so YOU have to do it.

 

Look up the help information ( "?" in the top right corner of the Prime window ) on solving ODE's:

- using a solve block ( Solve blocks => Solving ODE ).

- symbolically ( Symbolics => Symbolic evaluation => Solving ODE's symbolically ).

If you experience problems, come back here with at least an attempt to your solution.

 

Success!
Luc

Hi Luc,

 

Thank you for your response. I should clarify that I am indeed using Mathcad Prime 9 for my analysis, and was not previously aware that this version might lack some functionalities, such as support for solve blocks. Could you please advise on how I might access a version of Mathcad that retains full functionality? 

 

I appreciate your concern regarding the nature of my query as homework-related. To clarify and ensure that my request for assistance is only due to my interest in effectively applying Mathcad to these types of problems, I attach my complete solution for your viewing. 

 

I have reviewed your solution to the similar problem you directed me to, but I am still struggling to make the connection, particularly in understanding the equations you used for your matrix setup. Any guidance or starting points you could provide would be greatly appreciated.

 

Thank you for your time and help.

 

Best regards,

 

Werner_E
25-Diamond I
(To:cadtelsim)

Prime 9 sure has its limitations but why do you think that it will not support solve blocks?? It sure does!

If you don't pay for Prime (any version), then you have a 30 day trial period with full functionality after which it falls back to a free, but limited mode, called Prime Express. You will still be able to open any worksheet (not such made with newer versions) for viewing, but if they contain so called premium features you will not be able to let it recalculate. Amongst a lot of others solve blocks are considered premium features by PTC and if you are just using Prime Express you will not be able to use them, no matter which version of Prime (current version by the way is Prime 10).

You can tell that you are using the free Prime Express version when the title bar says "PTC Mathcad Express Primes" and when you see small black closed locks in the menu ribbon, e.g. at "Solve Block", "Programming", etc.

 

I'm using a paid version of Mathcad and I have had problems with using solve blocks symbolically. Maybe I'm misunderstanding something, but the reason I thought it does not support solve blocks symbolically is that the previous poster referred me to a post of his saying that. https://community.ptc.com/t5/Mathcad/Symbolic-operator-in-solve-block/td-p/723780

Werner_E
25-Diamond I
(To:cadtelsim)

Older versions of Prime would not have allowed to evaluate a solve block with "Find" symbolically, but Prime 9 does.

But you can't symbolically evaluate a solve block with "odesolve". "odesolve" relies on numerical algorithms and will never return a symbolic result.

If you need a symbolic solution for an ODE, you can't use a solve block with "odesolve" but rather a symbolic evaluation with "solve" as shown in the help here: Solving ODEs Symbolically

Keep in mind that this feature is new and a work in progress. Don't expect it to provide solutions for more complicated ODEs. Nonetheless its worth to give it a try.

But then, are you sure that you really need a symbolic solution?

If you just want to play around and compare the results with different input values you could also use a parametrized solve block.

For example the example from the help: Solving ODEs

Lets make the coefficients of x'' and x and also the first initial value x(0) a variable. As you can see we can turn the solve block into a function x(...).

Werner_E_0-1726704757522.png

f1 is the function as given in the help, the other two stem from the same ODE but with different coefficients and initial condition.

 

So, I'm trying to reproduce this using my own example, and I have problems right off the start, and I'm not changing much besides the input. x(0)=0 doesn't work, no luck with x(0)=x0 either. I went through the help example parameters and can't pin point anything. 

Werner_E
25-Diamond I
(To:cadtelsim)

You sent a blank file ... ??

I apologize, My mistake. 

Werner_E
25-Diamond I
(To:cadtelsim)

multiplication dot betwen omega and t is missing

I guess you will want t to run from 0 up to ...(20).

So the initial condition must be x(0)= <initial value>

 

You have still unknowns omega, alpha in your equation. Odesolve is a numerical only way to solve an ODE and so you either must provide values for all unknowns before or make them arguments of the solve block function (and provide the values later when you call the function.

There is nothing wrong in using the correct names (the function is i, the coefficient of i(t) is R, etc.)
Also you should use units - after all thats a major feature of Prime that its able to deal with units (and throws an error if the units don't match).

You could make R, L, V, omega, alpha, initial value i0 and also the endvalue t.end arguments og the solve block function and so you could later vary all of them.

Werner_E_0-1726795858360.png

So you could create different functions with different input values

Werner_E_1-1726795886807.png

Werner_E_3-1726795947742.png

etc.

But if you just need the result for a set of specific input values, you don't need to turn the solve block into a function:

Werner_E_4-1726796029961.png

 

And of course you always can try to use the symbolic solver

Werner_E_5-1726796084438.png

Werner_E_6-1726796096368.png

 

 

 

Thank you, this looks really good. So, I can't even open these files because my version of Mathcad is older, they don't even show up in the MCD converter.

When I try to create functions as you showed: I get the function argument error: 

VM_10380528_0-1726798143260.png

and further i(t) is not defined 

VM_10380528_1-1726798185249.png

Is there any additional way to open the file you attached so I can examine closer?

Werner_E
25-Diamond I
(To:cadtelsim)

I can't debug a picture - especially not the part which is not seen. Obviously you did not define the function i with seven arguments as shown in my pic.

 

Keep in mind that in the first example "i" is a function wih 7 arguments and this function creates a current function based on these arguments. So the assigment i2 := i(.....) means that i2 now is a function in t which you could plot or evaluate.

 

In the second example the solveblock already returns a function i which depends on time t and can be evaluated or plotted.

 

The benefit of the first example is that you can create functions based on different input values and compare them side by side, maybe in a plot showing both graphs. If you don't need this, stick with the second example where the solve block is not parametrized.

 

Attached a Prime 9 sheet with the relevant regions.

The symbolic evaluations should either be done before the used variables are defined or after they are cleared for symbolic use using clear.sym(...).

Thank you for the worksheet in Prime 9, and for presenting it the way I can learn and reproduce. 

Have been searching for a way to clear variables after they have been defined, didn't know about clear.sym().Both approaches are useful and I'll be using both. Hopefully I can get update my version. 

Why does my f2 plot superpose on f1 plot as opposed to show independently like your example? Thanks,

Werner_E
25-Diamond I
(To:cadtelsim)

f2 does not overlay f1, the graph rather overlays the t-axis 😉

Here is your plot with f1 in thick green:

Werner_E_0-1726956329254.png

Its just a matter of scaling the y-axis.

You can change the first, second and last value at each axis and that way you can change the scaling and also the step width.

I just changed the last value on the y-axis (which was about 360) in your plot to 5 - and voilà ...

Werner_E_1-1726956417850.png

 

 

Thank you, so I changed the y-axis value and sure enough the graph showed up, but how would I know what to look for next time to trouble shoot in a similar case?

Werner_E
25-Diamond I
(To:cadtelsim)


@cadtelsim wrote:

Thank you, so I changed the y-axis value and sure enough the graph showed up, but how would I know what to look for next time to trouble shoot in a similar case?


Next time you know that it may help to zoom in. Unfortunately Primes plot does not provide an easy to use, comfortable zoom facility.

The less you know about the math and the properties of the functions you plot, the more you have to depend on trial and error 😉

Hi, Could you please see why this plot doesn't show up. I'm using Prime 10 and I've checked all the units. Thank you. 

It pulls up with Python, but I can't get it in Mathcad

cadtelsim_0-1727550538313.png

 

Werner_E
25-Diamond I
(To:cadtelsim)


@cadtelsim wrote:

Hi, Could you please see why this plot doesn't show up. I'm using Prime 10 and I've checked all the units. Thank you. 

It pulls up with Python, but I can't get it in Mathcad

 

 


?????

The sheet you posted just showed an error because of "Column_B" being an undefined variable, but I cannot spot any attempt to make a plot!!!

 

Basically you have two option to make a plot. Either provide a vector of values for the x- and y-axis each, or you define a function which you then plot, probably by defining a range for the x-values.

Here is an approach using the first variant by creating vectors for both axis:

Werner_E_0-1727564173039.png

 

BTW, this thread is getting a bit confusing. I think it would be more appropriate to open a new one for further questions. This also has the advantage for you that a new thread is usually given more attention.

Prime 10 sheet attached

 

EDIT: Added grid lines

Werner_E_1-1727565462688.png

 

ttokoro
20-Turquoise
(To:cadtelsim)

image.pngimage.png

ttokoro
20-Turquoise
(To:ttokoro)

For a short circuit at generator terminals at t=0 and generator initially open circuited:
In this case, i(t>0)=0.

If the circuit voltage source is shorted, then..

image.pngimage.pngimage.png

image.pngimage.png

ttokoro
20-Turquoise
(To:ttokoro)

Answer for turn on the voltage sources.

image.png

Thank you for the help on the worksheet. 

Why did you define parameters the way you did? 

VM_10380528_0-1726955567857.png

 

 

ttokoro
20-Turquoise
(To:cadtelsim)

Without units, we can use variavles for Laplace transform. 

After get the answers you want, then add the units if need.

Thank you so much. 

Announcements

Top Tags