Items tagged with nonlinear nonlinear Tagged Items Feed

Good day, can any one help in writing maple programme for the finite difference (FD) formulae define to solve this coupled non-linear  ODEs. See it here FDM_programme.mw Thank you

NOTE: please disregard the earlier link.

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

I have a large system of non-linear equations. Is there any way to get Maple to remove the duplicate equations in the system? For example Maple doesn't recognise that x-y =0 is equal to y-x=0. 

Hi:

i will solve the five nonlinear coupled odes with maple in least time,can evey body help me?

eq1:= -3515.175096*Pi*q[1](T)*q[4](T)-3515.175096*Pi*q[1](T)*q[5](T)-2650.168890*Pi^2*q[3](T)*q[1](T)-9.871794877*10^7*q[2](T)*Pi+.5622514683*(diff(q[1](T), T, T))+1.893468706*q[1](T)^3*Pi^4+2.507772708*10^5*q[1](T)*Pi^2=0

eq2:= 496.9066665*q[2](T)*Pi^2-380.5288665*q[4](T)*Pi-62694.31768*Pi*q[1](T)+380.5288665*q[5](T)*Pi+0.3570776400e-3*(diff(q[2](T), T, T))+2.467948718*10^7*q[2](T)=0

eq3:= 2650.168888*q[1](T)^2*Pi^2+7.824250847*10^5*q[3](T)*Pi^2+1.037806000*10^6*q[5](T)*Pi+.5622514682*(diff(q[3](T), T, T))+1.037806000*10^6*q[4](T)*Pi=0

eq4:= 63661.97724-241.8620273*q[1](T)*(diff(q[1](T), T))-6.792272727*10^6*(diff(q[4](T), T))-5191.348749*q[4](T)-5191.348749*q[5](T)+71406.36133*(diff(q[3](T), T))-6.792272727*10^6*(diff(q[5](T), T))=0

eq5:= 70.02817496+2490.500000*(diff(q[5](T), T))-29887.90351*q[4](T)+29887.90351*q[5](T)-2490.500000*(diff(q[4](T), T))-45.34913011*(diff(q[2](T), T))=0

Dear Friends

I have a problem in CPU time in MAPLE.

I write the codes in maple related to the nonlinear heat conduction problem in one dimension by Collocation method, but after 30 minutes no solution has been observed!!!

My codes are for N=4!, i.e., I have 25 equations with 25 unknowns!!!

If MAPLE can not solve this simple system, How can I solve 3 dimensional pdes by N=9,

In this case, I have 1000 equations with 1000 unknowns!!!

please help me and suggest me a fast iterative solver.

I should remark that my problem is stated in this paper

http://www.sciencedirect.com/science/article/pii/S1018364713000025

If there exist any other suitable method, I will be happy to receive any support.

 

With kind regards,

Emran Tohidi.

 

> restart;
> Digits := 20; N := 4; st := time(); u := sum(sum(a[m, n]*x^m*t^n, m = 0 .. N), n = 0 .. N); u := unapply(u, x, t); ut := diff(u(x, t), `$`(t, 1)); ut := unapply(ut, x, t); ku := simplify(1+u(x, t)^2); ku := unapply(ku, x, t); ux := diff(u(x, t), `$`(x, 1)); ux := unapply(ux, x, t); K := ku(x, t)*ux(x, t); K := unapply(K, x, t); Kx := diff(K(x, t), `$`(x, 1)); Kx := unapply(Kx, x, t); f := proc (x, t) options operator, arrow; x*exp(t)*(1-2*exp(2*t)) end proc;
print(`output redirected...`); # input placeholder
> S1 := {seq(u(i/N, 0)-i/N = 0, i = 0 .. N)}; S2 := {seq(u(0, j/N) = 0, j = 1 .. N)}; S3 := {seq(u(1, j/N)+ux(1, j/N)-2*exp(j/N) = 0, j = 1 .. N)}; S4 := {seq(seq(Kx(i/N, j/N)+f(i/N, j/N)-ut(i/N, j/N) = 0, i = 1 .. N-1), j = 1 .. N)}; S := `union`(`union`(`union`(S1, S2), S3), S4); sol := DirectSearch:-SolveEquations([op(S)], tolerances = 10^(-4), evaluationlimit = 1000000);
print(`output redirected...`); # input placeholder
> assign(sol);
%;
> u(x, t);
> CPUTIME := time()-st;
plot3d(u(x, t) - x exp(t), x = 0 .. 1, t = 0 .. 1)

Hi all

In matlab software we have a command namely fmincon which minimizes any linear/nonlinear algebric equations subject to linear/nonlinear constraints.

Now my question is that: what is the same command in maple?or how can we minimize linear/nonlinear function subject to linear/nonlinear constraints in maple?

thanks a lot

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

I have the following nonlinear Differential Equation and don't know how to solve.  Can anyone give me any hints on how solvle for E__fd(t).  I don't even know the specific classification (other than nonlinear) of this DE can someone at least give me hint on that. Thanks.

 

.5*(diff(E__fd(t), t)) = -(-.132+.1*e^(.6*E__fd(t)))*E__fd(t)+0.5e-1

 

Thanks,

Melvin

Hello;
        i am wording on fluid dynamics, in which i can up a system of nonlinear partial differential equation with i am suppose to solve using implicit keller box method. i need an asistance on how to implement this in maple.

hi guys i want to solve this equation with maple please help me

 

eq[1]:=0.223569c_1+2.35589c_2*c_1^2+0.002356c_1*c_2^2;

eq[2]:=1.277899c_1*c_3-2.350023c_2*c_3^2+7.5856c_3*c_2^2;

eq[3]:=3.225989c_1^2+-2.35589c_3*c_1^2-7.28356c_3*c_2^3;

 

i want solve those equations with newton method

 

 

I have 2nd order nonlinear ode I try to solve with Runge Kutta 4th order method in maple but all I get from the outcome was 1 and 0.This is the equation:theta_ode1.mw . How do I do it Or how do I write the code to solve it with maple using  Runge Kutta 4th order method?

I have 2nd order nonlinear ode I try to solve with Runge Kutta 4th order method in maple but all I get from the out is 1 and 0.This is the equation: theta_ode.mw . How do I do it Or how do I write the code to solve it with maple using  Runge Kutta 4th order method?

Himmelblau.mwOn the basis of Dragнilev method…Is there anyone interested in the algorithm to reduce the distance between the points of the given constraints? The algorithm is adapted for use in R ^ n. This is an example of its work on the surface:                      f = - (x1 ^ 2 x2-.3) ^ 2 - (x1 x2 ^ 2-.7) ^ 2 - 5;          ...

Hi,

I am trying to solve system of equations as

f(x,y,c)=0

and g(x,y,c)=0, with c as parameter and f and g are nonlinear function in y and c. My friend suggestedme to use continuation method for this in Matlab. So is there any way...

Hello, everyone. I have been messed up by a system of 50 nonlinear parametric equations with 50 unknowns(see the code in the file named nonlinear ). Since I am new to Maple, I don't know whether it is possible to make such a system work out by software. I've tried the SOLVE and FSOLVE command but get no result. Are there any other ways or toolbox for such kind of systems? Is there any typing wrongs in my code? I am sincerely looking forward to  receive any ideas...

Hi, I want to substitute the result from NonlinearFit into formula and plot together with raw data.

I have two files v.txt and i.txt , v stands for voltage, i stands for current, using formulato fit my raw data,

The picture is captured from my screen.

1 2 3 4 Page 1 of 4