Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Oct 21, 2015
09:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 21, 2015
09:41 AM

ode with unknown initial conditions

Hi everyone,

I have a problem solving an ODE. I want to calculate the deflection of a beam, but at the beginning I don't know the force and the force application Point. So I make a guess of it. With a good guess or with iterations (very much work) I can solve it. But because I have many situations like this, I want to do it automatically.

In the attached file I have simplified the problem and explained it more detailly.

Thank you,

Stephan

Solved! Go to Solution.

ACCEPTED SOLUTION

Accepted Solutions

Oct 22, 2015
10:12 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
10:12 AM

One way of doing it would be like the following:

You may want to compare accuracy against the values you had found:

At first sight it looks like you can find an a-value for any given F.2-value within a given range and vice versa (I have chosen the values you found in the following examples)

but as soon as you lower the value of CTOL, no solutions are found

Regards, Werner

PS: Instead of "find" you could use "minerr" (especially when you think that there is no perfect exact solution and so it will find a solution with lower values of CTOL, too) but your choice of using "minimize" was wrong.

11 REPLIES 11

Oct 21, 2015
09:54 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 21, 2015
09:54 AM

You're using 3.1, so I can't open your sheet (stuck in 3.0.)

I solve beam deflection by solving the differential equation [EI d^2y/dx^2 = M(x)]. You can develop the equation for moment along the beam for whatever force arrangement you have. Two additional constraints are required--if it's a cantilever these would be displacement and slope at the origin.

Oct 21, 2015
10:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 21, 2015
10:25 AM

That's right, this point I already have.

I have a cantilever beam, length **l**, fixed at x=0 [boundary conditions: w(0)=0; w'(0)=0].

The Problem is, that I don't know at the beginning of the calculation where the force application point **a** is and also the Force **F** is unknown.

So the equation for the Moment is:

M(x)=F*(a-x) from x=0 to x=a and

M(x)=0 from x=a to x=l

But I know the following:

w'(a)=0

w(a):= is a function of x.

Another point is, that the Moment of inertia is not constant. In my example I simplified it to a linear relationship of x. In my more complicated case there are multible integrals in it, so that there is no easy solution.

I can solve the Problem with iterations manually or with a good guess, but I want to do this automatically, because that costs a lot of time and I have many problems like this.

Oct 21, 2015
11:09 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 21, 2015
11:09 AM

You can make I a function of x as well as moment. If I(x) requires integrals it will slow down computation; one way to speed that is to create a vector of I at points along the length and fit a polynomial (function "regress") to the curve.

I have problems with tension and compression along with lateral loading, so I need terms of M(x) + Faxial y(x) was well as variable I(x). They all can solve.

Oct 21, 2015
02:10 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 21, 2015
02:10 PM

Like Fred I can't read your Prime 3.1 file, but perhaps this will help

Turn odesolve into a function. Here's an example that was written in Mathcad 15:

The syntax in Prime is a little different, but not much. Theta is now a function of the two parameters i and j (in your case, it would be a and F, your unknowns). Remember that odesolve returns a function, so theta(i,j) is a function that returns a function. We now need to convert this function to a simple function that returns values, rather than another function. This is such a function for a single value of i, j, and t:

If you want to pass it a vector of values for t use this form of the function though:

You don't want to use the first version for many values of t, because it will call the odesolve block for every value. The second version will call it only once. Now if I don't know what i and j are, but I can write two equations where everything other than i and j are known, for example

Theta(i,j,0)=0

Theta(i,j,1)=1

I can use a solve block to find i and j (in other words, use a solve block to do the iterative process that you are doing by hand)

Oct 22, 2015
01:06 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
01:06 AM

Hi Stephan. First, rewrite M2 as M2(x,a,F2). a & F2 are unknowns, so M2(x) is useless for odesolve. Now you have 4 conditions, two as boundary or initial conditions for the odesolve, and other two for some solve block or minimize function. For a 2nd degree ode, don't use more than 2 border or IC. But, just because a and F2 are unknowns, write the odesolver as w2(a,F2) = odesolve(w2(x),l). This is what Richard and Fred tell you to do. Now, your ode solution w2 is a function of two parameters (variables, but with some degree of ... of ... ok, variables at least. Actually parameters is an argot in math and technically doesn't exists). Now make a good guess for a and F2, and call minimize (or maybe a solve block) for w2(a,F2).

Hope this helps.

Best regards.

Oct 22, 2015
04:49 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
04:49 AM

Ok, I think I am close to the right solution. Is the minimize-function used correctly? The program tells me it needs a scalar or a matrix for F2. As it can be seen in the figure, F2 is a scalar, but I also defined it as a matrix, both does not work.

I found the right parameters manually by try and error (index cor) and the corresponding function **sol, **that fulfills the boundary conditions. But finding them by the solve block does not work.

I am sorry, but I am very new to Mathcad.

Oct 22, 2015
07:27 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
07:27 AM

What am I missing?

You have set the problem up correctly, and it works as it should. You have

Now you can solve the beam deflections for any load and position sol1 :=w3(a1,F1), sol2:=w3(a2,F2).

You want to solve for the load and position that give you a specific deflection and slope at wherever this position is?

I'm not sure that's a solvable problem.

Oct 22, 2015
10:12 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
10:12 AM

One way of doing it would be like the following:

You may want to compare accuracy against the values you had found:

At first sight it looks like you can find an a-value for any given F.2-value within a given range and vice versa (I have chosen the values you found in the following examples)

but as soon as you lower the value of CTOL, no solutions are found

Regards, Werner

PS: Instead of "find" you could use "minerr" (especially when you think that there is no perfect exact solution and so it will find a solution with lower values of CTOL, too) but your choice of using "minimize" was wrong.

Oct 22, 2015
11:03 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
11:03 AM

Thank you very much to everyone, you helped me a lot.

I also used the find-function, but I did not define the functions S and S1. I directly used the function w3 and its derivation in the solve-block. Then there was always a mistake. Doesn't matter, now I know how to do it.

Oct 22, 2015
05:43 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
05:43 AM

Hi Stephan,

For the future - don't forget to save your worksheet in PDF or XPS file formats for preview (and its contents).

Oct 22, 2015
10:18 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 22, 2015
10:18 AM

VladimirN. wrote:

Hi Stephan,

For the future - don't forget to save your worksheet in PDF or XPS file formats for preview (and its contents).

For the future - don't forget to save your worksheet in png formats for direct view on screen without downloading files.