How do I use the Partial Differential Equation (PDE) Toolbox to input two non-linear coupled PDEs?

1 view (last 30 days)
I would like to input them using the GUI.
In the GUI, I enter an expression such as 'u' or 'u+v' into the slots for 'cij' in the PDE menu. When I click '=' I get the following error message :
???Error using ==> pdetexpd
Expression evaluates to wrong size
In expression u when evaluating pde coefficients

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
When using u, ux, and uy as PDE coefficients, they are evaluated as row vectors representing values at the triangle centers of mass. There is one row per dependent variable (i.e., number of PDEs). The solution to the 1st PDE is referenced as u(1,:) and the solution to the 2nd PDE is referenced as u(2,:), etc. You should be able to use the GUI in Generic System application mode to solve two coupled, nonlinear PDEs.
NOTE: If you want to enter an initial solution in the Solve Parameters dialog, enter a vector of correct size. For example, if your first unknown u1 varies in the x-direction i(.e., u(1,:)=x) and the second unknown u2 is constant (i.e., u(2,:)=100), then enter the following in the slot for the initial solution.
x;100*ones(length(x),1)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!