Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import numexpr as ne
- import matplotlib.pyplot as plt
- import numpy as np
- import numba as nb
- M = 10
- A = 10
- D = 0.1
- xmin = -4
- xmax = 4
- n = 800
- tfinal = 3
- tinicial = 1
- # GENERANDO VECTOR CON PUNTOS DE DISCRETIZACION X ESPACIADOS
- x= np.linspace(xmin, xmax, n)
- #GENERANDO FUNCION ANALITICA
- def Cdifuana(M,A,D,x,t):
- temp = A*math.sqrt(4*math.pi*D*t);
- Cdifuana = (M/temp)*math.exp(-x**2 /(4*D*t))
- #GENERANDO CONDICION INICIAL
- C=(Cdifuana(M,A,D,x,tinicial))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement