Re: does the following code shut down anyone else's kernel? - why?
- To: mathgroup at smc.vnet.net
- Subject: [mg69752] Re: [mg69729] does the following code shut down anyone else's kernel? - why?
- From: gardyloo <gardyloo at mail.wsu.edu>
- Date: Fri, 22 Sep 2006 01:04:23 -0400 (EDT)
Yep. Shuts down my kernel (5.2.0.0 w/ notebook frontend running on linux) almost immediately, with the computer reporting practically no RAM use. -C.O. Chris Chiasson wrote: > (MakeBoxes[#1,_]=#2)&@@@{{SectionModulus,"I"},{YoungsModulus,"E"},{Meter, > "m"},{Newton,"N"}}; > > $Assumptions=#>0&/@{Newton,X,Meter,YoungsModulus,SectionModulus}; > > $UnitList={{X,Meter},{F,Newton},{P,Newton}}; > > deUnitizeVariablesRep=#\[Rule]Times[##]&@@@$UnitList; > > unitizeVariablesRep=#\[Rule]Divide[##]&@@@$UnitList; > > dropSIUnitsRep={Meter\[Rule]1,Newton\[Rule]1}; > > numbersToMachinePrecisionRep= > x_Real\[RuleDelayed]SetPrecision[x,MachinePrecision]; > > cm=Centi*Meter; > > Format[F[a_]]=Subscript[F,a]; > > rep[1]={H\[Rule]25.0``1 cm,L\[Rule]250.0``1 cm,A\[Rule]25.0``1 cm^2, > SectionModulus\[Rule]750.0``1 cm^4, > YoungsModulus\[Rule]70``0 Giga Pascal}; > > rep[2]={Centi\[Rule]1/100,Giga\[Rule]10^9,Pascal\[Rule]Newton/Meter^2}; > > eqn[1]=F[1]\[Equal]A YoungsModulus (1-Sqrt[1+(X^2-2 H X)/L^2]); > > eqn[2]=F[cr]\[Equal]Pi^2*YoungsModulus*SectionModulus/L^2; > > eqn[3]=F\[Equal]Min[eqn[1][[2]],eqn[2][[2]]]; > > eqn[4]=P\[Equal](H-X)*F/Sqrt[L^2+X^2-2*H*X]; > > blah[1][X_]= > eqn[4][[2]]/.Rule@@eqn[3]/.rep[1]/.rep[2]/.deUnitizeVariablesRep// > PiecewiseExpand//FullSimplify > > > (very quick) result of last command: > > No more memory available. > Mathematica kernel has shut down. > Try quitting other applications and then retry. > > > -- ========================================================== Curtis Osterhoudt gardyloo at mail.remove_this.wsu.and_this.edu PGP Key ID: 0x088E6D7A Please avoid sending me Word or PowerPoint attachments See http://www.gnu.org/philosophy/no-word-attachments.html ==========================================================