Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Non linear system solving

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71431] Re: [mg71369] Non linear system solving
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sat, 18 Nov 2006 04:41:02 -0500 (EST)
  • References: <200611160552.AAA08230@smc.vnet.net>

I'm a mechanical engineering student and I find your problem
interesting. If you have the equations for the system in closed form,
you can differentiate all equations with respect to a1.

You can provide a starting condition from FindRoot at some initial
value of a1 by using the non-differentiated equations.

After that, you can use NDSolve on the differentiated set of equations
(with the initial conditions from FindRoot) and possibly get the
solution for all the other variables as a function of a1.

This is a form of homotopic continuation. Carl Woll told me about it
on the MathGroup.

Here is an example from kinematics:

In[1]:=
link[1] = 3*{Cos[a], Sin[a]};
link[2] = 8*{Cos[b[a]], Sin[b[a]]};
link[3] = 6*{Cos[c[a]], Sin[c[a]]};
link[4] = {-7, 0};

In[5]:=
eqnList[1] = Total[link /@ Range[4]] == {0, 0}

In[6]:=
eqnList[2] = Thread[eqnList[1]]

In[7]:=
eqnList[3] = D[eqnList[2], a]

In[8]:=
vars[1] = Variables[eqnList[2] /. Equal | Sin | Cos -> List]

In[9]:=
vars[2] = DeleteCases[vars[1], a]

In[10]:=
rep[1] = a -> Pi/2

In[11]:=
guesses[1] = Thread[{vars[2], {Pi/4, 3*(Pi/2)}}] /. rep[1]

In[12]:=
sol[1] = FindRoot[eqnList[2] /. rep[1], guesses[1]]

In[13]:=
eqnList[4] = Flatten[{eqnList[3], Apply[Equal, sol[1], {1}]}]

In[14]:=
sol[2] = NDSolve[eqnList[4], Head /@ vars[2], {a, 0, 2*Pi}]

In[15]:=
vectors[1] = FoldList[Plus, {0, 0}, link /@ Range[4]]

In[16]:=
rep[3] = List /@ Thread[a -> Table[i*2*(Pi/360), {i, 1, 360}]];

In[17]:=
Needs["Graphics`Animation`"]

In[18]:=
animation[1] = Graphics[Line[vectors[1]], PlotRange -> {{-3, 10}, {-3,
7}}, Frame -> True] /. rep[3] /. sol[2][[1]];

In[19]:=
ShowAnimation[animation[1]]


On 11/15/06, Jean-Paul <Jean-Paul.VINCENT-3 at etudiants.ensam.fr> wrote:
> Dear Group,
> I'm a french student working on gears, particulary on gear engagement.
> To summerize quickly:
> The active  surfaces  of a gear teeth are made to ensure an homokynetic
> (homokinetic) transmission.
> We have, in theory,
> a1/a2=constant, with ai, the rotation angle of the part i.
> My work is to find this relation:
> First the surfaces are represented by equations ( a 3D Vector, with two
> parameters) in a local coordinate system.
> These parameters are u1 and v1 for the gear 1, u2 and v2 for the gear
> 2.
> To simulate the transmission between these gears, we write these
> equations in a common coordinate system, giving them another parameter,
> for the position , the angle of rotation, a1 and a2.
> So for the gear 1, we have:
> s1(u1,v1,a1)
> Active surface for the gear 2 is given by:
> s2(u2,v2,a2)
>
> To simulate the engaging, we have to translate mathematically the
> contact between the two surfaces:
>
> First condition:
>
> Surfaces are in contact, that leads to:
>
>
> s1(u1,v1,a1)=s1(u2,v2,a2)  -> 3 equations.
>
> Second condition:
>
> The normals at the contact point are parallel.
>
> n1(u1,v1,a1)=k.n2(u2,v2,a2) ->3 equations, one more unkown introduced:
> k
>
> Finaly: we have 6 Equations, and 6 unknowns (u1,v1, u2, v2, a2, k)
> Theses equations are too complicated, to obtain an explicit solution.
> We have to divide the problem:
> Solve the non linear system, for each value of a1.
> Then we have several couple of (a1,a2).
>
> This is the context of my work.
> I tried to write in Mathematica, using the famous function "Findroot".
>
> My question begin here:
>
> Findroot works well, but when the relative curvatures of the surfaces
> near the contact point are close, the fonction shows its limit.
> I began to write a program, calculating the Jacobian Matrix of the
> system and by iteration i found a solution vector.
> The solutions found are not in the interval.
> Indeed parameter of the surface v1 varies between 50 and 100.
> The solution given by Mathematica is 0.
> The FindRoot function allows us to give interval for all unknowns (and
> gives 83.3 for v1 (example) if we give the interval, 0 if not).
>
> Can someone, help me to make a program witch take into account
> intervals for each unknown?
> I am asking for a program, just the mathematical part.
> Thank You very much.
>
> Best Regards
>
> PS: Please excuse my bad English.
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: NIntegrate
  • Next by Date: Re: Non linear system solving
  • Previous by thread: Non linear system solving
  • Next by thread: Re: Non linear system solving