On Thu, 11 Feb 2021 at 22:54, mpierro3 <[email protected]> wrote:
>
> Yes, thank you. The rest is as follows:
>
> from sympy import *
> import numpy as np
>
> M_e = 1
> gamma_1 = 1.667
> gamma_4 = 1.667
> MW_1 = 39.948
> MW_4 = 4.0026
> D_4 = 5 / 39.37
> D_1 = 3 / 39.37
> A_4 = (np.pi / 4) * Pow(D_4, 2)
> A_1 = (np.pi / 4) * Pow(D_1, 2)
> a_4 = (gamma_4 + 1) / (gamma_4 - 1)
> a_1 = (gamma_1 + 1) / (gamma_1 - 1)
> A_4_A_1 = A_4 / A_1
>
> M_3a = symbols('M_3a', positive=true, nonzero=true)
> eqn = nonlinsolve([Eq((M_e / M_3a) * Pow((2 + (gamma_4 - 1) * Pow(M_3a, 2)) / 
> \
> (2 + (gamma_4 - 1) * Pow(M_e, 2)), a_4 / 2), A_4_A_1), M_3a <= 1], M_3a)
> print(eqn)

Your equation to be solved is (truncating the numbers for clarity):

Eq(0.56*(0.33*M_3a**2 + 1)**1.99/M_3a, 2.77)

I think it is unlikely that you will get analytic expressions for the
solutions to an equation like this.

Sympy can solve it numerically though:

In [31]: nsolve(eq[0], M_3a, 0.2)
Out[31]: 0.208399106769846


--
Oscar

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxST3XuJ_6EZOfOYXr0jAvg28YPPKJJ9pZA2QKpA6Sxn3w%40mail.gmail.com.

Reply via email to