pivusan

0 Reputation

One Badge

9 years, 283 days

MaplePrimes Activity


These are replies submitted by pivusan

@tomleslie 

thanks

@tomleslie 

I read the manual about function. As often happens in theory, everything is beautiful. Practice is lame. :)

 

here is an example

(* pre-exponential factor *)
k__f:=(T(x,t))-> k__f0*exp(-E__f0/(R__0*T(x,t)));

 I receive an error

Error, invalid parameter; functional operators require their parameters to be of type symbol or (symbol::type)

 

I look your clarification and correction of my mistakes. You are in this example, T (x, t) "tricky" :) replaced by T (x, t) on some z. But I do not have any z. :)

What I need.
I'm looking for the temperature profile of the reactor length 0<x<L over time 0<t<lot.

If you solve the heat equation numerically EquHeat, as usual, I'll get the dependence of T (x, t).

In calculating T (x, t) i should use k__f (reaction rate), which itself depends of course on the temperature.

How should I record in this case k__f in Maple environment?

 

 

@tomleslie 

Looked example, thank you!
It is becoming increasingly clear. I use the function, so "->". Maple syntax is not intuitive, but after reading the explanations you realize that everything is fine!
Now View All to determine functions.
And add the necessary number of equations.
It remains an open question whether it is possible in principle to resolve a similar system with the help of Maple? Or is it very difficult?

@tomleslie 

I corrected according to the comments. And ask questions :)
I do not understand for example here:

(* porosity *)
#m(x,t) = m__0+(1-m__0)*eta__f(x, t);
#
# In order to use this it has to be written as a function (?)
#
m:=(x,t)-> m__0+(1-m__0)*eta__f(x, t);
Mod03.mw

@tomleslie 

thanks, I'll take a look

@tomleslie 

 Thank you for trying to help.
 
I am newbie.
All errors are associated with lack of understanding of logic maple.
For example, I'm surprised, performance tables - the subscript.
:)
 
 
kf(T(x,t)) - speed reaction.
  I want to say that it depends on T.
 

it became clear why the Maple wrote in the initial conditions of the table.
 
The question remains:
 
  -regular I wrote a boundary condition?

so it is written mathematically
 
so I wrote maple
 
  -Does examples of solving complex systems like mine?
 
 
I took into account all the comments.
new document attached.
 

``

(* Solve the system of equations for the problem of filtration combustion.
Left reactor oxidant gas flows.
Inside the reactor, it reacts with the solid fuel gas product is obtained.
Present: the equation for the conservation of heat and gas equation for burnout. The reaction takes place on the Arrhenius law.
It is necessary to calculate the temperature and concentration profiles.*)

``

(* Cоздание системы уравнений для фильтрационного горения *)

restart: with(PDEtools):

``

declare(m(x,t));

m(x, t)*`will now be displayed as`*m

(1)

(* This is a constants ( with subscript "0").
    We define here are some constants. *)
 U__g0:= 0.2:
 c__g0:= 0.24: rho__g0:= 0.1205e-2:
 c__f0:= 0.16: rho__f0:= 2.2:
 T__g0:= 293.15: T__f0:= T__g0: T__env0:= T__g0:
 a__ox0:= 0.25: a__in0:= 0.75: a__p0:= 0.0:
 mu__ox0:=32.0: nu__ox0:=1.0: mu__p0:=28.0: nu__p0:=2.0: mu__in0:=28.0: nu__in0:=0.0:
 L__0:= 100.0:
 m__0:= 0.5:
 alpha__0:=1: S__0:=1: V__0:=1: (* Нужно определить!!*)
 Q__f0:=300:
 lambda__f0:=0.006: lambda__g0:=0.0059: (* Нужно определить!!*)
 k__f0:=10^10: E__f0:=20000: R__0:=1.9858:
 P__0:=101325: (* Нужно определить!!*)
 D__0:=0.1:

``

(* write the system equations. *)

