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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Solve block

AS_9781967
7-Bedrock

Solve block

Hello

 

I am pretty new to mathcad. please help me to solve this .

image.png

17 REPLIES 17

Well, there are a few things that need to be corrected to make the solve block work, but do you really need a solve block?

 

Attached file (Prime 4.0) explains.

I tried the way you suggested however i am unable to get the answer any suggestions where I might went wrong?

Hi,

Two things.

1) You can include the worksheet to help solve your problem.

Capture.JPG

2) Can you give a little more insight into the problem you are solving?

Prime can't solve integral equations, but it can solve some differential equation (at least numerically).
Not sure if the following would come close to what you are looking for (note that a^2/|a|=|a|)

Werner_E_0-1632817546403.png

 

The simple ODE can easily solved symbolically by hand (separable variables ), of course

Werner_E_0-1632819293142.png

 

P6 worksheet attached

 

Related question: what if you have you have two velocities (e.g. velocity in the x and y directions) that effect each other.  Such as when the spin on a effects trajectory. 

You can deal with that easily.  Attached is an Express file that solves both the original problem and the two dimensional one with Euler's method, Express cannot do solve blocks and ODESOLVE.)

LucMeekes
23-Emerald III
(To:AS_9781967)

You can read in the online help information how you need to set up a solve block with Odesolve to solve a set of differential equations:

LucMeekes_0-1633379833140.png

So in your case that would be solmething like:

LucMeekes_2-1633380092124.png

 

But you also have to be consistent. Those (t)'s are necessary (red arrows).

This may be the result:

LucMeekes_1-1633381146065.png

Prime4 file attached.

 

Success!
Luc

Thanks again for the help.  It looks like it’s working except, when I add the correct units to the parameters, I get an error that says “the units are not compatible”.  Can you tell me what the problem is

Prime has different labels for things: 

Fred_Kohlhepp_0-1633484240672.png

Units are blue bold text: 

Fred_Kohlhepp_1-1633484299278.png

If Prime gets the labels wrong: (note the difference, mi/hr are not units)

Fred_Kohlhepp_2-1633484345554.png

Then the units won't balance and Prime throws a flag.  (The units in your equation for acceleration don't balance anyway!)

 

Attached is another file; it starts the same as my previous one, but I've added to it using units (and deriving drag and spin equations for a baseball.)  Hope it helps!

Hi @Fred_Kohlhepp , @LucMeekes 

Thank you for the details Fred.  Can you please tell me what's missing in the file I attached I changed the label to units and still it dont work? What units should be used in my file to make it work as i wanted to have it simplified 

LucMeekes
23-Emerald III
(To:AS_9781967)

I think it should work as in the attached. (I'm also limited to Express, solve block's don't work.)

 

Success!
Luc

After applying the units from above worksheet it is giving me error "The calculation is not converging to a solution..." Any thoughts?

Hi,

 

The solve block works when you limit the range of the ODESolve to 17 s of range.

You can see why from the graph of the solution.

See enclosed file.

Can you let me know  instead of solve for positions and velocities at specific times given constants like initial position, velocity, drag and spin, what if I instead want to solve for these values, such as in the attached worksheet?

 

LucMeekes
23-Emerald III
(To:AS_9781967)

You have a few odd things in there.

Your D is undefined, I suppose the - should be a :=

It seems that you have a system of non-linear differential equations (DE) that you need to solve. There are two functions of t, Vx(t) and Vy(t) that are undefined. To solve that, the solve block should probably end with an Odesolve, not with Find. And you don't need guess values, but I think it doesn't hurt to use that space for defining some constants.

Two of the guess values defined are Vx and Vy. Now this is a problem, because the DE also uses these symbols, but as functions of t. I should guess you want to provide the initial conditions V0x and V0y instead...

Then, for a system of DE with two functions and order 1, you can have only 2 initial conditions, you provide 8.

I wonder if the system is solvable without all those integral expressions.

 

Success!
Luc

 

Thank you for the input.  Ultimately, what I’m trying to do is to determine the values for the variables listed in the “Guess Values” section of the solve block that “best fit” the expressions in the “Constraints” section of the solve block.  NOTE: the six integrands listed at the bottom of the “constraints” are data that were collected on the system.  I would like to have the ability to add even more data and use something like a “miner” function to fit it to the expressions.  How would you suggest I do that?  

Hi,

Look up in help: "About Curve Fitting Functions"

There you will find what you seek

Cheers

Terry

Top Tags