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

Gravel

## Function will not converge

Hi,

I am calculating dynamic pressures on a moving gate and cannot get the integral for vertical force Fv(t) to converge. I have tried adjusting the convergence tolerance but this does not seem to make any difference. Any clues would be appreciated.

Cheers

Ross

Tags (1)
20 REPLIES 20

## Re: Function will not converge

See if the attached helps.

Alan

## Re: Function will not converge

Alan,

Yes indeed your modification did help. If I now take this function and wish to use it in an Odesolve block as the final step I hit the wall with another error. Any clues to de-bug this would be appreciated.

The problem I am trying to solve can be unstable with divergent response, however, it should be stable and converge when the damping (zeta) is a modest value (i have used 0.05 or 5%).

Thanks again

ross

## Re: Function will not converge

Ross

The attached works - the ODE solver worked ok, it was just the plotting that confused it (because of a previously defined set of t's).

However, I notice that the solve block contains M(t), which is a function of Fv(t), which is in turn a function of pp(t,y), which is a function of dtheta/dt - in your case a previously set function of dtheta/dt, not the one you are currently solving for within the solve block. Is this what you intend?

Alan

Edit. Also, it is a function of theta, through F(t,s). Again this isn't the theta that the ODE block is solving for. Is this right?

## Re: Function will not converge

 Edit. Also, it is a function of theta, through F(t,s). Again this isn't the theta that the ODE block is solving for. Is this right?

Guess no and it makes quite a difference. See below.

BTW, I wondered why everytime I ran the sheet I had an Excel sheet ("height 2.xls") in the same directory the file would be in. At last I found that the evaluation of Z= is the cause - in its properties the creation of that file is activated. It was first introduced in Ross' version 5 sheet. Nasty, that hidden way to write to my disk. Its cleared in the attached sheet.

## Re: Function will not converge

Although this gets in the thetadot term it doesn't account for the theta term under the integral in F(t,s), which is part of the definition of pp.

Alan

## Re: Function will not converge

 AlanStevens wrote:Although this gets in the thetadot term it doesn't account for the theta term under the integral in F(t,s), which is part of the definition of pp.

Oh,yes. I missed that. Was a quick hack - too quick! So the the sheet would need some more modifications as I think odesolvbe will not work with a function to solve for as a parameter of another function involved.

To be honest I wasn't really fully aware that its so easy to export data using a simple evaluation ;-)

## Re: Function will not converge

 Werner Exinger wrote: So the the sheet would need some more modifications as I think odesolvbe will not work with a function to solve for as a parameter of another function involved.

I think one would have to obtain dF(t,s)/dt and solve for F simultaneously with theta etc. However, it's possible that Ross has just used the same symbol (theta) for two entirely different parameters, so it's not worth thinking about in more detail until we hear from him!

Alan

## Re: Function will not converge

Alan,Werner,

Theta(t) is indeed consistent in all of the integral equations and equation of motion in the solve block.We could delete the assignment of theta(t) as a sinusoidal function at the top of the sheet. I included this to determine what a reasonable initial condition would be for thetadot(t), and I have used thetadot(0)=0.013 in the solve block. If the theta(t) defined at the top of the sheet is used throughout then this is not correct as the system would be forced continuously with this sinusoidal function. We really only need an inital velocity perturbation to get the system going to then see if unstable behaviour results.

The system response is expected to be a sinusoidal function that will vibrate at the natural frequency wo. The problem requires an initial disturbance thetadot(0) = some positive value, and the system will be stable/unstable depending on water height, damping etc.

If we elimiate this theta definition at the top of the sheet then F(t,s), pp(t,y), Fv(t), M(t) would all need to include theta as a variable.

When I included theta in F(t,s,theta) the symbolic solution gives an error as being recursive - which I guess makes sense. So I am bit stumped where to go from here?

Cheers

Ross

## Re: Function will not converge

Yes, seems to be not that easy. Alan suggested to solve for F(), too and use the derivative of F in the solve block. But I am not quite sure, how.