(* The conservation of heat. *)
EquHeat := (1-m(x,t))*c__f(x, t)*rho__f(x, t)*(diff(T(x,t),t))+c__g(x,t)*rho__g(x,t)*U(x,t)*(diff(T(x,t),x)) = lambda(x,t)*(diff(T(x,t),x,x))-alpha__0*S__0*(T(x,y)-T__env0)/V__0+Q__f0*(1-m(x,t))*rho__f0*k__f(T(x,t))*(1-eta__f(x,t))*rho__g(x,t)*a__ox(x,t);

#   k__f(T(x,t))-a pre-exponential factor it depends on T and defined below
#   m(x,t) - defined below
#   c__f(x,t) - We need to find out the differential equations
#   rho__f(x,t) - We need to find out the differential equations
#   rho__g(x,t) - We need to find out the differential equations
#   lambda(x,t) - defined below
#   U(x,t) - We need to find out the differential equations

(1-m(x, t))*c__f(x, t)*rho__f(x, t)*(diff(T(x, t), t))+c__g(x, t)*rho__g(x, t)*U(x, t)*(diff(T(x, t), x)) = lambda(x, t)*(diff(diff(T(x, t), x), x))-T(x, y)+293.15+660.0*(1-m(x, t))*k__f(T(x, t))*(1-eta__f(x, t))*rho__g(x, t)*a__ox(x, t)

(2)

``

(* conservation equation for gas - (ox)idizer *)
EquContinuity__ox := diff(m(x,t)*rho__g(x,t)*a__ox(x,t),t) = diff(m(x, t)*D__0*rho__g(x,t)*(diff(a__ox(x,t),x)),x)-(diff(U(x,t)*rho__g(x,t)*a__ox(x,t),x))-(1-m(x,t))*rho__f0*k__f(T(x, t))*(1-eta__f(x,t))*rho__g(x,t)*a__ox(x,t);
# a__ox(x, t) - We need to find out the differential equations
# eta__f(x, t) - defined below

(diff(m(x, t), t))*rho__g(x, t)*a__ox(x, t)+m(x, t)*(diff(rho__g(x, t), t))*a__ox(x, t)+m(x, t)*rho__g(x, t)*(diff(a__ox(x, t), t)) = .1*(diff(m(x, t), x))*rho__g(x, t)*(diff(a__ox(x, t), x))+.1*m(x, t)*(diff(rho__g(x, t), x))*(diff(a__ox(x, t), x))+.1*m(x, t)*rho__g(x, t)*(diff(diff(a__ox(x, t), x), x))-(diff(U(x, t), x))*rho__g(x, t)*a__ox(x, t)-U(x, t)*(diff(rho__g(x, t), x))*a__ox(x, t)-U(x, t)*rho__g(x, t)*(diff(a__ox(x, t), x))-2.2*(1-m(x, t))*k__f(T(x, t))*(1-eta__f(x, t))*rho__g(x, t)*a__ox(x, t)

(3)

(* conservation equation for gas - (p)roduct *)
EquContinuity__p := diff(m(x,t)*rho__g(x,t)*a__p(x,t),t) = diff(m(x,t)*D__0*rho__g(x,t)*(diff(a__p(x,t),x)),x)-(diff(U(x,t)*rho__g(x,t)*a__p(x,t),x))+mu__p0*nu__p0*(1-m(x,t))*rho__f0*k__f(T(x,t))*(1-eta__f(x,t))*rho__g(x,t)*a__ox(x,t)/(mu__ox0*nu__ox0);

(diff(m(x, t), t))*rho__g(x, t)*a__p(x, t)+m(x, t)*(diff(rho__g(x, t), t))*a__p(x, t)+m(x, t)*rho__g(x, t)*(diff(a__p(x, t), t)) = .1*(diff(m(x, t), x))*rho__g(x, t)*(diff(a__p(x, t), x))+.1*m(x, t)*(diff(rho__g(x, t), x))*(diff(a__p(x, t), x))+.1*m(x, t)*rho__g(x, t)*(diff(diff(a__p(x, t), x), x))-(diff(U(x, t), x))*rho__g(x, t)*a__p(x, t)-U(x, t)*(diff(rho__g(x, t), x))*a__p(x, t)-U(x, t)*rho__g(x, t)*(diff(a__p(x, t), x))+3.850000000*(1-m(x, t))*k__f(T(x, t))*(1-eta__f(x, t))*rho__g(x, t)*a__ox(x, t)

