Documentos de Académico
Documentos de Profesional
Documentos de Cultura
PROBLEMA DE REEMPLAZO
*REEMPLACE EL EJERCICIO DE MINIPRACTICA 2 POR EL EJERCICIO N.2 DE LA
PRÁCTICA. COMO QUEDAMOS POR WHATSAPP GRACIAS POR LA COMPRENSION AUX.
P2.The mixing of two salt solutions of differing concentrations gives rise to a first-order
differential equation for the amount of salt contained in the mixture. Let us suppose
that a large mixing tank initially holds 300 gallons of brine (that is, water in which a
certain number of pounds of salt has been dissolved). Another brine solution is pumped
into the large tank at a rate of 3 gallons per minute; the concentration of the salt in this
inflow is 2 pounds per gallon. When the solution in the tank is well stirred, it is pumped
out at the same rate as the entering solution. If 50 pounds of salt were dissolved initially
in the 300 gallons, how much salt is in the tank after a 50 min? (Use step h=10 min).
Develop a model for this phenomenon (ODE)
Solve the initial boundary problem by Euler, Rk2 methods.
Plot the amount of salt on the tank versus time at 50, 100, 150, 200, 300, 400,
500, 600 and 700 min using Heun’s method.
𝑑𝑉 𝑔𝑎𝑙
= 𝑞𝑒𝑛𝑡𝑟𝑎𝑑𝑎 − 𝑞𝑠𝑎𝑙𝑖𝑑𝑎 [ ]
𝑑𝑡 𝑚𝑖𝑛
𝑚
Sabemos que 𝜌 = 𝑉
𝑚
𝑑( )
𝜌
= 𝑞𝑒𝑛𝑡𝑟𝑎𝑑𝑎 − 𝑞𝑠𝑎𝑙𝑖𝑑𝑎
𝑑𝑡
DIAGRAMA DE FLUJO
INICIO
METODO DE RK2
ENTRADA:
to=0 mo=50
tf=50 min
h=10; N= (tf-to)/h
Q=3 ; V=300;𝜌=Cs=2;
PROCESO
for con=1:N
k1=f(to,mo);
k2=f(to+h,mo+k1*h);
t1=to+h;
m1=mo+(h/2)*(k1+k2);
to=t1;
mo=m1;
FIN
t1, m1
FACULTAD NACIONAL DE INGENIERIA
INICIO
METODO DE EULER
ENTRADA:
to=0 mo=50
tf=50 min
h=10; N= (tf-to)/h
Q=3 ; V=300;𝜌=Cs=2;
PROCESO
for con=1:N
t1=to+h;
m1=mo+h*f(to,mo);
to=t1;
mo=m1;
FIN
t1, m1
FACULTAD NACIONAL DE INGENIERIA
METODO DE HEUN
ENTRADA:
to=0 mo=50
tf=50 min
h=10; N= (tf-to)/h
Q=3 ; V=300;𝜌=Cs=2;
PROCESO
for con=1:N
mp=mo+h*f(to,mo);
t1=to+h;
m1=mo+(h/2)*(f(to,mo)+f(t1,mp));
to=t1;
mo=m1;
FIN
t1, m1
*En un vector se almacenan los valores de tiempo [50, 100, 150, 200, 300, 400, 500,
600 700]
Y en otro para las cantidades respectivas [m (5) m (100) m (150)………..];
Para posteriormente graficar ambos vectores,
CONCLUSIONES:
Para el método Euler a 50 min la cantidad de sal que se tiene es de 275.23 [Lb]
y por RK-2 es de 266.11 [Lb] para un h=10.
FACULTAD NACIONAL DE INGENIERIA