Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Problème determinant algebre lineaire pdf mpsi

import math 
import numpy
from scipy.integrate import odeint
from scipy.special import ellipk, ellipe
from matplotlib.pyplot import *

            
class Spire:
    def __init__(self,a,zs,i):
        self.a = a
        self.a2 = a*a
        self.a4 = self.a2*self.a2
        self.zs = zs
        self.i = i
    def champB(self,x,z):
        if abs(x) < 1e-8:
            x=0
        if x>0:
            sx = 1
            x = -x
        else:
            sx = -1
        z = z-self.zs
        x2 = x*x
        z2 = z*z
        r2 = x2+z2
        b1 = self.a2+ r2
        b2 = 2*x*self.a
        b3 = b1+b2
        b4 = b1-b2
        b5 = -2*b2/b4
        b6 = math.sqrt(b3/b4)*self.i 
        rb3 = math.sqrt(b3)
        b7 = self.a*b3*rb3
        b8 = self.a4-self.a2*(x2-2*z2)+z2*(x2+z2)
        b9 = (self.a2+z2)*b3
        e = ellipe(b5)
        k = ellipk(b5)
        bz = b6*((self.a2-r2)*e+b3*k)/b7
        if x==0:
            bx = 0.0
            Atheta = 0.0
            Adx = bz/2
        else:
            bx = -sx*z/x*b6*(b1*e-b3*k)/b7
            Atheta = -sx*b6/x*(-b4*e+(self.a2+r2)*k)/(self.a*rb3)
            Adx = b6/x2*(b8*e-b9*k)/b7
        return [bx,bz,Atheta,Adx]
Comment

PREVIOUS NEXT
Code Example
Python :: windows py SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate 
Python :: expected str instance, NoneType found 
Python :: Creaing your own functions 
Python :: unpack list 
Python :: 5.2.5: Counting 10 to 100 by ... 
Python :: python dummy command 
Python :: python nc group variables 
Python :: python print top 5 results of array 
Python :: pyspark rdd method 
Python :: python import file from same level 
Python :: create a python file and import it as library in other file 
Python :: picobot python 
Python :: python iterar claves 
Python :: frogenset ito list pandas 
Python :: couchbase python 
Python :: weight constraints keras cnn 
Python :: python run scp command 
Python :: does building wheel for dlib setup py takes forever 
Python :: how to get entitys of word using pytho nlp 
Python :: Return the number of elements in this RDD. 
Python :: Returns the cartesian product with another DataFrame 
Python :: ole db 
Python :: importando todo o pacote em python 
Python :: python compactar arquivo antes de exportar 
Python :: pylatex tab 
Python :: sumx and ABS in power bi 
Python :: does the queen brush her teeth 
Python :: python sqlobject declare connection 
Python :: RuntimeError: Error in qhull Delaunay triangulation calculation: singular input data (exitcode=2); use python verbose option (-v) to see original qhull error. 
Python :: openign in browser python 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =