Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solve system of equations
#18
Thanks.
1st value (i.e. L) is Ok.
2nd value (i.e. C) is lower than expected of 30%
The last one (i.e. R) is 40% of expected.
Here is code, that generates expected values:

import math

Pi = math.pi
for f_raw in (130, 140, 150):
    Cs_raw = 1.0
    Cl_raw = 3.0
    L_raw = 0.32

    Cs = Cs_raw*1e-12
    Cl = Cl_raw*1e-12
    L = L_raw*1e-6
    Rs = 5.0
    Rin = 10.0
    f = f_raw*1e6
    omega = 2*Pi*f

    Ar = 1 - omega**2*Cs*Cl
    Aj = omega*Cs*Rs
    A = math.sqrt(Ar**2 + Aj**2)

    Br = 1 - omega**2*Cs*L - omega**2*Cl*L - omega**2*Cl*Cs*Rin*Rs
    Bj = omega*Cs*Rs + omega*Cl*Rin - omega**3*Cl*Cs*Rin*L + omega*Cl*Rs
    B = math.sqrt(Br**2 + Bj**2)

    print(f_raw, A/B)
Reply


Messages In This Thread
Solve system of equations - by Sancho_Pansa - Oct-22-2020, 06:53 AM
RE: Solve system of equations - by Gribouillis - Oct-22-2020, 09:41 AM
RE: Solve system of equations - by metulburr - Oct-22-2020, 09:44 AM
RE: Solve system of equations - by Sancho_Pansa - Oct-22-2020, 09:57 AM
RE: Solve system of equations - by Gribouillis - Oct-22-2020, 11:37 AM
RE: Solve system of equations - by Sancho_Pansa - Oct-22-2020, 12:02 PM
RE: Solve system of equations - by Sancho_Pansa - Oct-22-2020, 12:17 PM
RE: Solve system of equations - by Gribouillis - Oct-22-2020, 12:09 PM
RE: Solve system of equations - by Gribouillis - Oct-22-2020, 12:55 PM
RE: Solve system of equations - by Sancho_Pansa - Oct-22-2020, 01:12 PM
RE: Solve system of equations - by Sancho_Pansa - Oct-23-2020, 09:21 AM
RE: Solve system of equations - by Sancho_Pansa - Oct-23-2020, 03:25 PM
RE: Solve system of equations - by Gribouillis - Oct-24-2020, 08:55 PM
RE: Solve system of equations - by Sancho_Pansa - Oct-26-2020, 08:22 AM
RE: Solve system of equations - by Askic - Oct-26-2020, 10:05 AM
RE: Solve system of equations - by Sancho_Pansa - Oct-26-2020, 10:22 AM
RE: Solve system of equations - by Askic - Oct-26-2020, 10:35 AM
RE: Solve system of equations - by Sancho_Pansa - Oct-26-2020, 10:55 AM
RE: Solve system of equations - by Askic - Oct-26-2020, 05:28 PM
RE: Solve system of equations - by Sancho_Pansa - Oct-27-2020, 08:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Heart how to solve complex equations in python HoangF 3 2,833 Dec-26-2021, 07:04 PM
Last Post: HoangF
Question Help with code to solve polynomials equations hiviera 1 1,812 Jul-31-2021, 01:56 AM
Last Post: hiviera
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,711 Jan-11-2021, 06:30 PM
Last Post: ykumar34
  How to solve equations, with groups of variables and or constraints? ThemePark 0 1,696 Oct-05-2020, 07:22 PM
Last Post: ThemePark
  Solve a system of linear equations with binary variables lopeslimagabriel 3 2,518 Sep-24-2020, 07:09 AM
Last Post: scidam
  How to solve difficult non-linear equations? shreeniket 3 2,406 Apr-23-2020, 01:36 AM
Last Post: shreeniket
Question Difference between Python's os.system and Perl's system command Agile741 13 6,907 Dec-02-2019, 04:41 PM
Last Post: Agile741
  System of 3 non-linear equations in 3 unknowns (how-to-solve?) samsonite 2 3,586 Mar-23-2019, 10:14 AM
Last Post: samsonite
  Beginner: System of Equations Mahdi1994 2 2,542 Mar-19-2018, 12:37 AM
Last Post: Tiskolin

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020