Items tagged with rootof rootof 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

Hi guys,

im trying to solve the linear equation system:

mysol := solve({J*a = m*l*(-c*ct^2*sf-c*sf*st^2+cf*d*st^2+d*sf*st^2)+m*g*l*st, cx*ux = cMx*xd+M*c+m*l*(-cp*pd^2*st-cp*st*td^2-2*ct*pd*sp*td+a*cp*ct-b*sp*st), cy*uy = cMy*yd+M*d+m*l*(2*cp*ct*pd*td-pd^2*sp*st-sp*st*td^2+a*ct*sp+b*cp*st), (-l^2*m*st^2+J)*b = -ml(c*cf*ct+ct*d*sf)}, {a, b, c, d}) :

Then, assigning the solutions:

assign(mysol):

Then, eliminating the RootOf's for variable a:

a_explicit := allvalues(a):

Unfortunately, a_explicit still contains RootOf's. How can I avoid this?

Thanks,

Martin

 

Up to Maple Help, the relatively new command SolveTools[Engine] with the
allsolutions option returns parameterized solutions for non-algebraic equations which may have infinitely many solutions. The question arises: how to extract these?
For example,
sol := SolveTools:-Engine({tan(x) = x}, [x], allsolutions);
[{x = RootOf(-tan(_Z)+_Z)}]
I want to extract the third positive solution (by its value), trying
evalf(allvalues(sol));
[{x = -4.493409458}], [{x = 0.}]
Is it possible at all?

Hello,

Assume a periodic signal that is the sum of four sinusoidal signals, all with different frequency and phase. The fundamental frequency has phase=0, so at t=0 its value is 0 (a zero crossing point). I need to find the influence of the other frequency components on the zero crossing point in [seconds] as an analytical expression. I made the Maple script below to find out, but get a RootOf result. How can I solve this?

Thanks for your help!

restart

p := a*sin(omega[P]*t):

q := b*sin(t*omega[Q]+phi[Q]):

r := c*sin(t*omega[R]+phi[R]):

s := d*sin(t*omega[S]+phi[S]):

z := p+q+r+s

a*sin(omega[P]*t)+b*sin(t*omega[Q]+phi[Q])+c*sin(t*omega[R]+phi[R])+d*sin(t*omega[S]+phi[S])

(1)

solve(z, t)

RootOf(sin(_Z)*a+b*sin((_Z*omega[Q]+omega[P]*phi[Q])/omega[P])+c*sin((_Z*omega[R]+omega[P]*phi[R])/omega[P])+d*sin((_Z*omega[S]+omega[P]*phi[S])/omega[P]))/omega[P]

(2)

``


Download 20131130_Zero_crossi.mw

I want to invlaplace the following complex expression that I call PQ.

>PQ:=(cosh((1/2)*eta*sqrt(C3^2+4*C1*s))*sqrt(C3^2+4*C1*s)+sinh((1/2)*eta*sqrt(C3^2+4*C1*s))*C3)*(cosh((1/2)*eta*C3)-sinh((1/2)*eta*C3))*(-cosh(C4)-sinh(C4)+s)/(s^2*(-sinh((1/2)*C3)+cosh((1/2)*C3))*(sinh((1/2)*sqrt(C3^2+4*C1*s))*C3+sqrt(C3^2+4*C1*s)*cosh((1/2)*sqrt(C3^2+4*C1*s))))

where C1 C3 C4 eta are constant .

Then I do like this

>invlaplace(PQ)

But I got

Hi,

How do I get ride of these Rootof?

I tried simplify,evala,value,Simplify and ect. Didnt really find anything useful.

Download rootof.mw

 

I dont care which root they actually take, all I want is one of the roots. So I can then use subs for substitution.

Casper

I would like to plot the following expression that I call W

>W:=tau*exp(C4)/C1-exp(C4)*(exp(C3-C3*eta)/C3^2-exp(C3)/C3^2+tau/C1+eta/C3)+exp(C4-C3*eta/2)*Sum(16*beta[m]*sin(beta[m]*eta/2)*exp(-(beta[m]*beta[m]+C3^2)*tau/(4*C1))/((beta[m]*beta[m]+C3^2)*( beta[m]*beta[m]-C3^2)^2),m=1..n)

Where C1, C3, C4 are constant, and  beta[m]satisfies the relationship  

C3*sin (beta/2) =beta*cos (beta/2)

I want to plot the W-eta curve and W-tau curve (eta at [0, 1...

I would like to solve the following equation that I call equ?

> equ: = tanh(s)=C3*s

To do this I use the code “solve” to solve it. C3 is constant.

> sol: =solve (equ,s)

RootOf(_Z*C3*(exp(_Z))^2+_Z*C3-(exp(_Z))^2+1)

I then get the RootOf expression. How to get its mathematical expressions? I am really interested in getting it.

Please help me in anyway you can as I am completely stuck

I would like to integrate the following expression that I call res

>res:= subs([S1 = C3-sqrt(C3^2+4*C1*s), S2 = C3+sqrt(C3^2+4*C1*s)], exp(s*t)*(S1*(sinh((1/2)*S1)-cosh((1/2)*S1))*(sinh((1/2)*S2*eta)-cosh((1/2)*S2*eta))-S2*(sinh((1/2)*S2)-cosh((1/2)*S2))*(sinh((1/2...

Hi,

I'm dealing with an iterated function (logistic map) where f(x)=s*x*(1-x) where the s is a general parameter between 1 and 4 inclusive, and it's fourth return map, or f(f(f(f(x)))) or f^[4](x).

h:x->f(f(f(f(x))))

What I'm trying to do hinges on evaluating this:

solve(h(x)=x,x);

a

Hello guys ,

 

i have a complicated function , i found its roots but when i evaluate function by its roots , the result is not zero !!!

 

thank you for your helpWork.mw

need to find the explicit root of u where k,b are  positive constants:

eq5:=u->-3*b*k*u^2-3*b*k^2*u^4-k^3*u^6*b+k*u+5*k^2*u^3-b;

sol:=(solve(eq5(u),u)): S:=array([],1..3): S[1]:=((sol[1]));S[2]:=sol[2]:S[3]:=sol[3]:S[4]:=sol[4]:S[5]:=sol[5]:S[6]:=sol[6]:

and choose the positive real root and substitute it in another equation.

and then plot k against b as:

i'm trying to solve this parametric parametequation(a1,a2 & l are parameters and n is my variable): 

a2*(l^(2*n)-1)-2*(a1+n*a2)*(l^n)*log(l)=0

when i try to solve this parametric equation, maple return a RootOf term and when i try to see the values of this RootOf by Allvalues, again return a RootOf, but when i replace the parameters by numbers(like a1=400, a2=25 & l=3.2), maple return a unique n. 

Dear all,

I’m a beginner in Maple and I have problem in understanding the RootOf

my equations are shown below:

 

M1alone := (1/2)*hs*fm*sigma*mu/(Ps*sqrt(sqrt(M1/h0)/Ps+ts))-As*h0*mu^2/M1 = (1/2)*hs*mu^2/Ps-(1/2)*hs*mu:

> M1sol := isolate(M1alone, M1);

M1 = Ps^2*(-ts+RootOf((-hs*mu*Ps+hs*Ps^2)*_Z^5+hs*fm*sigma*_Z^4*Ps+(-2*hs*Ps^2*ts+2*hs*mu*ts*Ps)*_Z^3-2*hs*fm*sigma*ts*Ps*_Z^2+(hs*Ps^2*ts^2-2*As*mu-hs*mu*ts^2*Ps...

1 2 Page 1 of 2