Klockjj

10 Reputation

One Badge

8 years, 245 days

MaplePrimes Activity


These are questions asked by Klockjj

So im trying to solve multiple ODES using dsolve(numeric) but I jsut cant get it to work.

I kep getting this one error: 

Error, (in f) unable to store '-HFloat(0.020918994979034728)-HFloat(0.09184018333019917)*I' when datatype=float[8]

 

This is my uploaded file 

(for some reason the uploaded file didnt show the error at the bottom so i just pasted it in the spot it would appear.

Download CHE504_HW5.mw

Given:

restart

dt := 2.07*0.254e-1

0.52578e-1

(1)

dto := 2.38*0.254e-1

0.60452e-1

(2)

ho := 5000

5000

(3)

``

Ltube := 5

5

(4)

``

Po := 2.5

2.5

(5)

To := 350

350

(6)

dp := 0.3e-2

0.3e-2

(7)

tau := 3

3

(8)

dpore := 5.2*10^(-9)

0.5200000000e-8

(9)

kfluid := 0.485e-1

0.485e-1

(10)

ksolid := 1.67

1.67

(11)

kpipe := 17

17

(12)

Cpair := 1.01

1.01

(13)

`μ_air` := 3.16*10^(-5)

0.3160000000e-4

(14)

rho := P(z)*(28.9*(1/1000))/(Rgas*(T(z)+273.15))

0.2890000000e-1*P(z)/(Rgas*(T(z)+273.15))

(15)

``

Rgas := 8.2057*10^(-5)

0.8205700000e-4

(16)

``

``

density calculation n/v = (P/RT)*mw_air, kg/m^3

``

`ρi` := (2.5*28.966)/(0.82057e-1*(350+273.15))

1.416186012

(17)

NULL

Volumetric flow, m^3/s

((1/60)*((1/300)*((1/1000)*(180*1000000)*.4535)*(1/24))*(1/60))/(1.416)

0.2224085844e-2

(18)

``

NULL

Superficial velocity, m/s

NULL

Vsi := evalf(%/((1/4)*Pi*(2.07*0.254e-1)^2))

1.024362190

(19)

Gs constant, kg/m^2-s

Error, missing operator or `;`

 

Gsi := `ρi`*Vsi

1.450687405

(20)

Gs := 1.45

1.45

(21)

``

``

NULL

Void fraction, epsilon,b

`εb` := .38+0.73e-1*(1+(0.525e-1/(0.3e-2)-2)^2/(0.525e-1/(0.3e-2))^2)

.5102677551

(22)

hi

hi := 3.6*kfluid*(dp*Gs/(`μ_air`*`εb`))^.365/dp

448.9928888

(23)

kinetic parameter

K := ln(19.837-13636/(T(z)+273.15))

ln(19.837-13636/(T(z)+273.15))

(24)

radial disperssion Coeff

Dr := Vs*dp/(9*(1+19.4*(dp/dt)^2))

0.3135309899e-3*Vs

(25)

thermal conductivity calculations

Kbs := kfluid*(`εb`+(1-`εb`)/(2/3*(1+kfluid/ksolid)))

0.5937050269e-1

(26)

``

Kbd := `εb`*Cpair*Gs*dp/(9*(1+19.4*(dp/dt)^2))

0.2342976727e-3

(27)

KB := Kbs+Kbd

0.5960480036e-1

(28)

Heat of reaction (deltaH), Find heat of formation for each reactant and product--> dHrxn = heat of formation(product)-heat of formation(reactant)

Error, missing operator or `;`

 

heat of formation = A + B*T + C*T^2

Hfacrolein := -7.076*10+(-5.59*10^(-2))*(273.15+350)+3.86*10^(-5)*(273.15+350)^2

-90.60509039

(29)

Hfwater := -238.41-0.122e-1*(350+273.15)+2.76*10^(-6)*(273.15+350)^2

-244.9406781

(30)

Hfpropylene := 3.62*10+(-6.49*10^(-2))*(273.15+350)+3.049*10^(-5)*(273.15+350)^2

7.59731748

(31)

`ΔHrxn` := Hfacrolein-Hfwater-Hfpropylene

146.7382702

(32)

Solving nodified Ergun Equation

f := (1-`εb`)*(1.75+(150*(1-`εb`))*`μ_air`/(dp*Gs))/`εb`

2.191735176

(33)

``

Determining U of the wall and Ueffective

``

``

Uwall := 1/(1/hi+ln(dto/dt)/(2*ksolid)+1/ho)

22.61972270

(34)

``

Ueff := 1/(1/Uwall+(1/2)*dt/(4*KB))

6.473624190

(35)

ode1 := Gs*(diff(Cprop(z), z))/rho = -K*Cprop(z)

0.4117046714e-2*(T(z)+273.15)*(diff(Cprop(z), z))/P(z) = -ln(19.837-13636/(T(z)+273.15))*Cprop(z)

(36)

ode2 := Gs*Cpair*(diff(T(z), z)) = -K*Cprop(z)*`ΔHrxn`-4*Ueff*(T(z)-350)/dt

1.4645*(diff(T(z), z)) = -146.7382702*ln(19.837-13636/(T(z)+273.15))*Cprop(z)-492.4968000*T(z)+172373.8800

(37)

ode3 := diff(P(z), z) = -f*Gs^2/(rho*dp)

diff(P(z), z) = -4.361346783*(T(z)+273.15)/P(z)

(38)

Ics1 := Cprop(0) = 0.3e-1

Cprop(0) = 0.3e-1

(39)

Ics2 := T(0) = 350

T(0) = 350

(40)

Ics3 := P(0) = 2.5

P(0) = 2.5

(41)

NULL

dsolve({Ics1, Ics2, Ics3, ode1, ode2, ode3}, {Cprop(z), P(z), T(z)})

Error, (in f) unable to store '-HFloat(0.020918994979034728)-HFloat(0.09184018333019917)*I' when datatype=float[8]

 

 

NULL

NULL

``

Page 1 of 1