123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295 |
- REDUCE 3.6, 15-Jul-95, patched to 6 Mar 96 ...
- *** ^ redefined
- % Problem: Calculate the PDE's for the isovector of the heat equation.
- % --------
- % (c.f. B.K. Harrison, f.B. Estabrook, "Geometric Approach...",
- % J. Math. Phys. 12, 653, 1971)
- % The heat equation @ psi = @ psi is equivalent to the set of exterior
- % xx t
- % equations (with u=@ psi, y=@ psi):
- % T x
- pform {psi,u,x,y,t}=0,a=1,{da,b}=2;
- a := d psi - u*d t - y*d x;
- a := d psi - d t*u - d x*y
- da := - d u^d t - d y^d x;
- da := d t^d u + d x^d y
- b := u*d x^d t - d y^d t;
- b := - d t^d x*u + d t^d y
- % Now calculate the PDE's for the isovector.
- tvector v;
- pform {vpsi,vt,vu,vx,vy}=0;
- fdomain vpsi=vpsi(psi,t,u,x,y),vt=vt(psi,t,u,x,y),vu=vu(psi,t,u,x,y),
- vx=vx(psi,t,u,x,y),vy=vy(psi,t,u,x,y);
- v := vpsi*@ psi + vt*@ t + vu*@ u + vx*@ x + vy*@ y;
- v := @ *vpsi + @ *vt + @ *vu + @ *vx + @ *vy
- psi t u x y
- factor d;
- on rat;
- i1 := v |_ a - l*a;
- i1 := d psi*(@ vpsi - @ vt*u - @ vx*y - l)
- psi psi psi
- + d t*(@ vpsi - @ vt*u - @ vx*y + l*u - vu)
- t t t
- + d u*(@ vpsi - @ vt*u - @ vx*y)
- u u u
- + d x*(@ vpsi - @ vt*u - @ vx*y + l*y - vy)
- x x x
- + d y*(@ vpsi - @ vt*u - @ vx*y)
- y y y
- pform o=1;
- o := ot*d t + ox*d x + ou*d u + oy*d y;
- o := d t*ot + d u*ou + d x*ox + d y*oy
- fdomain f=f(psi,t,u,x,y);
- i11 := v _| d a - l*a + d f;
- i11 := - d psi*l + d t*(l*u - vu) + d u*vt + d x*(l*y - vy) + d y*vx
- let vx=-@(f,y),vt=-@(f,u),vu=@(f,t)+u*@(f,psi),vy=@(f,x)+y*@(f,psi),
- vpsi=f-u*@(f,u)-y*@(f,y);
- factor ^;
- i2 := v |_ b - xi*b - o^a + zeta*da;
- i2 := d psi^d t*( - @ f*y - @ f - @ f*u + ot) + d psi^d u*ou
- psi psi psi x psi y
- + d psi^d x*(@ f*u + ox) + d psi^d y*( - @ f + oy)
- psi u psi u
- + d t^d u*(@ f*y + @ f + @ f*u - ou*u + zeta) + d t^d x*(
- psi u u x u y
- @ f*y - @ f*u + @ f*u - @ f + @ f + @ f*u + ot*y - ox*u
- psi x psi t u t x x x y
- + u*xi)
- + d t^d y*(@ f*y + @ f - @ f + @ f + @ f*u - oy*u - xi)
- psi y psi t u x y y y
- + d u^d x*(@ f*u + ou*y) - d u^d y*@ f
- u u u u
- + d x^d y*( - @ f - @ f*u - oy*y + zeta)
- u x u y
- let ou=0,oy=@(f,u,psi),ox=-u*@(f,u,psi),
- ot=@(f,x,psi)+u*@(f,y,psi)+y*@(f,psi,psi);
- i2;
- 2
- d t^d u*(@ f*y + @ f + @ f*u + zeta) + d t^d x*(@ f*y
- psi u u x u y psi psi
- 2
- + @ f*u + 2*@ f*y + @ f*u*y - @ f*u + @ f*u - @ f + @ f
- psi u psi x psi y psi t u t x x
- + @ f*u + u*xi)
- x y
- + d t^d y*( - @ f*u + @ f*y + @ f - @ f + @ f + @ f*u - xi)
- psi u psi y psi t u x y y y
- + d u^d x*@ f*u - d u^d y*@ f
- u u u u
- + d x^d y*( - @ f*y - @ f - @ f*u + zeta)
- psi u u x u y
- let zeta=-@(f,u,x)-@(f,u,y)*u-@(f,u,psi)*y;
- i2;
- 2 2
- d t^d x*(@ f*y + @ f*u + 2*@ f*y + @ f*u*y - @ f*u
- psi psi psi u psi x psi y psi
- + @ f*u - @ f + @ f + @ f*u + u*xi)
- t u t x x x y
- + d t^d y*( - @ f*u + @ f*y + @ f - @ f + @ f + @ f*u - xi)
- psi u psi y psi t u x y y y
- + d u^d x*@ f*u - d u^d y*@ f - 2*d x^d y*(@ f*y + @ f + @ f*u)
- u u u u psi u u x u y
- let xi=-@(f,t,u)-u*@(f,u,psi)+@(f,x,y)+u*@(f,y,y)+y*@(f,y,psi)+@(f,psi);
- i2;
- 2
- d t^d x*(@ f*y + 2*@ f*y + 2*@ f*u*y - @ f + @ f + 2*@ f*u
- psi psi psi x psi y t x x x y
- 2
- + @ f*u ) + d u^d x*@ f*u - d u^d y*@ f
- y y u u u u
- - 2*d x^d y*(@ f*y + @ f + @ f*u)
- psi u u x u y
- let @(f,u,u)=0;
- i2;
- 2
- d t^d x*(@ f*y + 2*@ f*y + 2*@ f*u*y - @ f + @ f + 2*@ f*u
- psi psi psi x psi y t x x x y
- 2
- + @ f*u ) - 2*d x^d y*(@ f*y + @ f + @ f*u)
- y y psi u u x u y
- % These PDE's have to be solved.
- clear a,da,b,v,i1,i11,o,i2,xi,t;
- remfdomain f,vpsi,vt,vu,vx,vy;
- clear @(f,u,u);
- % Problem:
- % --------
- % Calculate the integrability conditions for the system of PDE's:
- % (c.f. B.F. Schutz, "Geometrical Methods of Mathematical Physics"
- % Cambridge University Press, 1984, p. 156)
- % @ z /@ x + a1*z + b1*z = c1
- % 1 1 2
- % @ z /@ y + a2*z + b2*z = c2
- % 1 1 2
- % @ z /@ x + f1*z + g1*z = h1
- % 2 1 2
- % @ z /@ y + f2*z + g2*z = h2
- % 2 1 2 ;
- pform w(k)=1,integ(k)=4,{z(k),x,y}=0,{a,b,c,f,g,h}=1,
- {a1,a2,b1,b2,c1,c2,f1,f2,g1,g2,h1,h2}=0;
- fdomain a1=a1(x,y),a2=a2(x,y),b1=b1(x,y),b2=b2(x,y),
- c1=c1(x,y),c2=c2(x,y),f1=f1(x,y),f2=f2(x,y),
- g1=g1(x,y),g2=g2(x,y),h1=h1(x,y),h2=h2(x,y);
- a:=a1*d x+a2*d y$
- b:=b1*d x+b2*d y$
- c:=c1*d x+c2*d y$
- f:=f1*d x+f2*d y$
- g:=g1*d x+g2*d y$
- h:=h1*d x+h2*d y$
- % The equivalent exterior system:
- factor d;
- w(1) := d z(-1) + z(-1)*a + z(-2)*b - c;
- 1
- w := d z + d x*(z *a1 + z *b1 - c1) + d y*(z *a2 + z *b2 - c2)
- 1 1 2 1 2
- w(2) := d z(-2) + z(-1)*f + z(-2)*g - h;
- 2
- w := d z + d x*(z *f1 + z *g1 - h1) + d y*(z *f2 + z *g2 - h2)
- 2 1 2 1 2
- indexrange 1,2;
- factor z;
- % The integrability conditions:
- integ(k) := d w(k) ^ w(1) ^ w(2);
- 1
- integ := d z ^d z ^d x^d y*z *( - @ a1 + @ a2 + b1*f2 - b2*f1) +
- 1 2 1 y x
- d z ^d z ^d x^d y*z *( - @ b1 + @ b2 + a1*b2 - a2*b1 + b1*g2 - b2*g1)
- 1 2 2 y x
- + d z ^d z ^d x^d y*(@ c1 - @ c2 - a1*c2 + a2*c1 - b1*h2 + b2*h1)
- 1 2 y x
- 2
- integ := d z ^d z ^d x^d y*z *( - @ f1 + @ f2 - a1*f2 + a2*f1 - f1*g2 + f2*g1)
- 1 2 1 y x
- + d z ^d z ^d x^d y*z *( - @ g1 + @ g2 - b1*f2 + b2*f1)
- 1 2 2 y x
- + d z ^d z ^d x^d y*(@ h1 - @ h2 + c1*f2 - c2*f1 - g1*h2 + g2*h1)
- 1 2 y x
- clear a,b,c,f,g,h,x,y,w(k),integ(k),z(k);
- remfdomain a1,a2,b1,c1,c2,f1,f2,g1,g2,h1,h2;
- % Problem:
- % --------
- % Calculate the PDE's for the generators of the d-theta symmetries of
- % the Lagrangian system of the planar Kepler problem.
- % c.f. W.Sarlet, F.Cantrijn, Siam Review 23, 467, 1981
- % Verify that time translation is a d-theta symmetry and calculate the
- % corresponding integral.
- pform {t,q(k),v(k),lam(k),tau,xi(k),eta(k)}=0,theta=1,f=0,
- {l,glq(k),glv(k),glt}=0;
- tvector gam,y;
- indexrange 1,2;
- fdomain tau=tau(t,q(k),v(k)),xi=xi(t,q(k),v(k)),f=f(t,q(k),v(k));
- l := 1/2*(v(1)**2 + v(2)**2) + m/r$
- % The Lagrangian.
- pform r=0;
- fdomain r=r(q(k));
- let @(r,q 1)=q(1)/r,@(r,q 2)=q(2)/r,q(1)**2+q(2)**2=r**2;
- lam(k) := -m*q(k)/r;
- 1
- 1 - q *m
- lam := ---------
- r
- 2
- 2 - q *m
- lam := ---------
- r
- % The force.
- gam := @ t + v(k)*@(q(k)) + lam(k)*@(v(k))$
- eta(k) := gam _| d xi(k) - v(k)*gam _| d tau$
- y := tau*@ t + xi(k)*@(q(k)) + eta(k)*@(v(k))$
- % Symmetry generator.
- theta := l*d t + @(l,v(k))*(d q(k) - v(k)*d t)$
- factor @;
- s := y |_ theta - d f$
- glq(k) := @(q k) _| s;
- 1 1 1 2
- - @ (xi )*q *m - @ (xi )*q *m
- 1 2
- 1 1 1 1 2 v v
- glq := 2*@ (xi )*v + @ (xi )*v + ------------------ + ------------------
- 1 2 r r
- q q
- 1 2 2
- + @ (xi ) + @ (xi )*v - @ f
- t 1 1
- q q
- 1 2 2 2
- @ tau*( - 3*(v ) *r - (v ) *r + 2*m)
- 1
- q 1 2
- + --------------------------------------- - @ tau*v *v
- 2*r 2
- q
- 1 1 2 1
- @ tau*q *v *m @ tau*q *v *m
- 1 2
- v v 1
- + ---------------- + ---------------- - @ tau*v
- r r t
- 2 1
- - @ (xi )*q *m
- 1
- 2 1 1 2 1 2 2 v
- glq := @ (xi )*v + @ (xi )*v + 2*@ (xi )*v + ------------------
- 2 1 2 r
- q q q
- 2 2
- - @ (xi )*q *m
- 2
- v 2 1 2
- + ------------------ + @ (xi ) - @ f - @ tau*v *v
- r t 2 1
- q q
- 1 2 2 2 1 2
- @ tau*( - (v ) *r - 3*(v ) *r + 2*m) @ tau*q *v *m
- 2 1
- q v
- + --------------------------------------- + ----------------
- 2*r r
- 2 2
- @ tau*q *v *m
- 2
- v 2
- + ---------------- - @ tau*v
- r t
- glv(k) := @(v k) _| s;
- 1 2 2 2
- @ tau*( - (v ) *r - (v ) *r + 2*m)
- 1
- 1 1 1 2 2 v
- glv := @ (xi )*v + @ (xi )*v - @ f + -------------------------------------
- 1 1 1 2*r
- v v v
- 1 2 2 2
- @ tau*( - (v ) *r - (v ) *r + 2*m)
- 2
- 2 1 1 2 2 v
- glv := @ (xi )*v + @ (xi )*v - @ f + -------------------------------------
- 2 2 2 2*r
- v v v
- glt := @(t) _| s;
- 1 1 1
- @ (xi )*q *v *m
- 1
- 1 1 2 1 1 2 v
- glt := - @ (xi )*(v ) - @ (xi )*v *v + ------------------
- 1 2 r
- q q
- 1 2 1
- @ (xi )*q *v *m
- 2
- v 2 1 2 2 2 2
- + ------------------ - @ (xi )*v *v - @ (xi )*(v )
- r 1 2
- q q
- 2 1 2 2 2 2
- @ (xi )*q *v *m @ (xi )*q *v *m
- 1 2
- v v
- + ------------------ + ------------------ - @ f
- r r t
- 1 1 2 2 2 2 1 2 2 2
- + @ tau*v *((v ) + (v ) ) + @ tau*v *((v ) + (v ) )
- 1 2
- q q
- 1 1 2 2 2 2 1 2 2 2
- @ tau*q *m*((v ) + (v ) ) @ tau*q *m*((v ) + (v ) )
- 1 2
- v v
- - ----------------------------- - -----------------------------
- r r
- 1 2 2 2
- @ tau*((v ) *r + (v ) *r + 2*m) 1 1 2 2
- t m*(q *xi + q *xi )
- + --------------------------------- - ---------------------
- 2*r 3
- r
- % Translation in time must generate a symmetry.
- xi(k) := 0;
- k
- xi := 0
- tau := 1;
- tau := 1
- glq k := glq k;
- 1
- glq := - @ f
- 1
- q
- 2
- glq := - @ f
- 2
- q
- glv k := glv k;
- 1
- glv := - @ f
- 1
- v
- 2
- glv := - @ f
- 2
- v
- glt;
- - @ f
- t
- % The corresponding integral is of course the energy.
- integ := - y _| theta;
- 1 2 2 2
- (v ) *r + (v ) *r - 2*m
- integ := -------------------------
- 2*r
- clear l,lam k,gam,eta k,y,theta,s,glq k,glv k,glt,t,q k,v k,tau,xi k;
- remfdomain r,f,tau,xi;
- % Problem:
- % --------
- % Calculate the "gradient" and "Laplacian" of a function and the "curl"
- % and "divergence" of a one-form in elliptic coordinates.
- coframe e u = sqrt(cosh(v)**2 - sin(u)**2)*d u,
- e v = sqrt(cosh(v)**2 - sin(u)**2)*d v,
- e phi = cos u*sinh v*d phi;
- pform f=0;
- fdomain f=f(u,v,phi);
- factor e,^;
- on rat,gcd;
- order cosh v, sin u;
- % The gradient:
- d f;
- phi u v
- @ f*e @ f*e @ f*e
- phi u v
- ---------------- + -------------------------- + --------------------------
- cos(u)*sinh(v) 2 2 2 2
- sqrt(cosh(v) - sin(u) ) sqrt(cosh(v) - sin(u) )
- factor @;
- % The Laplacian:
- # d # d f;
- @ f @ f @ f*sin(u)
- phi phi u u u
- ------------------ + -------------------- - -----------------------------
- 2 2 2 2 2 2
- cos(u) *sinh(v) cosh(v) - sin(u) cos(u)*(cosh(v) - sin(u) )
- @ f @ f*cosh(v)
- v v v
- + -------------------- + ------------------------------
- 2 2 2 2
- cosh(v) - sin(u) sinh(v)*(cosh(v) - sin(u) )
- % Another way of calculating the Laplacian:
- -#vardf(1/2*d f^#d f,f);
- @ f @ f @ f*sin(u)
- phi phi u u u
- ------------------ + -------------------- - -----------------------------
- 2 2 2 2 2 2
- cos(u) *sinh(v) cosh(v) - sin(u) cos(u)*(cosh(v) - sin(u) )
- @ f @ f*cosh(v)
- v v v
- + -------------------- + ------------------------------
- 2 2 2 2
- cosh(v) - sin(u) sinh(v)*(cosh(v) - sin(u) )
- remfac @;
- % Now calculate the "curl" and the "divergence" of a one-form.
- pform w=1,a(k)=0;
- fdomain a=a(u,v,phi);
- w := a(-k)*e k;
- phi u v
- w := e *a + e *a + e *a
- phi u v
- % The curl:
- x := # d w;
- phi 2 2
- x := (e *( - cosh(v) *@ (a ) + cosh(v) *@ (a ) - cosh(v)*a *sinh(v)
- v u u v u
- 2 2
- + sin(u) *@ (a ) - sin(u) *@ (a ) - sin(u)*a *cos(u)))/(
- v u u v v
- 2 2 2 2 u
- sqrt(cosh(v) - sin(u) )*(cosh(v) - sin(u) )) + (e *(
- cosh(v)*a *cos(u) + cos(u)*@ (a )*sinh(v)
- phi v phi
- 2 2 2 2
- - sqrt(cosh(v) - sin(u) )*@ (a )))/(sqrt(cosh(v) - sin(u) )
- phi v
- v
- *cos(u)*sinh(v)) + (e *(sin(u)*a *sinh(v) - cos(u)*@ (a )*sinh(v)
- phi u phi
- 2 2 2 2
- + sqrt(cosh(v) - sin(u) )*@ (a )))/(sqrt(cosh(v) - sin(u) )
- phi u
- *cos(u)*sinh(v))
- factor @;
- % The divergence:
- y := # d # w;
- @ (a ) @ (a ) @ (a )
- phi phi u u v v
- y := ---------------- + -------------------------- + --------------------------
- cos(u)*sinh(v) 2 2 2 2
- sqrt(cosh(v) - sin(u) ) sqrt(cosh(v) - sin(u) )
- 3 2
- + (cosh(v) *a *cos(u) - cosh(v) *sin(u)*a *sinh(v)
- v u
- 2 2
- - cosh(v)*sin(u) *a *cos(u) + cosh(v)*a *cos(u)*sinh(v)
- v v
- 3 2
- + sin(u) *a *sinh(v) - sin(u)*a *cos(u) *sinh(v))/(
- u u
- 2 2 2 2
- sqrt(cosh(v) - sin(u) )*cos(u)*sinh(v)*(cosh(v) - sin(u) ))
- remfac @;
- clear x,y,w,u,v,phi,e k,a k;
- remfdomain a,f;
- % Problem:
- % --------
- % Calculate in a spherical coordinate system the Navier Stokes equations.
- coframe e r=d r, e theta =r*d theta, e phi = r*sin theta *d phi;
- frame x;
- fdomain v=v(t,r,theta,phi),p=p(r,theta,phi);
- pform v(k)=0,p=0,w=1;
- % We first calculate the convective derivative.
- w := v(-k)*e(k)$
- factor e;
- on rat;
- cdv := @(w,t) + (v(k)*x(-k)) |_ w - 1/2*d(v(k)*v(-k));
- phi
- cdv := (e *(cos(theta)*v *v + @ (v )*v
- phi theta phi phi phi
- + @ (v )*sin(theta)*v *r + @ (v )*sin(theta)*r
- r phi r t phi
- + @ (v )*sin(theta)*v + sin(theta)*v *v ))/(
- theta phi theta phi r
- r
- sin(theta)*r) + (e *(@ (v )*v + @ (v )*sin(theta)*v *r
- phi r phi r r r
- + @ (v )*sin(theta)*r + @ (v )*sin(theta)*v
- t r theta r theta
- 2 2
- - sin(theta)*(v ) - sin(theta)*(v ) ))/(sin(theta)*r) + (
- phi theta
- theta 2
- e *( - cos(theta)*(v ) + @ (v )*v
- phi phi theta phi
- + @ (v )*sin(theta)*v *r + @ (v )*sin(theta)*r
- r theta r t theta
- + @ (v )*sin(theta)*v + sin(theta)*v *v ))/(
- theta theta theta r theta
- sin(theta)*r)
- %next we calculate the viscous terms;
- visc := nu*(d#d# w - #d#d w) + mu*d#d# w;
- phi 2
- visc := (e *( - cos(theta) *v *nu + cos(theta)*@ (v )*sin(theta)*nu
- phi theta phi
- + cos(theta)*@ (v )*mu + 2*cos(theta)*@ (v )*nu
- phi theta phi theta
- + @ (v )*mu + @ (v )*nu
- phi phi phi phi phi phi
- 2 2 2
- + @ (v )*sin(theta) *nu*r + 2*@ (v )*sin(theta) *nu*r
- r r phi r phi
- 2
- + @ (v )*sin(theta) *nu + @ (v )*sin(theta)*mu*r
- theta theta phi phi r r
- + 2*@ (v )*sin(theta)*mu + 2*@ (v )*sin(theta)*nu
- phi r phi r
- 2
- + @ (v )*sin(theta)*mu - sin(theta) *v *nu))/(
- phi theta theta phi
- 2 2 r
- sin(theta) *r ) + (e *(cos(theta)*@ (v )*sin(theta)*nu
- theta r
- + cos(theta)*@ (v )*sin(theta)*mu*r
- r theta
- - cos(theta)*sin(theta)*v *mu
- theta
- - 2*cos(theta)*sin(theta)*v *nu
- theta
- + @ (v )*sin(theta)*mu*r - @ (v )*sin(theta)*mu
- phi r phi phi phi
- - 2*@ (v )*sin(theta)*nu + @ (v )*nu
- phi phi phi phi r
- 2 2 2 2
- + @ (v )*sin(theta) *mu*r + @ (v )*sin(theta) *nu*r
- r r r r r r
- 2 2
- + 2*@ (v )*sin(theta) *mu*r + 2*@ (v )*sin(theta) *nu*r
- r r r r
- 2
- + @ (v )*sin(theta) *nu
- theta theta r
- 2
- + @ (v )*sin(theta) *mu*r
- r theta theta
- 2 2
- - @ (v )*sin(theta) *mu - 2*@ (v )*sin(theta) *nu
- theta theta theta theta
- 2 2 2 2
- - 2*sin(theta) *v *mu - 2*sin(theta) *v *nu))/(sin(theta) *r ) +
- r r
- theta 2 2
- (e *( - cos(theta) *v *mu - cos(theta) *v *nu
- theta theta
- - cos(theta)*@ (v )*mu - 2*cos(theta)*@ (v )*nu
- phi phi phi phi
- + cos(theta)*@ (v )*sin(theta)*mu
- theta theta
- + cos(theta)*@ (v )*sin(theta)*nu
- theta theta
- + @ (v )*sin(theta)*mu
- phi theta phi
- 2 2
- + @ (v )*sin(theta) *mu*r + 2*@ (v )*sin(theta) *mu
- r theta r theta r
- 2
- + 2*@ (v )*sin(theta) *nu + @ (v )*nu
- theta r phi phi theta
- 2 2
- + @ (v )*sin(theta) *nu*r
- r r theta
- 2
- + 2*@ (v )*sin(theta) *nu*r
- r theta
- 2
- + @ (v )*sin(theta) *mu
- theta theta theta
- 2 2
- + @ (v )*sin(theta) *nu - sin(theta) *v *mu
- theta theta theta theta
- 2 2 2
- - sin(theta) *v *nu))/(sin(theta) *r )
- theta
- % Finally we add the pressure term and print the components of the
- % whole equation.
- pform nasteq=1,nast(k)=0;
- nasteq := cdv - visc + 1/rho*d p$
- factor @;
- nast(-k) := x(-k) _| nasteq;
- - @ (v )*mu @ (v )*(mu + 2*nu) - @ (v )*nu
- phi r phi phi phi phi phi r
- nast := -------------------- + ------------------------ + --------------------
- r sin(theta)*r 2 2 2
- sin(theta)*r sin(theta) *r
- @ (v )*v @ (v )*(v *r - 2*mu - 2*nu)
- phi r phi r r r
- + --------------- - @ (v )*(mu + nu) + -----------------------------
- sin(theta)*r r r r r
- - @ (v )*nu
- theta theta r
- + @ (v ) + ------------------------
- t r 2
- r
- @ (v )*( - cos(theta)*nu + sin(theta)*v *r)
- theta r theta
- + -----------------------------------------------------
- 2
- sin(theta)*r
- - @ (v )*mu - @ (v )*cos(theta)*mu
- r theta theta r theta
- + ------------------------ + -----------------------------
- r sin(theta)*r
- @ (v )*(mu + 2*nu) @ p
- theta theta r
- + ---------------------------- + ----- + (cos(theta)*v *mu
- 2 rho theta
- r
- 2
- + 2*cos(theta)*v *nu - sin(theta)*(v ) *r
- theta phi
- 2
- + 2*sin(theta)*v *mu + 2*sin(theta)*v *nu - sin(theta)*(v ) *r)
- r r theta
- 2
- /(sin(theta)*r )
- - @ (v )*mu @ (v )*cos(theta)*(mu + 2*nu)
- phi theta phi phi phi
- nast := ------------------------ + -----------------------------------
- theta 2 2 2
- sin(theta)*r sin(theta) *r
- - @ (v )*mu 2*@ (v )*(mu + nu)
- r theta r theta r
- + -------------------- - ------------------------
- r 2
- r
- - @ (v )*nu @ (v )*v
- phi phi theta phi theta phi
- + ------------------------ + ------------------- - @ (v )*nu
- 2 2 sin(theta)*r r r theta
- sin(theta) *r
- @ (v )*(v *r - 2*nu)
- r theta r
- + -------------------------- + @ (v )
- r t theta
- @ (v )*(mu + nu)
- theta theta theta
- - -------------------------------- + (@ (v )
- 2 theta theta
- r
- *( - cos(theta)*mu - cos(theta)*nu + sin(theta)*v *r))/(
- theta
- @ p
- 2 theta 2
- sin(theta)*r ) + --------- + (cos(theta) *v *mu
- r*rho theta
- 2 2
- + cos(theta) *v *nu - cos(theta)*sin(theta)*(v ) *r
- theta phi
- 2 2
- + sin(theta) *v *v *r + sin(theta) *v *mu
- r theta theta
- 2 2 2
- + sin(theta) *v *nu)/(sin(theta) *r )
- theta
- @ (v )*(mu + nu) @ (v )*v
- phi phi phi phi phi phi
- nast := - -------------------------- + ----------------- - @ (v )*nu
- phi 2 2 sin(theta)*r r r phi
- sin(theta) *r
- @ (v )*(v *r - 2*nu) - @ (v )*nu
- r phi r theta theta phi
- + ------------------------ + @ (v ) + --------------------------
- r t phi 2
- r
- @ (v )*( - cos(theta)*nu + sin(theta)*v *r)
- theta phi theta
- + -------------------------------------------------------
- 2
- sin(theta)*r
- - @ (v )*mu 2*@ (v )*(mu + nu)
- phi r r phi r
- + ------------------ - ----------------------
- sin(theta)*r 2
- sin(theta)*r
- - @ (v )*mu
- phi theta theta
- + --------------------------
- 2
- sin(theta)*r
- @ (v )*cos(theta)*( - mu - 2*nu) @ p
- phi theta phi
- + ---------------------------------------- + ------------------ + (
- 2 2 sin(theta)*r*rho
- sin(theta) *r
- 2
- v *(cos(theta) *nu + cos(theta)*sin(theta)*v *r
- phi theta
- 2 2 2 2
- + sin(theta) *v *r + sin(theta) *nu))/(sin(theta) *r )
- r
- remfac @,e;
- clear v k,x k,nast k,cdv,visc,p,w,nasteq,e k;
- remfdomain p,v;
- % Problem:
- % --------
- % Calculate from the Lagrangian of a vibrating rod the equation of
- % motion and show that the invariance under time translation leads
- % to a conserved current.
- pform {y,x,t,q,j}=0,lagr=2;
- fdomain y=y(x,t),q=q(x),j=j(x);
- factor ^;
- lagr := 1/2*(rho*q*@(y,t)**2 - e*j*@(y,x,x)**2)*d x^d t;
- 2 2
- d t^d x*( - @ y *q*rho + @ y *e*j)
- t x x
- lagr := --------------------------------------
- 2
- vardf(lagr,y);
- d t^d x*(@ j*@ y*e + 2*@ j*@ y*e + @ y*q*rho + @ y*e*j)
- x x x x x x x x t t x x x x
- % The Lagrangian does not explicitly depend on time; therefore the
- % vector field @ t generates a symmetry. The conserved current is
- pform c=1;
- factor d;
- c := noether(lagr,y,@ t);
- c := d t*e*(@ j*@ y*@ y - @ y*@ y*j + @ y*@ y*j)
- x t x x t x x x t x x x
- 2 2
- d x*(@ y *q*rho + @ y *e*j)
- t x x
- - -------------------------------
- 2
- % The exterior derivative of this must be zero or a multiple of the
- % equation of motion (weak conservation law) to be a conserved current.
- remfac d;
- d c;
- d t^d x*@ y*( - @ j*@ y*e - 2*@ j*@ y*e - @ y*q*rho - @ y*e*j)
- t x x x x x x x x t t x x x x
- % i.e. it is a multiple of the equation of motion.
- clear lagr,c,j,y,q;
- remfdomain y,q,j;
- % Problem:
- % --------
- % Show that the metric structure given by Eguchi and Hanson induces a
- % self-dual curvature.
- % c.f. T. Eguchi, P.B. Gilkey, A.J. Hanson, "Gravitation, Gauge Theories
- % and Differential Geometry", Physics Reports 66, 213, 1980
- for all x let cos(x)**2=1-sin(x)**2;
- pform f=0,g=0;
- fdomain f=f(r), g=g(r);
- coframe o(r) = f*d r,
- o(theta) = (r/2)*(sin(psi)*d theta - sin(theta)*cos(psi)*d phi),
- o(phi) = (r/2)*(-cos(psi)*d theta - sin(theta)*sin(psi)*d phi),
- o(psi) = (r/2)*g*(d psi + cos(theta)*d phi);
- frame e;
- pform gamma(a,b)=1,curv2(a,b)=2;
- index_symmetries gamma(a,b),curv2(a,b): antisymmetric;
- factor o;
- gamma(-a,-b) := -(1/2)*( e(-a) _| (e(-c) _| (d o(-b)))
- -e(-b) _| (e(-a) _| (d o(-c)))
- +e(-c) _| (e(-b) _| (d o(-a))) )*o(c)$
- curv2(-a,b) := d gamma(-a,b) + gamma(-c,b)^gamma(-a,c)$
- let f=1/g,g=sqrt(1-(a/r)**4);
- pform chck(k,l)=2;
- index_symmetries chck(k,l): antisymmetric;
- % The following has to be zero for a self-dual curvature.
- chck(k,l) := 1/2*eps(k,l,m,n)*curv2(-m,-n) + curv2(k,l);
- r theta
- chck := 0
- r phi
- chck := 0
- theta phi
- chck := 0
- r psi
- chck := 0
- theta psi
- chck := 0
- phi psi
- chck := 0
- clear gamma(a,b),curv2(a,b),f,g,chck(a,b),o(k),e(k),r,phi,psi;
- remfdomain f,g;
- % Example: 6-dimensional FRW model with quadratic curvature terms in
- % -------
- % the Lagrangian (Lanczos and Gauss-Bonnet terms).
- % cf. Henriques, Nuclear Physics, B277, 621 (1986)
- for all x let cos(x)**2+sin(x)**2=1;
- pform {r,s}=0;
- fdomain r=r(t),s=s(t);
- coframe o(t) = d t,
- o(1) = r*d u/(1 + k*(u**2)/4),
- o(2) = r*u*d theta/(1 + k*(u**2)/4),
- o(3) = r*u*sin(theta)*d phi/(1 + k*(u**2)/4),
- o(4) = s*d v1,
- o(5) = s*sin(v1)*d v2
- with metric g =-o(t)*o(t)+o(1)*o(1)+o(2)*o(2)+o(3)*o(3)
- +o(4)*o(4)+o(5)*o(5);
- frame e;
- on nero;
- factor o,^;
- riemannconx om;
- pform curv(k,l)=2,{riemann(a,b,c,d),ricci(a,b),riccisc}=0;
- index_symmetries curv(k,l): antisymmetric,
- riemann(k,l,m,n): antisymmetric in {k,l},{m,n}
- symmetric in {{k,l},{m,n}},
- ricci(k,l): symmetric;
- curv(k,l) := d om(k,l) + om(k,-m)^om(m,l);
- t 1
- o ^o *@ r
- t 1 t t
- curv := -------------
- r
- t 2
- o ^o *@ r
- t 2 t t
- curv := -------------
- r
- 1 2 2
- o ^o *(@ r + k)
- 1 2 t
- curv := ------------------
- 2
- r
- t 3
- o ^o *@ r
- t 3 t t
- curv := -------------
- r
- 1 3 2
- o ^o *(@ r + k)
- 1 3 t
- curv := ------------------
- 2
- r
- 2 3 2
- o ^o *(@ r + k)
- 2 3 t
- curv := ------------------
- 2
- r
- t 4
- o ^o *@ s
- t 4 t t
- curv := -------------
- s
- 1 4
- o ^o *@ r*@ s
- 1 4 t t
- curv := ---------------
- r*s
- 2 4
- o ^o *@ r*@ s
- 2 4 t t
- curv := ---------------
- r*s
- 3 4
- o ^o *@ r*@ s
- 3 4 t t
- curv := ---------------
- r*s
- t 5
- o ^o *@ s
- t 5 t t
- curv := -------------
- s
- 1 5
- o ^o *@ r*@ s
- 1 5 t t
- curv := ---------------
- r*s
- 2 5
- o ^o *@ r*@ s
- 2 5 t t
- curv := ---------------
- r*s
- 3 5
- o ^o *@ r*@ s
- 3 5 t t
- curv := ---------------
- r*s
- 4 5 2
- o ^o *(@ s + 1)
- 4 5 t
- curv := ------------------
- 2
- s
- riemann(a,b,c,d) := e(d) _| (e (c) _| curv(a,b));
- - @ r
- t 1 t 1 t t
- riemann := ----------
- r
- - @ r
- t 2 t 2 t t
- riemann := ----------
- r
- 2
- @ r + k
- 1 2 1 2 t
- riemann := ----------
- 2
- r
- - @ r
- t 3 t 3 t t
- riemann := ----------
- r
- 2
- @ r + k
- 1 3 1 3 t
- riemann := ----------
- 2
- r
- 2
- @ r + k
- 2 3 2 3 t
- riemann := ----------
- 2
- r
- - @ s
- t 4 t 4 t t
- riemann := ----------
- s
- @ r*@ s
- 1 4 1 4 t t
- riemann := ---------
- r*s
- @ r*@ s
- 2 4 2 4 t t
- riemann := ---------
- r*s
- @ r*@ s
- 3 4 3 4 t t
- riemann := ---------
- r*s
- - @ s
- t 5 t 5 t t
- riemann := ----------
- s
- @ r*@ s
- 1 5 1 5 t t
- riemann := ---------
- r*s
- @ r*@ s
- 2 5 2 5 t t
- riemann := ---------
- r*s
- @ r*@ s
- 3 5 3 5 t t
- riemann := ---------
- r*s
- 2
- @ s + 1
- 4 5 4 5 t
- riemann := ----------
- 2
- s
- % The rest is done in the Ricci calculus language,
- ricci(-a,-b) := riemann(c,-a,-d,-b)*g(-c,d);
- - 3*@ r*s - 2*@ s*r
- t t t t
- ricci := --------------------------
- t t r*s
- 2
- @ r*r*s + 2*@ r *s + 2*@ r*@ s*r + 2*k*s
- t t t t t
- ricci := --------------------------------------------
- 1 1 2
- r *s
- 2
- @ r*r*s + 2*@ r *s + 2*@ r*@ s*r + 2*k*s
- t t t t t
- ricci := --------------------------------------------
- 2 2 2
- r *s
- 2
- @ r*r*s + 2*@ r *s + 2*@ r*@ s*r + 2*k*s
- t t t t t
- ricci := --------------------------------------------
- 3 3 2
- r *s
- 2
- 3*@ r*@ s*s + @ s*r*s + @ s *r + r
- t t t t t
- ricci := --------------------------------------
- 4 4 2
- r*s
- 2
- 3*@ r*@ s*s + @ s*r*s + @ s *r + r
- t t t t t
- ricci := --------------------------------------
- 5 5 2
- r*s
- riccisc := ricci(-a,-b)*g(a,b);
- 2 2 2 2 2 2
- riccisc := (2*(3*@ r*r*s + 3*@ r *s + 6*@ r*@ s*r*s + 2*@ s*r *s + @ s *r
- t t t t t t t t
- 2 2 2 2
- + 3*k*s + r ))/(r *s )
- pform {laglanc,inv1,inv2} = 0;
- index_symmetries riemc3(k,l),riemri(k,l),
- hlang(k,l),einst(k,l): symmetric;
- pform {riemc3(i,j),riemri(i,j)}=0;
- riemc3(-i,-j) := riemann(-i,-k,-l,-m)*riemann(-j,k,l,m)$
- inv1 := riemc3(-i,-j)*g(i,j);
- 2 2 4 4 4 2 2 2 2 2 4
- inv1 := (4*(3*@ r *r *s + 3*@ r *s + 6*@ r *@ s *r *s + 6*@ r *k*s
- t t t t t t
- 2 4 2 4 4 2 4 2 4 4 4 4
- + 2*@ s *r *s + @ s *r + 2*@ s *r + 3*k *s + r ))/(r *s )
- t t t t
- riemri(-i,-j) := 2*riemann(-i,-k,-j,-l)*ricci(k,l)$
- inv2 := ricci(-a,-b)*ricci(a,b);
- 2 2 4 2 4 2 3
- inv2 := (2*(6*@ r *r *s + 6*@ r*@ r *r*s + 6*@ r*@ r*@ s*r *s
- t t t t t t t t t
- 3 3 4 4 4
- + 6*@ r*@ s*r *s + 6*@ r*k*r*s + 6*@ r *s
- t t t t t t t
- 3 3 2 2 2 2 2 4
- + 12*@ r *@ s*r*s + 15*@ r *@ s *r *s + 12*@ r *k*s
- t t t t t
- 3 2 3 3 3
- + 6*@ r*@ s*@ s*r *s + 6*@ r*@ s *r *s + 12*@ r*@ s*k*r*s
- t t t t t t t t
- 3 2 4 2 2 4
- + 6*@ r*@ s*r *s + 3*@ s *r *s + 2*@ s*@ s *r *s
- t t t t t t t
- 4 4 4 2 4 2 4 4 4 4
- + 2*@ s*r *s + @ s *r + 2*@ s *r + 6*k *s + r ))/(r *s )
- t t t t
- laglanc := (1/2)*(inv1 - 4*inv2 + riccisc**2);
- 2 2 2 2 2
- laglanc := (12*(@ r*@ r *s + 4*@ r*@ r*@ s*r*s + @ r*@ s *r + @ r*k*s
- t t t t t t t t t t t t
- 2 3 2 2 2
- + @ r*r + 2*@ r *@ s*s + 2*@ r *@ s*r*s + 3*@ r *@ s *r
- t t t t t t t t t
- 2 2
- + @ r *r + 2*@ r*@ s*@ s*r + 2*@ r*@ s*k*s + 2*@ s*k*r*s
- t t t t t t t t t
- 2 3 2
- + @ s *k*r + k*r))/(r *s )
- t
- pform {einst(a,b),hlang(a,b)}=0;
- hlang(-i,-j) := 2*(riemc3(-i,-j) - riemri(-i,-j) -
- 2*ricci(-i,-k)*ricci(-j,K) +
- riccisc*ricci(-i,-j) - (1/2)*laglanc*g(-i,-j));
- hlang :=
- t t
- 3 2 2 2 2
- 12*(2*@ r *@ s*s + 3*@ r *@ s *r + @ r *r + 2*@ r*@ s*k*s + @ s *k*r + k*r)
- t t t t t t t t
- -----------------------------------------------------------------------------
- 3 2
- r *s
- 2
- hlang := (4*( - 4*@ r*@ r*@ s*s - 2*@ r*@ s *r - 2*@ r*r
- 1 1 t t t t t t t t t
- 2 2 2 2
- - 2*@ r *@ s*s - 3*@ r *@ s - @ r - 4*@ r*@ s*@ s*r
- t t t t t t t t t t
- 2 2 2
- - 2*@ s*k*s - @ s *k - k))/(r *s )
- t t t
- 2
- hlang := (4*( - 4*@ r*@ r*@ s*s - 2*@ r*@ s *r - 2*@ r*r
- 2 2 t t t t t t t t t
- 2 2 2 2
- - 2*@ r *@ s*s - 3*@ r *@ s - @ r - 4*@ r*@ s*@ s*r
- t t t t t t t t t t
- 2 2 2
- - 2*@ s*k*s - @ s *k - k))/(r *s )
- t t t
- 2
- hlang := (4*( - 4*@ r*@ r*@ s*s - 2*@ r*@ s *r - 2*@ r*r
- 3 3 t t t t t t t t t
- 2 2 2 2
- - 2*@ r *@ s*s - 3*@ r *@ s - @ r - 4*@ r*@ s*@ s*r
- t t t t t t t t t t
- 2 2 2
- - 2*@ s*k*s - @ s *k - k))/(r *s )
- t t t
- 2 3
- hlang := (12*( - @ r*@ r *s - 2*@ r*@ r*@ s*r - @ r*k*s - @ r *@ s
- 4 4 t t t t t t t t t t t
- 2 3
- - @ r *@ s*r - @ r*@ s*k - @ s*k*r))/(r *s)
- t t t t t t t
- 2 3
- hlang := (12*( - @ r*@ r *s - 2*@ r*@ r*@ s*r - @ r*k*s - @ r *@ s
- 5 5 t t t t t t t t t t t
- 2 3
- - @ r *@ s*r - @ r*@ s*k - @ s*k*r))/(r *s)
- t t t t t t t
- % The complete Einstein tensor:
- einst(-i,-j) := (ricci(-i,-j) - (1/2)*riccisc*g(-i,-j))*alp1 +
- hlang(-i,-j)*alp2$
- alp1 := 1$
- factor alp2;
- einst(-i,-j) := einst(-i,-j);
- 3 2 2 2
- einst := (12*alp2*(2*@ r *@ s*s + 3*@ r *@ s *r + @ r *r + 2*@ r*@ s*k*s
- t t t t t t t t t
- 2 3 2
- + @ s *k*r + k*r))/(r *s )
- t
- 2 2 2 2 2 2
- 3*@ r *s + 6*@ r*@ s*r*s + @ s *r + 3*k*s + r
- t t t t
- + ---------------------------------------------------
- 2 2
- r *s
- 2
- einst := (4*alp2*( - 4*@ r*@ r*@ s*s - 2*@ r*@ s *r - 2*@ r*r
- 1 1 t t t t t t t t t
- 2 2 2 2
- - 2*@ r *@ s*s - 3*@ r *@ s - @ r - 4*@ r*@ s*@ s*r
- t t t t t t t t t t
- 2 2 2 2
- - 2*@ s*k*s - @ s *k - k))/(r *s ) + ( - 2*@ r*r*s
- t t t t t
- 2 2 2 2 2 2 2
- - @ r *s - 4*@ r*@ s*r*s - 2*@ s*r *s - @ s *r - k*s - r )/
- t t t t t t
- 2 2
- (r *s )
- 2
- einst := (4*alp2*( - 4*@ r*@ r*@ s*s - 2*@ r*@ s *r - 2*@ r*r
- 2 2 t t t t t t t t t
- 2 2 2 2
- - 2*@ r *@ s*s - 3*@ r *@ s - @ r - 4*@ r*@ s*@ s*r
- t t t t t t t t t t
- 2 2 2 2
- - 2*@ s*k*s - @ s *k - k))/(r *s ) + ( - 2*@ r*r*s
- t t t t t
- 2 2 2 2 2 2 2
- - @ r *s - 4*@ r*@ s*r*s - 2*@ s*r *s - @ s *r - k*s - r )/
- t t t t t t
- 2 2
- (r *s )
- 2
- einst := (4*alp2*( - 4*@ r*@ r*@ s*s - 2*@ r*@ s *r - 2*@ r*r
- 3 3 t t t t t t t t t
- 2 2 2 2
- - 2*@ r *@ s*s - 3*@ r *@ s - @ r - 4*@ r*@ s*@ s*r
- t t t t t t t t t t
- 2 2 2 2
- - 2*@ s*k*s - @ s *k - k))/(r *s ) + ( - 2*@ r*r*s
- t t t t t
- 2 2 2 2 2 2 2
- - @ r *s - 4*@ r*@ s*r*s - 2*@ s*r *s - @ s *r - k*s - r )/
- t t t t t t
- 2 2
- (r *s )
- 2 3
- einst := (12*alp2*( - @ r*@ r *s - 2*@ r*@ r*@ s*r - @ r*k*s - @ r *@ s
- 4 4 t t t t t t t t t t t
- 2 3
- - @ r *@ s*r - @ r*@ s*k - @ s*k*r))/(r *s)
- t t t t t t t
- 2 2
- - 3*@ r*r*s - 3*@ r *s - 3*@ r*@ s*r - @ s*r - 3*k*s
- t t t t t t t
- + ------------------------------------------------------------
- 2
- r *s
- 2 3
- einst := (12*alp2*( - @ r*@ r *s - 2*@ r*@ r*@ s*r - @ r*k*s - @ r *@ s
- 5 5 t t t t t t t t t t t
- 2 3
- - @ r *@ s*r - @ r*@ s*k - @ s*k*r))/(r *s)
- t t t t t t t
- 2 2
- - 3*@ r*r*s - 3*@ r *s - 3*@ r*@ s*r - @ s*r - 3*k*s
- t t t t t t t
- + ------------------------------------------------------------
- 2
- r *s
- clear o(k),e(k),riemc3(i,j),riemri(i,j),curv(k,l),riemann(a,b,c,d),
- ricci(a,b),riccisc,t,u,v1,v2,theta,phi,r,om(k,l),einst(a,b),
- hlang(a,b);
- remfdomain r,s;
-
- % Problem:
- % --------
- % Calculate for a given coframe and given torsion the Riemannian part and
- % the torsion induced part of the connection. Calculate the curvature.
- % For a more elaborate example see E.Schruefer, F.W. Hehl, J.D. McCrea,
- % "Application of the REDUCE package EXCALC to the Poincare gauge field
- % theory of gravity", GRG Journal, vol. 19, (1988) 197--218
- pform {ff, gg}=0;
- fdomain ff=ff(r), gg=gg(r);
- coframe o(4) = d u + 2*b0*cos(theta)*d phi,
- o(1) = ff*(d u + 2*b0*cos(theta)*d phi) + d r,
- o(2) = gg*d theta,
- o(3) = gg*sin(theta)*d phi
- with metric g = -o(4)*o(1)-o(4)*o(1)+o(2)*o(2)+o(3)*o(3);
- frame e;
- pform {tor(a),gwt(a)}=2,gamma(a,b)=1,
- {u1,u3,u5}=0;
- index_symmetries gamma(a,b): antisymmetric;
- fdomain u1=u1(r),u3=u3(r),u5=u5(r);
- tor(4) := 0$
- tor(1) := -u5*o(4)^o(1) - 2*u3*o(2)^o(3)$
- tor(2) := u1*o(4)^o(2) + u3*o(4)^o(3)$
- tor(3) := u1*o(4)^o(3) - u3*o(4)^o(2)$
- gwt(-a) := d o(-a) - tor(-a)$
- % The following is the combined connection.
- % The Riemannian part could have equally well been calculated by the
- % RIEMANNCONX statement.
- gamma(-a,-b) := (1/2)*( e(-b) _| (e(-c) _| gwt(-a))
- +e(-c) _| (e(-a) _| gwt(-b))
- -e(-a) _| (e(-b) _| gwt(-c)) )*o(c);
- 4
- gamma := o *(@ ff - u5)
- 4 1 r
- 2
- o *(@ gg*ff + gg*u1) 3 2
- r o *( - b0*ff + gg *u3)
- gamma := - ---------------------- + ------------------------
- 4 2 gg 2
- gg
- 2
- o *@ gg 3
- r - o *b0
- gamma := --------- + ----------
- 1 2 gg 2
- gg
- 3
- 2 2 o *(@ gg*ff + gg*u1)
- o *(b0*ff - gg *u3) r
- gamma := --------------------- - ----------------------
- 4 3 2 gg
- gg
- 3
- 2 o *@ gg
- o *b0 r
- gamma := ------- + ---------
- 1 3 2 gg
- gg
- 1 3 4 2
- o *b0 o *cos(theta) o *(b0*ff - 2*gg *u3)
- gamma := ------- + --------------- + -----------------------
- 2 3 2 sin(theta)*gg 2
- gg gg
- pform curv(a,b)=2;
- index_symmetries curv(a,b): antisymmetric;
- factor ^;
- curv(-a,b) := d gamma(-a,b) + gamma(-c,b)^gamma(-a,c);
- 4 2 3
- curv := (2*o ^o
- 4
- 2
- *(@ ff*b0*gg - 2*@ gg*b0*ff + @ gg*gg *u3 - b0*gg*u1 - b0*gg*u5))/
- r r r
- 3 4 1
- gg + o ^o *(@ ff - @ u5)
- r r r
- 1 2 3 2
- o ^o *(@ gg*gg - b0 )
- 4 r r 4 2 3 3
- curv := -------------------------- + (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg
- 2 4 r r r r
- gg
- 3 2 2 4
- + @ gg*gg *u5 - b0 *ff + 2*b0*gg *u3))/gg
- r
- 4 3 2
- o ^o *(@ ff*b0*gg - 2*@ gg*b0*ff + 2*@ gg*gg *u3 - b0*gg*u5)
- r r r
- + --------------------------------------------------------------
- 3
- gg
- 1 3 3 2
- o ^o *(@ gg*gg - b0 )
- 4 r r
- curv := --------------------------
- 3 4
- gg
- 4 2 2
- o ^o *( - @ ff*b0*gg + 2*@ gg*b0*ff - 2*@ gg*gg *u3 + b0*gg*u5)
- r r r
- + -----------------------------------------------------------------
- 3
- gg
- 4 3 3 3 3 2
- + (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg + @ gg*gg *u5 - b0 *ff
- r r r r r
- 2 4
- + 2*b0*gg *u3))/gg
- 1 2 3
- curv := (2*o ^o
- 1
- 2
- *( - @ ff*b0*gg + 2*@ gg*b0*ff - @ gg*gg *u3 + b0*gg*u1 + b0*gg*u5))
- r r r
- 3 4 1
- /gg + o ^o *( - @ ff + @ u5)
- r r r
- 1 1 2 3 3 3 4
- curv := (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg - @ gg*gg *u1 - @ u1*gg
- 2 r r r r r r
- 2 2 4 1 3
- - b0 *ff + b0*gg *u3))/gg + (o ^o *( - @ ff*b0*gg
- r
- 2 3 3
- + 2*@ gg*b0*ff + @ gg*gg *u3 + @ u3*gg + b0*gg*u1))/gg + (
- r r r
- 4 2 4 2 3 3
- o ^o *( - @ ff*gg *u1 + @ gg*ff *gg + @ gg*ff*gg *u1
- r r r r
- 3 4 2 2 2
- + @ gg*ff*gg *u5 + @ u1*ff*gg - b0 *ff + 3*b0*ff*gg *u3
- r r
- 4 4 2 4 4 3 2
- + gg *u1*u5 - 2*gg *u3 ))/gg + (o ^o *(@ ff*gg *u3
- r
- 2
- - 3*@ gg*ff*gg*u3 - @ u3*ff*gg + b0*ff*u1 + b0*ff*u5
- r r
- 2 2 2
- - 2*gg *u1*u3 - gg *u3*u5))/gg
- 1 1 2
- curv := (o ^o
- 3
- 2 3
- *(@ ff*b0*gg - 2*@ gg*b0*ff - @ gg*gg *u3 - @ u3*gg - b0*gg*u1))/
- r r r r
- 3 1 3 3 3 3
- gg + (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg - @ gg*gg *u1
- r r r r r
- 4 2 2 4 4 2 2
- - @ u1*gg - b0 *ff + b0*gg *u3))/gg + (o ^o *( - @ ff*gg *u3
- r r
- 2
- + 3*@ gg*ff*gg*u3 + @ u3*ff*gg - b0*ff*u1 - b0*ff*u5
- r r
- 2 2 2 4 3 4
- + 2*gg *u1*u3 + gg *u3*u5))/gg + (o ^o *( - @ ff*gg *u1
- r
- 2 3 3 3
- + @ gg*ff *gg + @ gg*ff*gg *u1 + @ gg*ff*gg *u5
- r r r r
- 4 2 2 2 4
- + @ u1*ff*gg - b0 *ff + 3*b0*ff*gg *u3 + gg *u1*u5
- r
- 4 2 4
- - 2*gg *u3 ))/gg
- 2 1 2 3 3 3 4
- curv := (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg - @ gg*gg *u1 - @ u1*gg
- 4 r r r r r r
- 2 2 4 1 3
- - b0 *ff + b0*gg *u3))/gg + (o ^o *( - @ ff*b0*gg
- r
- 2 3 3
- + 2*@ gg*b0*ff + @ gg*gg *u3 + @ u3*gg + b0*gg*u1))/gg + (
- r r r
- 4 2 4 2 3 3
- o ^o *( - @ ff*gg *u1 + @ gg*ff *gg + @ gg*ff*gg *u1
- r r r r
- 3 4 2 2 2
- + @ gg*ff*gg *u5 + @ u1*ff*gg - b0 *ff + 3*b0*ff*gg *u3
- r r
- 4 4 2 4 4 3 2
- + gg *u1*u5 - 2*gg *u3 ))/gg + (o ^o *(@ ff*gg *u3
- r
- 2
- - 3*@ gg*ff*gg*u3 - @ u3*ff*gg + b0*ff*u1 + b0*ff*u5
- r r
- 2 2 2
- - 2*gg *u1*u3 - gg *u3*u5))/gg
- 1 2 3 2
- o ^o *(@ gg*gg - b0 )
- 2 r r 4 2 3 3
- curv := -------------------------- + (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg
- 1 4 r r r r
- gg
- 3 2 2 4
- + @ gg*gg *u5 - b0 *ff + 2*b0*gg *u3))/gg
- r
- 4 3 2
- o ^o *(@ ff*b0*gg - 2*@ gg*b0*ff + 2*@ gg*gg *u3 - b0*gg*u5)
- r r r
- + --------------------------------------------------------------
- 3
- gg
- 2 2 3
- curv := (o ^o
- 3
- 2 2 3 2 2 2
- *( - 2*@ gg *ff*gg - 2*@ gg*gg *u1 + 6*b0 *ff - 6*b0*gg *u3 + gg ))
- r r
- 4 1 3
- 2*o ^o *(@ ff*b0*gg - 2*@ gg*b0*ff - @ u3*gg )
- 4 r r r
- /gg + ------------------------------------------------
- 3
- gg
- 3 1 2
- curv := (o ^o
- 4
- 2 3
- *(@ ff*b0*gg - 2*@ gg*b0*ff - @ gg*gg *u3 - @ u3*gg - b0*gg*u1))/
- r r r r
- 3 1 3 3 3 3
- gg + (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg - @ gg*gg *u1
- r r r r r
- 4 2 2 4 4 2 2
- - @ u1*gg - b0 *ff + b0*gg *u3))/gg + (o ^o *( - @ ff*gg *u3
- r r
- 2
- + 3*@ gg*ff*gg*u3 + @ u3*ff*gg - b0*ff*u1 - b0*ff*u5
- r r
- 2 2 2 4 3 4
- + 2*gg *u1*u3 + gg *u3*u5))/gg + (o ^o *( - @ ff*gg *u1
- r
- 2 3 3 3
- + @ gg*ff *gg + @ gg*ff*gg *u1 + @ gg*ff*gg *u5
- r r r r
- 4 2 2 2 4
- + @ u1*ff*gg - b0 *ff + 3*b0*ff*gg *u3 + gg *u1*u5
- r
- 4 2 4
- - 2*gg *u3 ))/gg
- 1 3 3 2
- o ^o *(@ gg*gg - b0 )
- 3 r r
- curv := --------------------------
- 1 4
- gg
- 4 2 2
- o ^o *( - @ ff*b0*gg + 2*@ gg*b0*ff - 2*@ gg*gg *u3 + b0*gg*u5)
- r r r
- + -----------------------------------------------------------------
- 3
- gg
- 4 3 3 3 3 2
- + (o ^o *( - @ ff*@ gg*gg - @ gg*ff*gg + @ gg*gg *u5 - b0 *ff
- r r r r r
- 2 4
- + 2*b0*gg *u3))/gg
- 3 2 3
- curv := (o ^o
- 2
- 2 2 3 2 2 2
- *(2*@ gg *ff*gg + 2*@ gg*gg *u1 - 6*b0 *ff + 6*b0*gg *u3 - gg ))/
- r r
- 4 1 3
- 2*o ^o *( - @ ff*b0*gg + 2*@ gg*b0*ff + @ u3*gg )
- 4 r r r
- gg + ---------------------------------------------------
- 3
- gg
- clear o(k),e(k),curv(a,b),gamma(a,b),theta,phi,x,y,z,r,s,t,u,v,p,q,c,cs;
- remfdomain u1,u3,u5,ff,gg;
- showtime;
- Time: 28540 ms plus GC time: 1791 ms
- end;
- (TIME: excalc 28560 30351)
|