(4)

``

(* porosity *)
m(x,t) = m__0+(1-m__0)*eta__f(x, t);

m(x, t) = .5+.5*eta__f(x, t)

(5)

``

(* the degree of conversion *)
diff(eta__f(x,t),t) = k__f(T(x, t))*(1-eta__f(x, t))*rho__g(x, t)*a__ox(x, t);

diff(eta__f(x, t), t) = k__f(T(x, t))*(1-eta__f(x, t))*rho__g(x, t)*a__ox(x, t)

(6)

``

(* pre-exponential factor *)
k__f(T(x,t)) = k__f0*exp(-E__f0/(R__0*T(x, t)));

k__f(T(x, t)) = 10000000000*exp(-10071.50770/T(x, t))

(7)

``

(* the effective thermal conductivity coefficient *)
lambda(x,t) = lambda__f0*(1-m(x, t))+lambda__g0*m(x,t);

lambda(x, t) = 0.6e-2-0.1e-3*m(x, t)

(8)

``

(* equation of state *)
P__0=rho__g(x,t)*(a__ox(x,t)/mu__ox0+a__in(x,t)/mu__in0+a__p(x,t)/mu__p0)*R__0*T(x, t);

101325 = 1.9858*rho__g(x, t)*(0.3125000000e-1*a__ox(x, t)+0.3571428571e-1*a__in(x, t)+0.3571428571e-1*a__p(x, t))*T(x, t)

(9)

``

(* balanced relation for all components - oxidant product, inert *)
a__ox(x,t)+a__in(x,t)+a__p(x,t) = 1.0;

a__ox(x, t)+a__in(x, t)+a__p(x, t) = 1.0

(10)

``

(* Conditions at the boundaries and initial conditions *)

