Message Boards Message Boards

0
|
5209 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Can't get a reduced number

Posted 11 years ago
Hello,

I've tried searching Reduce and Simplify functions in Mathematica, but they seem to be more complicated than what I am trying to get Mathematica to do.  Here's what is happening:
 h = 75 ft;
 
 \[Sigma] = 7100 psi;
 
 \[Sigma]u = 7700 psi;
 
  \[Sigma]d = 8100 psi;
 
 KIC = 1000 psi/Sqrt[inch];

\[Rho] = rhowat;



C1 = .163;

C2 = 3.91;

C3 = .0069;



\[CapitalDelta]pfu[

  hu_] := (C1/Sqrt[hu])[

   KIC (1 - Sqrt[hu/h]) +

    C2 (\[Sigma]u - \[Sigma]) Sqrt[hu] ArcCos[h/hu]] +

  C3 \[Rho] (hu - 0.5 h)



\[CapitalDelta]pfd[

  hd_] := (C1/Sqrt[hd])[

   KIC (1 - Sqrt[hd/h]) +

    C2 (\[Sigma]d - \[Sigma]) Sqrt[hd] ArcCos[h/hd]] +

  C3 \[Rho] (hd - 0.5 h)



\[CapitalDelta]pfu[175 ft]/psi




and I get " 0.000145038 (289.179 + 0.0223183[1.1042*10^8]) " for an answer instead of 484psi...  help!
POSTED BY: Kyle Richter
4 Replies
Posted 11 years ago
Wow so because I had [ ] instead of ( ) for part of the equation it didn't want to simplify it.  That is extremely helpful.  I really appreciate the help!!  More questions to come i'm sure.

Kyle
POSTED BY: Kyle Richter
Posted 11 years ago
Ah, better.

Ok, a few things. Mathematica is absolutely fanatic about use of {} versus () versus [] and those all mean completely different things to it. Use one where it expects another and you won't get what you need. So I changed a couple of [] into () which is what I'm guessing you wanted. And for the moment I'm going to avoid Mathematica's handling of units and just changed all your inputs to inches and pounds. We can go back and try to fix that later.

Here is what I have now.
 In[1]:= h = 75 *12*inch;
 \[Sigma] = 7100 (lb/inch^2);
 \[Sigma]u = 7700 (lb/inch^2);
 \[Sigma]d = 8100 (lb/inch^2);
 KIC = 1000 (lb/inch^2)/Sqrt[inch];
 \[Rho] = rhowat;
 C1 = .163;
 C2 = 3.91;
 C3 = .0069;
\[CapitalDelta]pfu[hu_] := (C1/Sqrt[hu]) (KIC (1 - Sqrt[hu/h]) + C2 (\[Sigma]u - \[Sigma]) Sqrt[hu] ArcCos[h/hu]) +
  C3 \[Rho] (hu - 0.5 h)

\[CapitalDelta]pfd[hd_] := (C1/Sqrt[hd]) (KIC (1 - Sqrt[hd/h]) + C2 (\[Sigma]d - \[Sigma]) Sqrt[hd] ArcCos[h/hd]) +
  C3 \[Rho] (hd - 0.5 h)

\[CapitalDelta]pfu[175 *12*inch]/(lb/inch^2)

Out[12]= (1/lb)inch^2 ((0.00355695 ((1000 (1 - Sqrt[7/3]) lb)/inch^(5/2) + (121256. lb)/
      inch^(3/2)))/Sqrt[inch] + 11.385 inch rhowat)

In[13]:= Expand[%]

Out[13]= 431.301 - 1.87638/inch + (11.385 inch^3 rhowat)/lb

That is a little closer to where I think you are trying to go.

Now we have to deal with ArcCos and whether it is expecting something with or without units as an argument and what you are expecting Sqrt to do. Since at this point Mathematica has no idea what "inch" really is I think it is trying to resist simplifying that because it doesn't know whether that might be a negative number or even complex.

Is this getting a little closer to your goal? Can you see the next thing that needs to be corrected?
POSTED BY: Bill Simpson
Posted 11 years ago
Oh nice.  Thanks!
POSTED BY: Kyle Richter
Posted 11 years ago
If you edit your posting and click on the orange "spikey ball" to create a "code box" and paste your code into that then the forum software is less likely to mangle it and make it impossible to scrape-n-paste back into a Mathematica notebook. OR you can create a really simple notebook showing your work and attach it so someone can download and execute. With either of those someone can find a way to probably fix the problem.
POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract