Items tagged with solve solve Tagged Items Feed

Dear Maple enthusiasts,

I am unable to find a working method to solve a system of 8 equations, of which 4 are differential equations. The system contains 8 unknown variables and the goal is to find an expression for each of these variables as a function of the time t. I have attached the code of my project at the bottom of this message.

I have tried the following:

  1. Using solve/dsolve to solve all 8 equations at once. This results in Maple eating up all of my memory and never finishing its calculations.
  2. First using solve to solve the 4 non-differential equations so that I get 4 out of 8 variables as a function of the 4 remaining variables. This results in an expression containing RootOf() for each of the 4 veriables I'm solving for, which prevents me from using these expressions in the 4 remaining differential equations.
  3. First using dsolve to solve the differential equations, which gives once again an expression for 4 variables as a function of the 4 remaining variables. I then use solve to solve the 4 remaining equations with the new found expressions. This results in an extremely long solution for each of the variables.

The code below contains the 3rd option I tried.

Any help or suggestions would be greatly appreciated. I have been scratching my head so much that I'm getting bald and whatever I search for on google or in the Maple help, I can't find a good reference to a system of differential equations together with other equations.

 

 

restart:

PARK - Mixed control

 

 

Input parameters

 

 

Projected interface area (m²)

A_int:=0.025^2*Pi:

 

Temperature of the process (K)

T_proc:=1873:

 

Densities (kg/m³)

Rho_m:=7000: metal

Rho_s:=2850: slag

 

Masses (kg)

W_m:=0.5: metal

W_s:=0.075: slag

 

Mass transfer coefficients (m/s)

m_Al:=3*10^(-4):

m_Si:=3*10^(-4):

m_SiO2:=3*10^(-5):

m_Al2O3:=3*10^(-5):

 

Weight percentages in bulk at t=0 (%)

Pct_Al_b0:=0.3:

Pct_Si_b0:=0:

Pct_SiO2_b0:=5:

Pct_Al2O3_b0:=50:

 

Weight percentages in bulk at equilibrium (%)

Pct_Al_beq:=0.132:

Pct_Si_beq:=0.131:

Pct_SiO2_beq:=3.13:

Pct_Al2O3_beq:=52.12:

 

Weight percentages at the interface (%)

Constants

 

 

Atomic weights (g/mol)

AW_Al:=26.9815385:

AW_Si:=28.085:

AW_O:=15.999:

AW_Mg:=24.305:

AW_Ca:=40.078:

 

Molecular weights (g/mol)

MW_SiO2:=AW_Si+2*AW_O:

MW_Al2O3:=2*AW_Al+3*AW_O:

MW_MgO:=AW_Mg+AW_O:

MW_CaO:=AW_Ca+AW_O:

 

Gas constant (m³*Pa/[K*mol])

R_cst:=8.3144621:

 

Variables

 

 

with(PDEtools):
declare((Pct_Al_b(t),Pct_Al_i(t),Pct_Si_b(t),Pct_Si_i(t),Pct_SiO2_b(t),Pct_SiO2_i(t),Pct_Al2O3_b(t),Pct_Al2O3_i(t))(t),prime=t):

Equations

 

4 rate equations

 

 

Rate_eq1:=diff(Pct_Al_b(t),t)=-A_int*Rho_m*m_Al/W_m*(Pct_Al_b(t)-Pct_Al_i(t));

 

Rate_eq2:=diff(Pct_Si_b(t),t)=-A_int*Rho_m*m_Si/W_m*(Pct_Si_b(t)-Pct_Si_i(t));

 

Rate_eq3:=diff(Pct_SiO2_b(t),t)=-A_int*Rho_s*m_SiO2/W_s*(Pct_SiO2_b(t)-Pct_SiO2_i(t));

 

Rate_eq4:=diff(Pct_Al2O3_b(t),t)=-A_int*Rho_s*m_Al2O3/W_s*(Pct_Al2O3_b(t)-Pct_Al2O3_i(t));

 

3 mass balance equations

 

 

Mass_eq1:=0=(Pct_Al_b(t)-Pct_Al_i(t))+4*AW_Al/(3*AW_Si)*(Pct_Si_b(t)-Pct_Si_i(t));

 

Mass_eq2:=0=(Pct_Al_b(t)-Pct_Al_i(t))+4*Rho_s*m_SiO2*W_m*AW_Al/(3*Rho_m*m_Al*W_s*MW_SiO2)*(Pct_SiO2_b(t)-Pct_SiO2_i(t));

 

Mass_eq3:=0=(Pct_Al_b(t)-Pct_Al_i(t))+2*Rho_s*m_Al2O3*W_m*AW_Al/(Rho_m*m_Al*W_s*MW_Al2O3)*(Pct_Al2O3_b(t)-Pct_Al2O3_i(t));

 

1 local equilibrium equation

 

 

Gibbs free energy of the reaction when all of the reactants and products are in their standard states (J/mol). Al and Si activities are in 1 wt pct standard state in liquid Fe. SiO2 and Al2O3 activities are in respect to pure solid state.

 

delta_G0:=-720680+133*T_proc:

 

Expression of mole fractions as a function of weight percentages (whereby MgO is not taken into account, but instead replaced by CaO ?)

x_Al2O3_i(t):=(Pct_Al2O3_i(t)/MW_Al2O3)/(Pct_Al2O3_i(t)/MW_Al2O3 + Pct_SiO2_i(t)/MW_SiO2 + (100-Pct_SiO2_i(t)-Pct_Al2O3_i(t))/MW_CaO);
x_SiO2_i(t):=(Pct_SiO2_i(t)/MW_SiO2)/(Pct_Al2O3_i(t)/MW_Al2O3 + Pct_SiO2_i(t)/MW_SiO2 + (100-Pct_SiO2_i(t)-Pct_Al2O3_i(t))/MW_CaO);

 

Activity coefficients

Gamma_Al_Hry:=1: because very low percentage present  during the process (~Henry's law)

Gamma_Si_Hry:=1: because very low percentage present  during the process (~Henry's law)

Gamma_Al2O3_Ra:=1: temporary value!

Gamma_SiO2_Ra:=10^(-4.85279678314968+0.457486603678622*Pct_SiO2_b(t)); very small activity coefficient?
plot(10^(-4.85279678314968+0.457486603678622*Pct_SiO2_b),Pct_SiO2_b=3..7);

 

Activities of components

a_Al_Hry:=Gamma_Al_Hry*Pct_Al_i(t);
a_Si_Hry:=Gamma_Si_Hry*Pct_Si_i(t);
a_Al2O3_Ra:=Gamma_Al2O3_Ra*x_Al2O3_i(t);
a_SiO2_Ra:=Gamma_SiO2_Ra*x_SiO2_i(t);

 

Expressions for the equilibrium constant K

K_cst:=exp(-delta_G0/(R_cst*T_proc));

Equil_eq:=0=K_cst*a_Al_Hry^4*a_SiO2_Ra^3-a_Si_Hry^3*a_Al2O3_Ra^2;

 

Output

 

 

with(ListTools):
dsys:=Rate_eq1,Rate_eq2,Rate_eq3,Rate_eq4:
dvars:={Pct_Al2O3_b(t),Pct_SiO2_b(t),Pct_Al_b(t),Pct_Si_b(t)}:
dconds:=Pct_Al2O3_b(0)=Pct_Al2O3_b0,Pct_SiO2_b(0)=Pct_SiO2_b0,Pct_Si_b(0)=Pct_Si_b0,Pct_Al_b(0)=Pct_Al_b0:
dsol:=dsolve({dsys,dconds},dvars):

Pct_Al2O3_b(t):=rhs(select(has,dsol,Pct_Al2O3_b)[1]);
Pct_Al_b(t):=rhs(select(has,dsol,Pct_Al_b)[1]);
Pct_SiO2_b(t):=rhs(select(has,dsol,Pct_SiO2_b)[1]);
Pct_Si_b(t):=rhs(select(has,dsol,Pct_Si_b)[1]);

sys:={Equil_eq,Mass_eq1,Mass_eq2,Mass_eq3}:
vars:={Pct_Al2O3_i(t),Pct_SiO2_i(t),Pct_Al_i(t),Pct_Si_i(t)}:
sol:=solve(sys,vars);

,


Download Park_-_mixed_control_model.mw

How about this equation

restart:
solve(x^2 - 2*(m+1)*x+m^2 - 2*m + m^2=0,{x},parametric=full);
allvalues(%);?

Hi,

I was wondering how I could assign small angel assumptions so that I could simplify an equation of motion to solve for theta double dot. Thank you for your help.


Download small_angle_assumption.mw

Equation Manipulation

-assumptions- small angel

"sin(`ϑ`):=`ϑ`"

`ϑ`

(1)

"cos(`ϑ`):=1"

1

(2)

diff(`ϑ`(t), t) := 0

NULL

diff(x(t), t, t) := (H+u)/M


I*(diff(`ϑ`(t), t, t)) = [m*(-l*(diff(`ϑ`(t), t))^2*cos(`ϑ`)-l*(diff(`ϑ`(t), t, t))*sin(diff(`ϑ`(t), t)))-m*g]*l*sin(`ϑ`)+[m*(l*(diff(`ϑ`(t), t))^2*sin(`ϑ`)-l*(diff(`ϑ`(t), t, t))*cos(diff(`ϑ`(t), t))+diff(x(t), t, t))]*l*cos(`ϑ`)

"(->)"

Error, (in isolate) unable to isolate diff(diff(`ϑ`(t), t), t)

 

NULL

``


Download small_angle_assumption.mw

 

I want to solve system of equation but it has unknow parameter.

Then I test system of equation. It hasn't unknowparameter.

eq1 := x^2+y^2 = 4

eq2 := y-x^2 = 0

fsolve({eq1, eq2}, {x, y})

{x = -1.249621068, y = 1.561552813}

So I get answer by using fsolve.

 

Then I try to put unknow parameter in system of equation.

eq3 := x^2+ky^2 = 4

eq4 := ay-hx^2 = 0

fsolve({eq3, eq4}, {x, y})

Error, (in fsolve) {ay, hx, ky} are in the equation, and are not solved for

I don't get answer and open link. The link hasn't similar this problem.

Solve equation ...

September 15 2014 brian bovril 394

Why can't maple 15 solve this eqn. [n= 10]

solve(ithprime(n)=29,n);

 

Hi Maple friends.

If Maple solves an equation and spits out an answer like this,

{x = 4/3+(1/3)*sqrt(7)}, {x = 4/3-(1/3)*sqrt(7)}

how can I get a decimal answer, other than by using my calculator?

Thanks in advance.

Hi, those who are in mapleprimes.

 

i have a problem in solving inequality with symbolic notated parameters.

I wrote the following code to solve for n(SPH), but couldn't obtain any result but an error message.

solve(-s*(-n(SPF)*tau+n(SPH))/(tau-1) <= n(SPH),n(SPH)) assuming (tau<1,s>0,s<1,tau>0);

 

The error was

Error, (in assuming) when calling 'unknown'. Received: 'invalid input: Utilities:-SetSolutions expects its 2nd argument, solutions, to be of type ({list, set})({piecewise, ({list, set})({name, relation})}), but received [s = -tau~+1, [SPF = SPF, s = s, tau~ <= 0]]'

 

Please tell me how I should do to solve the inequality.

 

Thanks in advance.

 

taro

 

Hi:

i will solve the three equations below with numerical method,how?

eq1 := -2.517407096*10^12*q[1](t)^2-5.292771429*10^12*q[1](t)-1.888055322*10^12*q[2](t) = 0
eq2 := 2.246321962*10^12*q[1](t)^2+1.684741471*10^12*q[2](t)+8.110113889*10^12*q[1](t)-7.480938859*10^10*q[3](t) = 0
eq3 := int((-3.826000000*10^11*q[2](t)*cos(Pi*x)*Pi^2-3.826000000*10^11*q[1](t)^2*cos(Pi*x)*Pi^3*sin(Pi*x)+3.414000000*10^11*q[1](t)^2*sin(Pi*x)^2*Pi^4-3.414000000*10^11*q[1](t)^2*cos(Pi*x)^2*Pi^4+7*(int(exp(10*tau), tau = -infinity .. t))+q(x, t))*sin(Pi*x), x = 0 .. 1) = 0

Root of answer ...

August 19 2014 iman 10

Hi:
i solved nonlinear ode in terms of t (y(t)) with dsolve command,how i will evaluate value function(y(t)) in points t=0..1 with delta t=0.01 and results(t and y(t)) inside a excel file?

eq := diff(y(t), t, t)-y(t)^2 = 1
res := dsolve({eq, y(0) = 0, (D(y))(0) = 0}, {y(t)}, numeric)

 

I failed to solve the ODE system shown as follows, where y1(x) and y2(x) are functions of x, ranging from -L/2 to L/2. All the other parameters are constants (A,B,C,F,G). The analytic or numeric solution of y1(x) and y2(x) are wanted.Really appreciate for you experts' help and time!!!

dsys:={diff(y1(x),x$2)-A*x^2*y1=B*diff(y2(x),x$3),diff(y2(x),x$2)-C*diff(y1(x),x)=F*x^2+G}

boundary conditions:y1(0)=0, diff(y2(L/2),x$2)=0, D(y2)(0)=0, y2(L/2)=0

 

 

i'm going to solve the two eq. and plot the answer point

i try to do two group but the first succeed the second get some wrong

the first i named 1 ,and second named 2 as below

the 1 plot the correct point that i want

Although the 2 solve eq too but it didn't plot the point on(-0.36,0.29),

the code of this two is same ,

anyone can help me?

1.mw

 

 

 

 

2.mw

cilrcle.mw

i want to plot a circle which is centered at(0,0),and the radius is the length of Point2 and origin

but it shows some error,how could i do to solve this

 

123.mw

i make two component that the left named MathContainer0 and right named MathContainer1

which can enter any numers on it

and i want to solve the eqution such as  

x*%MathContainer0+y*%MathContainer1=0 ,and y*%MathContainer0+x*%MathContainer1=0

but it still not shows the answers i want

anyone can help thx

Dear people in Maple Primes,

 

I have a question about how to solve a system of equations.

In the following equation, I want to eliminate D(a).

x := D(a*b*c = 3*d); 
y := D(a^2*b^3*c = 3*a);

 

For this purpose,

a code of 

d_a := isolate(x, D(a));

eval(y, d_a);

works well. But, for me, this code is a little laborious.

Is there any better way than the above way?

 

Thanks in advance.

 

taro yamada

 

 

1 2 3 4 5 6 7 Last Page 1 of 33