IBC :={
 
 a__in(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*D[1](a__in)(0, t) = U__g0*rho__g0*a__in0,
 a__ox(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*D[1](a__ox)(0, t) = U__g0*rho__g0*a__ox0,
 a__p(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*(D[1](a__p))(0, t) = U__g0*rho__g0*a__p0,
 U__g(0, t)*c__g(0, t)*rho__g(0, t)*T(0, t)-lambda(0, t)*D[1](T)(0, t) = U__g0*c__g0*rho__g0*T__g0,
 D[1](T)(L__0, t) = 0, D[1](a__in)(L__0, t) = 0, D[1](a__ox)(L__0, t) = 0, D[1](a__p)(L__0, t) = 0,

 a__in(x, 0) = a__in0,
 a__ox(x, 0) = a__ox0,
 a__p(x, 0) = a__p0,
 eta__f(x, 0) = 0.0,
 T__f(x, 0) = T__f0

};

{a__in(0, t)*rho__g(0, t)*U__g(0, t)-.1*m(0, t)*rho__g(0, t)*(D[1](a__in))(0, t) = 0.180750e-3, a__ox(0, t)*rho__g(0, t)*U__g(0, t)-.1*m(0, t)*rho__g(0, t)*(D[1](a__ox))(0, t) = 0.60250e-4, a__p(0, t)*rho__g(0, t)*U__g(0, t)-.1*m(0, t)*rho__g(0, t)*(D[1](a__p))(0, t) = 0., U__g(0, t)*c__g(0, t)*rho__g(0, t)*T(0, t)-lambda(0, t)*(D[1](T))(0, t) = 0.1695579600e-1, T__f(x, 0) = 293.15, a__in(x, 0) = .75, a__ox(x, 0) = .25, a__p(x, 0) = 0., eta__f(x, 0) = 0., (D[1](T))(100.0, t) = 0, (D[1](a__in))(100.0, t) = 0, (D[1](a__ox))(100.0, t) = 0, (D[1](a__p))(100.0, t) = 0}

(11)

``



Download Model03.mw

 
 
 

@tomleslie 

thank

@tomleslie 

To do so, but am not sure what is right out.
I enclose a result.

In a study of filtration combustion need to write the boundary condition on the incoming oxidant left.
From left to set the balance of oxidant: "The oxidizing agent incoming hot stream 'minus' The oxidant withdrawn from the left boundary by diffusion (diffusion coefficient D0) 'equals' The value of the constant"

 

I write this:

 

 

 

Maple writes as follows:

 

Maple writes correctly?

 

Search online and Help, how to solve a system of partial differential equations. Simple options are described. Please tell me whether there are examples of solving the problem, similar to my problem?

the boundary conditions

``

test := {a__in(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*(D[1](a__in))(0, t) = U__g0*rho[g0]*a__in0, a__ox(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*(D[1](a__ox))(0, t) = U__g0*rho[g0]*a__ox0, a__p(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*(D[1](a__p))(0, t) = U__g0*rho[g0]*a__p0, U__g(0, t)*c__g(0, t)*rho__g(0, t)*T(0, t)-lambda(0, t)*(D[1](T))(0, t) = U__g0*c__g0*rho[g0]*T__g0, a__in(x, 0) = a__in0, a__ox(x, 0) = a__ox0, a__p(x, 0) = a__p0, eta__f(x, 0) = 0, T[f](x, 0) = T[f0], (D[1](T))(L, t) = 0, (D[1](a__in))(L, t) = 0, (D[1](a__ox))(L, t) = 0, (D[1](a__p))(L, t) = 0};

{a__in(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*(D[1](a__in))(0, t) = U__g0*rho[g0]*a__in0, a__ox(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*(D[1](a__ox))(0, t) = U__g0*rho[g0]*a__ox0, a__p(0, t)*rho__g(0, t)*U__g(0, t)-m(0, t)*D__0*rho__g(0, t)*(D[1](a__p))(0, t) = U__g0*rho[g0]*a__p0, U__g(0, t)*c__g(0, t)*rho__g(0, t)*T(0, t)-lambda(0, t)*(D[1](T))(0, t) = U__g0*c__g0*rho[g0]*T__g0, a__in(x, 0) = a__in0, a__ox(x, 0) = a__ox0, a__p(x, 0) = a__p0, eta__f(x, 0) = 0, T[f](x, 0) = T[f0], (D[1](T))(L, t) = 0, (D[1](a__in))(L, t) = 0, (D[1](a__ox))(L, t) = 0, (D[1](a__p))(L, t) = 0}

(1)

``

``



Download Model01-test.mw

@Rouben Rostamian  

 thanks for the answer.
The initial and boundary conditions at the end of the document. IBS:=...

restart; with(PDEtools)

m__0,alpha__0,S__0,V__0,T__env0,T[g0],T[f0],Q__f0,lambda__f0,lambda__g0,k__f0,E__f0,R__0,P__0,D__0,mu__p,nu__p,mu__ox,nu__ox,U[g0],c[g0],rho[g0],a__ox0,a__in0,a__p0,L=const;

m__0, alpha__0, S__0, V__0, T__env0, T[g0], T[f0], Q__f0, lambda__f0, lambda__g0, k__f0, E__f0, R__0, P__0, D__0, mu__p, nu__p, mu__ox, nu__ox, U[g0], c[g0], rho[g0], a__ox0, a__in0, a__p0, L = const

(1)

U__g0 := .2;

.2

 

.24

 

0.1205e-2

 

293.15

 

.25

 

.75

 

0.

 

293.15

(2)

Cоздания системы уравнений для фильтрационного превращения

"`rho__g`(x,t):=0.5:  "

proc (x, t) options operator, arrow; .5 end proc

(3)

EquHeat := (1-m(x, t))*c__f(x, t)*`&rho;__f`(x, t)*(diff(T(x, t), t))+c__g(x, t)*`&rho;__g`(x, t)*U(x, t)*(diff(T(x, t), x)) = lambda(x, t)*(diff(T(x, t), x, x))-`&alpha;__0`*S__0*(T(x, y)-T__env0)/V__0+Q__f0*(1-m(x, t))*`&rho;__f0`*k__f(T(x, t))*(1-`&eta;__f`(x, t))*`&rho;__g`(x, t)*a__ox(x, t)

EquContinuity__ox := diff(m(x, t)*`&rho;__g`(x, t)*a__ox(x, t), t) = diff(m(x, t)*D__0*`&rho;__g`(x, t)*(diff(a__ox(x, t), x)), x)-(diff(U(x, t)*`&rho;__g`(x, t)*a__ox(x, t), x))-(1-m(x, t))*`&rho;__f0`*k__f(T(x, t))*(1-`&eta;__f`(x, t))*`&rho;__g`(x, t)*a__ox(x, t)

EquContinuity__p := diff(m(x, t)*`&rho;__g`(x, t)*a__p(x, t), t) = diff(m(x, t)*D__0*`&rho;__g`(x, t)*(diff(a__p(x, t), x)), x)-(diff(U(x, t)*`&rho;__g`(x, t)*a__p(x, t), x))+`&mu;__p`*`&nu;__p`*(1-m(x, t))*`&rho;__f0`*k__f(T(x, t))*(1-`&eta;__f`(x, t))*`&rho;__g`(x, t)*a__ox(x, t)/(`&mu;__ox`*`&nu;__ox`)

simplify(EquContinuity__p)

m(x, t) = m__0+(1-m__0)*`&eta;__f`(x, t)

m(x, t) = m__0+(1-m__0)*eta__f(x, t)

(4)

diff(`&eta;__f`(x, t), t) = k__f(T(x, t))*(1-`&eta;__f`(x, t))*`&rho;__g`(x, t)*a__ox(x, t)

k__f(T(x, t)) = k__f0*exp(-E__f0/(R__0*T(x, t)))

lambda(x, t) = `&lambda;__f0`*(1-m(x, t))+`&lambda;__g`*m(x, t)

P__0 = `&rho;__g`(x, t)*(a__ox/`&mu;__ox`+a__in/`&mu;__ox`+a__p/`&mu;__ox`)*R__0*T(x, t)

a__ox+a__in+a__p = 1; -`&bcy;&acy;&lcy;&acy;&ncy;&scy;&ncy;&ocy;&iecy;`*`&scy;&ocy;&ocy;&tcy;&ncy;&ocy;&shcy;&iecy;&ncy;&icy;&iecy;`*`&dcy;&lcy;&yacy;`*`&vcy;&scy;&iecy;&khcy;`*`&kcy;&ocy;&mcy;&pcy;&ocy;&ncy;&iecy;&ncy;&tcy;`

a__ox+a__in+a__p = 1

(5)

IBC := {a__in(0, t)*`&rho;__g`(0, t)*U__g(0, t)-m(0, t)*D__0*`&rho;__g`(0, t)*(diff(a__in(0, t), x)) = U__g0*rho[g0]*a__in0, a__ox(0, t)*`&rho;__g`(0, t)*U__g(0, t)-m(0, t)*D__0*`&rho;__g`(0, t)*(diff(a__ox(0, t), x)) = U__g0*rho[g0]*a__ox0, a__p(0, t)*`&rho;__g`(0, t)*U__g(0, t)-m(0, t)*D__0*`&rho;__g`(0, t)*(diff(a__p(0, t), x)) = U__g0*rho[g0]*a__p0, U__g(0, t)*c__g(0, t)*`&rho;__g`(0, t)*T(0, t)-lambda(0, t)*(diff(T(0, t), x)) = U__g0*c__g0*rho[g0]*T__g0, a__in(x, 0) = a__in0, a__ox(x, 0) = a__ox0, a__p(x, 0) = a__p0, diff(T(L, t), x) = 0, diff(a__in(L, t), x) = 0, diff(a__ox(L, t), x) = 0, diff(a__p(L, t), x) = 0, `&eta;__f`(x, 0) = 0, T[f](x, 0) = T[f0]}

{0 = 0, a__in(0, t)*rho__g(0, t)*U__g(0, t) = 0.180750e-3, a__ox(0, t)*rho__g(0, t)*U__g(0, t) = 0.60250e-4, a__p(0, t)*rho__g(0, t)*U__g(0, t) = 0., U__g(0, t)*c__g(0, t)*rho__g(0, t)*(table( [( f0 ) = 293.15 ] ))(0, t) = 0.1695579600e-1, a__in(x, 0) = .75, a__ox(x, 0) = .25, a__p(x, 0) = 0., eta__f(x, 0) = 0, T[f](x, 0) = 293.15}

(6)

NULL



Download Model01.mw

Page 1 of 1