Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: can anyone solve this equation?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58056] Re: [mg57986] can anyone solve this equation?
  • From: Pratik Desai <pdesai1 at umbc.edu>
  • Date: Fri, 17 Jun 2005 05:19:08 -0400 (EDT)
  • References: <200506160935.FAA18298@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Chris Chiasson wrote:

>Dear MathGroup Gurus,
>
>Can anyone solve the following equation (for theta_4)?
>
>The assumptions are in this cell (use ctrl+shift+e, paste it into the
>notebook, and then use ctrl+shift+e again):
>
>Cell["\<\
>$Assumptions=Flatten[Append[{True},{(#1>=0&)/@{\[Alpha]},
>(#1>0&)/@{r,numcyl,Displacement\[UnderBracket]Base,SBRatio,P\[UnderBracket]0,P\
>\[UnderBracket]7,T\[UnderBracket]Intake,T\[UnderBracket]7},
>(#1>1&)/@{R\[UnderBracket]ConRodCrankArm,CR\[UnderBracket]Base,k\[UnderBracket]Air\
>\[UnderBracket]c,k\[UnderBracket]Air\[UnderBracket]e}}]];\
>\>","Input"]
>
>The equation is in the cell below (I need the solution for theta
>underbracket four):
>
>Cell["\<\
>(1/(2*(-1+CR\[UnderBracket]Base)*numcyl))*(Displacement\[UnderBracket]Base*(1+CR\
>\[UnderBracket]Base-R\[UnderBracket]ConRodCrankArm+
>CR\[UnderBracket]Base*R\[UnderBracket]ConRodCrankArm+Cos[\[Theta]\[UnderBracket]4]-CR\
>\[UnderBracket]Base*Cos[\[Theta]\[UnderBracket]4]+
>Sqrt[R\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]4]^2]-
>CR\[UnderBracket]Base*Sqrt[R\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]4]^2]))==\
>
>(Displacement\[UnderBracket]Base*(2^k\[UnderBracket]Air\[UnderBracket]c*(-1+\
>CR\[UnderBracket]Base)*(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\
>\[UnderBracket]c)*q\[UnderBracket]LHV*
>(c\[UnderBracket]P\[UnderBracket]e+c\[UnderBracket]v\[UnderBracket]e*\[Alpha])*Cos[\[Theta]\
>\[UnderBracket]1]+2^k\[UnderBracket]Air\[UnderBracket]c*c\[UnderBracket]v\[UnderBracket]e*q\
>\[UnderBracket]LHV*\[Alpha]*
>(2-(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)+(P\
>\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)*
>R\[UnderBracket]ConRodCrankArm-(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\
>\[UnderBracket]Air\[UnderBracket]c)*
>Sqrt[R\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]1]^2]+\
>CR\[UnderBracket]Base*(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^
>(1/k\[UnderBracket]Air\[UnderBracket]c)*(-1-R\[UnderBracket]ConRodCrankArm+Sqrt[R\
>\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]1]^2]))+
>c\[UnderBracket]P\[UnderBracket]e*(-2*(1+\
>AF)*c\[UnderBracket]v\[UnderBracket]e*(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]\
>Air\[UnderBracket]c)*T\[UnderBracket]Intake*(1+\[Alpha])*
>(1+CR\[UnderBracket]Base-R\[UnderBracket]ConRodCrankArm+CR\[UnderBracket]Base*R\
>\[UnderBracket]ConRodCrankArm+Cos[\[Theta]\[UnderBracket]1]-
>CR\[UnderBracket]Base*Cos[\[Theta]\[UnderBracket]1]+Sqrt[R\[UnderBracket]ConRodCrankArm^2-\
>Sin[\[Theta]\[UnderBracket]1]^2]-
>CR\[UnderBracket]Base*Sqrt[R\[UnderBracket]ConRodCrankArm^2-\
>Sin[\[Theta]\[UnderBracket]1]^2])^k\[UnderBracket]Air\[UnderBracket]c+
>2^k\[UnderBracket]Air\[UnderBracket]c*q\[UnderBracket]LHV*(2-(P\[UnderBracket]Intake/P\
>\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)+
>(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)*R\
>\[UnderBracket]ConRodCrankArm-
>(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)*Sqrt[R\
>\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]1]^2]+
>CR\[UnderBracket]Base*(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\
>\[UnderBracket]c)*(-1-R\[UnderBracket]ConRodCrankArm+
>Sqrt[R\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]1]^2])))))/((-1+CR\
>\[UnderBracket]Base)*c\[UnderBracket]P\[UnderBracket]e*numcyl*
>(2^k\[UnderBracket]Air\[UnderBracket]c*(-1+CR\[UnderBracket]Base)*(P\[UnderBracket]Intake/P\
>\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)*q\[UnderBracket]LHV*Cos[\[Theta]\
>\[UnderBracket]1]-
>2*(1+AF)*c\[UnderBracket]v\[UnderBracket]e*(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\
>\[UnderBracket]Air\[UnderBracket]c)*T\[UnderBracket]Intake*(1+\[Alpha])*
>(1+CR\[UnderBracket]Base-R\[UnderBracket]ConRodCrankArm+CR\[UnderBracket]Base*R\
>\[UnderBracket]ConRodCrankArm+Cos[\[Theta]\[UnderBracket]1]-
>CR\[UnderBracket]Base*Cos[\[Theta]\[UnderBracket]1]+Sqrt[R\[UnderBracket]ConRodCrankArm^2-\
>Sin[\[Theta]\[UnderBracket]1]^2]-
>CR\[UnderBracket]Base*Sqrt[R\[UnderBracket]ConRodCrankArm^2-\
>Sin[\[Theta]\[UnderBracket]1]^2])^k\[UnderBracket]Air\[UnderBracket]c+
>2^k\[UnderBracket]Air\[UnderBracket]c*q\[UnderBracket]LHV*(2-(P\[UnderBracket]Intake/P\
>\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)+
>(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)*R\
>\[UnderBracket]ConRodCrankArm-
>(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\[UnderBracket]c)*Sqrt[R\
>\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]1]^2]+
>CR\[UnderBracket]Base*(P\[UnderBracket]Intake/P\[UnderBracket]Exit)^(1/k\[UnderBracket]Air\
>\[UnderBracket]c)*(-1-R\[UnderBracket]ConRodCrankArm+
>Sqrt[R\[UnderBracket]ConRodCrankArm^2-Sin[\[Theta]\[UnderBracket]1]^2]))))\
>\>","Output",
>CellLabel->"Out[40]="]
>
>Thank you for your time,
>  
>
I am no mathematica guru, but here is my attempt.
Cell[BoxData[{
    RowBox[{"Clear", "[",
      RowBox[{"f", ",", "res1", ",", "param1", ",", "a", ",", "sol1", 
",", "theta4", ",", "r", ",", "numcyl", ",",
        "Displacement\[UnderBracket]Base", ",", "SBRatio", ",", 
"P\[UnderBracket]Intake", ",", "P\[UnderBracket]Exit", ",",
        "T\[UnderBracket]Intake", ",", "T\[UnderBracket]7", ",", 
"R\[UnderBracket]ConRodCrankArm", ",", "CR\[UnderBracket]Base", ",",
        "k\[UnderBracket]Air\[UnderBracket]c", ",", 
"k\[UnderBracket]Air\[UnderBracket]e", ",", "\[Alpha]", ",",
        "c\[UnderBracket]P\[UnderBracket]e", ",", 
"c\[UnderBracket]v\[UnderBracket]e", ",", "\[Theta]\[UnderBracket]1", ",",
        "q\[UnderBracket]LHV", " ", ",", "AF", ",", "theta4", ",", 
"list1"}], "]"}], "\[IndentingNewLine]",
    RowBox[{"f1", "=",
      RowBox[{
        RowBox[{
          RowBox[{"(",
            RowBox[{"1", "/",
              RowBox[{"(",
                RowBox[{"2", "*",
                  RowBox[{"(",
                    RowBox[{
                      RowBox[{"-", "1"}], "+", 
"CR\[UnderBracket]Base"}], ")"}], "*", "numcyl"}], ")"}]}], ")"}], "*",
          RowBox[{"(",
            RowBox[{"Displacement\[UnderBracket]Base", "*",
              RowBox[{"(",
                RowBox[{"1", "+", "CR\[UnderBracket]Base", "-", 
"R\[UnderBracket]ConRodCrankArm", "+",
                  RowBox[{"CR\[UnderBracket]Base", "*", 
"R\[UnderBracket]ConRodCrankArm"}], "+",
                  RowBox[{"Cos", "[", "\[Theta]\[UnderBracket]4", "]"}], 
"-",
                  RowBox[{"CR\[UnderBracket]Base", "*",
                    RowBox[{"Cos", "[", "\[Theta]\[UnderBracket]4", 
"]"}]}], "+",
                  RowBox[{"Sqrt", "[",
                    RowBox[{
                      RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", 
"2"}], "-",
                      RowBox[{
                        RowBox[{"Sin", "[", "\[Theta]\[UnderBracket]4", 
"]"}], "^", "2"}]}], "]"}], "-",
                  RowBox[{"CR\[UnderBracket]Base", "*",
                    RowBox[{"Sqrt", "[",
                      RowBox[{
                        RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", 
"2"}], "-",
                        RowBox[{
                          RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]4", "]"}], "^", "2"}]}], "]"}]}]}], ")"}]}], 
")"}]}], "\[Equal]",
       
        RowBox[{
          RowBox[{"(",
            RowBox[{"Displacement\[UnderBracket]Base", "*",
              RowBox[{"(",
                RowBox[{
                  RowBox[{
                    RowBox[{"2", "^", 
"k\[UnderBracket]Air\[UnderBracket]c"}], "*",
                    RowBox[{"(",
                      RowBox[{
                        RowBox[{"-", "1"}], "+", 
"CR\[UnderBracket]Base"}], ")"}], "*",
                    RowBox[{
                      RowBox[{"(",
                        RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                      RowBox[{"(",
                        RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*", 
"q\[UnderBracket]LHV", "*",
                    RowBox[{"(",
                      RowBox[{"c\[UnderBracket]P\[UnderBracket]e", "+",
                        RowBox[{"c\[UnderBracket]v\[UnderBracket]e", 
"*", "\[Alpha]"}]}], ")"}], "*",
                    RowBox[{"Cos", "[", "\[Theta]\[UnderBracket]1", 
"]"}]}], "+",
                  RowBox[{
                    RowBox[{"2", "^", 
"k\[UnderBracket]Air\[UnderBracket]c"}], "*", 
"c\[UnderBracket]v\[UnderBracket]e", "*",
                    "q\[UnderBracket]LHV", "*", "\[Alpha]", "*",
                    RowBox[{"(",
                      RowBox[{"2", "-",
                        RowBox[{
                          RowBox[{"(",
                            RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                          RowBox[{"(",
                            RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "+",
                        RowBox[{
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                            RowBox[{"(",
                              RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                          "R\[UnderBracket]ConRodCrankArm"}], "-",
                        RowBox[{
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                            RowBox[{"(",
                              RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                          RowBox[{"Sqrt", "[",
                            RowBox[{
                              RowBox[{"R\[UnderBracket]ConRodCrankArm", 
"^", "2"}], "-",
                              RowBox[{
                                RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}], "+",
                        RowBox[{"CR\[UnderBracket]Base", "*",
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                            RowBox[{"(",
                              RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                          RowBox[{"(",
                            RowBox[{
                              RowBox[{"-", "1"}], "-", 
"R\[UnderBracket]ConRodCrankArm", "+",
                              RowBox[{"Sqrt", "[",
                                RowBox[{
                                  
RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", "2"}], "-",
                                  RowBox[{
                                    RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}], ")"}]}]}], 
")"}]}],
                  "+",
                  RowBox[{"c\[UnderBracket]P\[UnderBracket]e", "*",
                    RowBox[{"(",
                      RowBox[{
                        RowBox[{
                          RowBox[{"-", "2"}], "*",
                          RowBox[{"(",
                            RowBox[{"1", "+", "AF"}], ")"}], "*", 
"c\[UnderBracket]v\[UnderBracket]e", "*",
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                            RowBox[{"(",
                              RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*", 
"T\[UnderBracket]Intake", "*",
                          RowBox[{"(",
                            RowBox[{"1", "+", "\[Alpha]"}], ")"}], "*",
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"1", "+", "CR\[UnderBracket]Base", 
"-", "R\[UnderBracket]ConRodCrankArm", "+",
                                RowBox[{"CR\[UnderBracket]Base", "*", 
"R\[UnderBracket]ConRodCrankArm"}], "+",
                                RowBox[{"Cos", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "-",
                                RowBox[{"CR\[UnderBracket]Base", "*",
                                  RowBox[{"Cos", "[", 
"\[Theta]\[UnderBracket]1", "]"}]}], "+",
                                RowBox[{"Sqrt", "[",
                                  RowBox[{
                                    
RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", "2"}], "-",
                                    RowBox[{
                                      RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}], "-",
                                RowBox[{"CR\[UnderBracket]Base", "*",
                                  RowBox[{"Sqrt", "[",
                                    RowBox[{
                                      
RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", "2"}], "-",
                                      RowBox[{
                                        RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}]}], ")"}], "^",
                            "k\[UnderBracket]Air\[UnderBracket]c"}]}], "+",
                        RowBox[{
                          RowBox[{"2", "^", 
"k\[UnderBracket]Air\[UnderBracket]c"}], "*", "q\[UnderBracket]LHV", "*",
                          RowBox[{"(",
                            RowBox[{"2", "-",
                              RowBox[{
                                RowBox[{"(",
                                  RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                                RowBox[{"(",
                                  RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "+",
                              RowBox[{
                                RowBox[{
                                  RowBox[{"(",
                                    RowBox[{"P\[UnderBracket]Intake", 
"/", "P\[UnderBracket]Exit"}], ")"}], "^",
                                  RowBox[{"(",
                                    RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                                "R\[UnderBracket]ConRodCrankArm"}], "-",
                              RowBox[{
                                RowBox[{
                                  RowBox[{"(",
                                    RowBox[{"P\[UnderBracket]Intake", 
"/", "P\[UnderBracket]Exit"}], ")"}], "^",
                                  RowBox[{"(",
                                    RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                                RowBox[{"Sqrt", "[",
                                  RowBox[{
                                    
RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", "2"}], "-",
                                    RowBox[{
                                      RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}], "+",
                              RowBox[{"CR\[UnderBracket]Base", "*",
                                RowBox[{
                                  RowBox[{"(",
                                    RowBox[{"P\[UnderBracket]Intake", 
"/", "P\[UnderBracket]Exit"}], ")"}], "^",
                                  RowBox[{"(",
                                    RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                                RowBox[{"(",
                                  RowBox[{
                                    RowBox[{"-", "1"}], "-", 
"R\[UnderBracket]ConRodCrankArm", "+",
                                    RowBox[{"Sqrt", "[",
                                      RowBox[{
                                        
RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", "2"}], "-",
                                        RowBox[{
                                        RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}], ")"}]}]}],
                            ")"}]}]}], ")"}]}]}], ")"}]}], ")"}], "/",
          RowBox[{"(",
            RowBox[{
              RowBox[{"(",
                RowBox[{
                  RowBox[{"-", "1"}], "+", "CR\[UnderBracket]Base"}], 
")"}], "*", "c\[UnderBracket]P\[UnderBracket]e", "*", "numcyl",
              "*",
              RowBox[{"(",
                RowBox[{
                  RowBox[{
                    RowBox[{"2", "^", 
"k\[UnderBracket]Air\[UnderBracket]c"}], "*",
                    RowBox[{"(",
                      RowBox[{
                        RowBox[{"-", "1"}], "+", 
"CR\[UnderBracket]Base"}], ")"}], "*",
                    RowBox[{
                      RowBox[{"(",
                        RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                      RowBox[{"(",
                        RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*", 
"q\[UnderBracket]LHV", "*",
                    RowBox[{"Cos", "[", "\[Theta]\[UnderBracket]1", 
"]"}]}], "-",
                  RowBox[{"2", "*",
                    RowBox[{"(",
                      RowBox[{"1", "+", "AF"}], ")"}], "*", 
"c\[UnderBracket]v\[UnderBracket]e", "*",
                    RowBox[{
                      RowBox[{"(",
                        RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                      RowBox[{"(",
                        RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*", 
"T\[UnderBracket]Intake", "*",
                    RowBox[{"(",
                      RowBox[{"1", "+", "\[Alpha]"}], ")"}], "*",
                    RowBox[{
                      RowBox[{"(",
                        RowBox[{"1", "+", "CR\[UnderBracket]Base", "-", 
"R\[UnderBracket]ConRodCrankArm", "+",
                          RowBox[{"CR\[UnderBracket]Base", "*", 
"R\[UnderBracket]ConRodCrankArm"}], "+",
                          RowBox[{"Cos", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "-",
                          RowBox[{"CR\[UnderBracket]Base", "*",
                            RowBox[{"Cos", "[", 
"\[Theta]\[UnderBracket]1", "]"}]}], "+",
                          RowBox[{"Sqrt", "[",
                            RowBox[{
                              RowBox[{"R\[UnderBracket]ConRodCrankArm", 
"^", "2"}], "-",
                              RowBox[{
                                RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}], "-",
                          RowBox[{"CR\[UnderBracket]Base", "*",
                            RowBox[{"Sqrt", "[",
                              RowBox[{
                                
RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", "2"}], "-",
                                RowBox[{
                                  RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}]}], ")"}], "^",
                      "k\[UnderBracket]Air\[UnderBracket]c"}]}], "+",
                  RowBox[{
                    RowBox[{"2", "^", 
"k\[UnderBracket]Air\[UnderBracket]c"}], "*", "q\[UnderBracket]LHV", "*",
                    RowBox[{"(",
                      RowBox[{"2", "-",
                        RowBox[{
                          RowBox[{"(",
                            RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                          RowBox[{"(",
                            RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "+",
                        RowBox[{
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                            RowBox[{"(",
                              RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                          "R\[UnderBracket]ConRodCrankArm"}], "-",
                        RowBox[{
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                            RowBox[{"(",
                              RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                          RowBox[{"Sqrt", "[",
                            RowBox[{
                              RowBox[{"R\[UnderBracket]ConRodCrankArm", 
"^", "2"}], "-",
                              RowBox[{
                                RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}], "+",
                        RowBox[{"CR\[UnderBracket]Base", "*",
                          RowBox[{
                            RowBox[{"(",
                              RowBox[{"P\[UnderBracket]Intake", "/", 
"P\[UnderBracket]Exit"}], ")"}], "^",
                            RowBox[{"(",
                              RowBox[{"1", "/", 
"k\[UnderBracket]Air\[UnderBracket]c"}], ")"}]}], "*",
                          RowBox[{"(",
                            RowBox[{
                              RowBox[{"-", "1"}], "-", 
"R\[UnderBracket]ConRodCrankArm", "+",
                              RowBox[{"Sqrt", "[",
                                RowBox[{
                                  
RowBox[{"R\[UnderBracket]ConRodCrankArm", "^", "2"}], "-",
                                  RowBox[{
                                    RowBox[{"Sin", "[", 
"\[Theta]\[UnderBracket]1", "]"}], "^", "2"}]}], "]"}]}], ")"}]}]}], 
")"}]}]}],
                ")"}]}], ")"}]}]}]}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{"res1", "=",
        RowBox[{
          RowBox[{
            RowBox[{
              RowBox[{"f1", "[",
                RowBox[{"[", "1", "]"}], "]"}], "//", "TrigReduce"}], 
"//", "TrigToExp"}], "//", "Apart"}]}],
      ";"}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{
        RowBox[{"param1", "[", "list_", "]"}], "=",
        RowBox[{
          RowBox[{
            RowBox[{"f1", "[",
              RowBox[{"[", "2", "]"}], "]"}], "-",
            RowBox[{"res1", "[",
              RowBox[{"[", "1", "]"}], "]"}]}], "//", "TrigToExp"}]}], 
";"}], "\[IndentingNewLine]",
    RowBox[{"sol1", "=",
      RowBox[{
        RowBox[{"Solve", "[",
          RowBox[{
            RowBox[{
              RowBox[{
                RowBox[{"res1", "[",
                  RowBox[{"[", "1", "]"}], "]"}], "-", "res1"}], 
"\[Equal]", "param1"}], ",", " ", "\[Theta]\[UnderBracket]4"}], "]"}],
        "//", "First"}]}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{"list1", "=",
        RowBox[{"{",
          RowBox[{
          "numcyl", ",", "Displacement\[UnderBracket]Base", ",", 
"SBRatio", ",", "P\[UnderBracket]Intake", ",", "P\[UnderBracket]Exit",
            ",", "T\[UnderBracket]Intake", ",", "T\[UnderBracket]7", 
",", "R\[UnderBracket]ConRodCrankArm", ",",
            "CR\[UnderBracket]Base", ",", 
"k\[UnderBracket]Air\[UnderBracket]c", ",", 
"k\[UnderBracket]Air\[UnderBracket]e", ",",
            "\[Alpha]", ",", "c\[UnderBracket]P\[UnderBracket]e", ",", 
"c\[UnderBracket]v\[UnderBracket]e", ",",
            "\[Theta]\[UnderBracket]1", ",", "q\[UnderBracket]LHV", " ", 
",", "AF"}], "}"}]}], ";"}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{
        RowBox[{"theta4", "[", "list1_", "]"}], "=", " ",
        RowBox[{
          RowBox[{"\[Theta]\[UnderBracket]4", "/.", "sol1"}], "/.",
          RowBox[{"{",
            RowBox[{"param1", "\[Rule]",
              RowBox[{"param1", "[", "list1", "]"}]}], "}"}]}]}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"CR\[UnderBracket]Base", "=", "1.24"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"numcyl", "=", "1000"}], ";"}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{"P\[UnderBracket]Intake", "=", "1"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{" ",
      RowBox[{
        RowBox[{"Displacement\[UnderBracket]Base", "=", "1.2"}], 
";"}]}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{"P\[UnderBracket]Exit", "=", "1.1"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"\[Theta]\[UnderBracket]1", "=", "30"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"R\[UnderBracket]ConRodCrankArm", "=", "1.2"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"k\[UnderBracket]Air\[UnderBracket]c", "=", "0.25"}], 
";"}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{"c\[UnderBracket]v\[UnderBracket]e", "=", "0.1"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"AF", "=", "1"}], ";"}], "\[IndentingNewLine]",
    RowBox[{
      RowBox[{"q\[UnderBracket]LHV", "=", "1"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"c\[UnderBracket]P\[UnderBracket]e", "=", "1.2"}], ";"}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"\[Alpha]", "=", "360"}], ";"}], "\[IndentingNewLine]",
    RowBox[{" ",
      RowBox[{
        RowBox[{"T\[UnderBracket]Intake", "=", "300"}], ";"}]}], 
"\[IndentingNewLine]",
    RowBox[{
      RowBox[{"theta4", "[", "list1", "]"}], "//", "Chop"}]}], "Input",
  CellLabel->"In[1308]:="]

best regards
Pratik

-- 
Pratik Desai
Graduate Student
UMBC
Department of Mechanical Engineering
Phone: 410 455 8134



  • Prev by Date: Re: Portable Notebooks and Filenames[]
  • Next by Date: Re: usage messages in packages
  • Previous by thread: can anyone solve this equation?
  • Next by thread: Re: can anyone solve this equation?