Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Solving differential equations (Diffusion and Reaction) using the Mathematics Physics
Posted 25 nov 2015, 08:57 GMT-5 Chemical Reaction Engineering, Modeling Tools & Definitions, Parameters, Variables, & Functions, Studies & Solvers Version 5.1 3 Replies
Please login with a confirmed email address before reporting spam
Hi all
I'm trying to learn a bit of mathematical modeling of chemical reactions whilst combining it with the Mathematics physics of COMSOL. I am however, in a bit of trouble and I hope you can help me out with a few problems.
Problem 1) - Example 8.4
I have the following second order differential equation with the boundary conditions:
d^2y/dx^2-phi^2*y=0
x=0, dy/dx=0
x=1, y=1
This yields the analytical solution: y=cosh(phi*x)/cosh(phi).
My numerical solution is implemented using the General Form (PDE) in 1-D and writing the following as the source term with remaining parameters equal to zero:
f = -d^2y/dx^2+phi^2*y
with zero flux at x=0 and Dirichlet (y=1) at x=1.
The solutions are (I feel) pretty off, as the equations are relatively simple.
Problem 2) - Example 8.5
Equations are the same however, I now change the Dirichlet boundary condition to a Robin bc.
The bc is giving as:
x=1, dy/dx=Bi*(1-y), where y is evaluated a x=1
This produces the analytical solution:
y=cosh(phi*x)/(cosh(phi)+(phi/Bi)*sinh(phi))
I have tried implementing the Robin bc through the flux/source bc in COMSOL where g and q both are equal to Bi.
My numerical solution is off and doesn't seem to change with changing the parameter Bi.
Any help would be greatly appreciated. Models are attached as example 8.4 for problem 1 and example 8.5 for problem 2.
Best regards
Mikael
I'm trying to learn a bit of mathematical modeling of chemical reactions whilst combining it with the Mathematics physics of COMSOL. I am however, in a bit of trouble and I hope you can help me out with a few problems.
Problem 1) - Example 8.4
I have the following second order differential equation with the boundary conditions:
d^2y/dx^2-phi^2*y=0
x=0, dy/dx=0
x=1, y=1
This yields the analytical solution: y=cosh(phi*x)/cosh(phi).
My numerical solution is implemented using the General Form (PDE) in 1-D and writing the following as the source term with remaining parameters equal to zero:
f = -d^2y/dx^2+phi^2*y
with zero flux at x=0 and Dirichlet (y=1) at x=1.
The solutions are (I feel) pretty off, as the equations are relatively simple.
Problem 2) - Example 8.5
Equations are the same however, I now change the Dirichlet boundary condition to a Robin bc.
The bc is giving as:
x=1, dy/dx=Bi*(1-y), where y is evaluated a x=1
This produces the analytical solution:
y=cosh(phi*x)/(cosh(phi)+(phi/Bi)*sinh(phi))
I have tried implementing the Robin bc through the flux/source bc in COMSOL where g and q both are equal to Bi.
My numerical solution is off and doesn't seem to change with changing the parameter Bi.
Any help would be greatly appreciated. Models are attached as example 8.4 for problem 1 and example 8.5 for problem 2.
Best regards
Mikael
Attachments:
3 Replies Last Post 26 nov 2015, 10:27 GMT-5