Solving 2nd Order DEs in MATLAB

1 view (last 30 days)
Joshua Davies
Joshua Davies on 1 Nov 2019
Answered: Cris LaPierre on 2 Nov 2019
Currently trying to develop a model to show the temperature profile of a fixed bed reactor. I have developed the 3 equations (1 for each 'zone') I require in order to do this as a graph/plot.
However, I am having an issue with getting MATLAB to let me define a set of equations and then define variables in those equations to specific values or other equations to solve for.
Been previously trying to use the modelPDE command but had little luck with defining the variables. Also tried using syms buit if kept giving me errors on variables not being defined and I couldn't see how to do that without getting the same error back at me.
These are the equations in question, with each defining a specific area of the overall curve.
eqns.PNG
What I trying to get is a model or similar that I can give values for (such as N or B) or give a variable an equation as a value. I.e. Theta1 = C1+C2*e^(Bz).
In short I have the mathmatical equations I need its just trying to figure out MATLAB to let me solve them and plot the answer.
Any guidance on this would be appreciated.

Answers (1)

Cris LaPierre
Cris LaPierre on 2 Nov 2019
See this example in the documentation.
If you don't want to do all the rearranging yourself and have access to the Symbolic Math toolbox, consider following this example.

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!