Set Up and Solve Your PDE Problem - MATLAB & Simulink
Set Up and Solve Your PDE Problem - MATLAB & Simulink
1/3
accuracy of the solution to elliptic PDE problems is to use the adaptive solver, which refines the mesh in
the areas where the estimated error of the solution is largest. See the adaptmeshreference page for an
example of how the adaptive solver can solve a Laplace equation with an accuracy that requires more
than 10 times as many triangles when regular refinement is used.
7. Specify the PDE from the PDE Specification dialog box. You can access that dialog box using the PDE
button or the PDE Specification menu item from the PDE menu.
Note: This step can be performed at any time prior to solving the PDE since it is independent of
the CSG model and the boundaries. If the PDE coefficients are material dependent, they are
entered in the PDE mode by double-clicking the different subdomains.
8. Solve the PDE by clicking the = button or by selecting Solve PDE from the Solve menu. If you do not
want an automatic plot of the solution, or if you want to change the way the solution is presented, you
can do that from the Plot Selection dialog box prior to solving the PDE. You open the Plot Selection
dialog box by clicking the button with the 3-D solution plot icon or by selecting the Parameters menu
item from the Plot menu.
9. Now, from here you can choose one of several alternatives:
Export the solution and/or the mesh to the MATLAB main workspace for further analysis.
Visualize other properties of the solution.
Change the PDE and recompute the solution.
Change the mesh and recompute the solution. If you select Initialize Mesh, the mesh is initialized;
if you select Refine Mesh, the current mesh is refined. From the Mesh menu, you can also jiggle
the mesh and undo previous mesh changes.
Change the boundary conditions. To return to the mode where you can select boundaries, use the
button or the Boundary Mode option from the Boundary menu.
Change the CSG model. You can reenter the draw mode by selecting Draw Mode from the Draw
menu or by clicking one of the Draw Mode icons to add another solid object. Back in the draw
mode, you are able to add, change, or delete solid objects and also to alter the set formula.
In addition to the recommended path of actions, there are a number of shortcuts, which allow you to skip over
one or more steps. In general, the PDE app adds the necessary steps automatically.
http://www.mathworks.com/help/pde/ug/approach-for-defining-and-solving-your-pde-problem.html
2/3
If you have not yet defined a CSG model, and leave the draw mode with an empty model, the PDE app
creates an L-shaped geometry with the default boundary condition and then proceeds to the action called
for, performing all the steps necessary.
If you are in draw mode and click the button to initialize the mesh, the PDE app first decomposes the
geometry using the current set formula and assigns the default boundary condition to the outer
boundaries. After that, an initial mesh is created.
If you click the refine button to refine the mesh before the mesh has been initialized, the PDE app first
initializes the mesh (and decomposes the geometry, if you were still in the draw mode).
If you click the = button to solve the PDE and you have not yet created a mesh, the PDE app initializes a
mesh before solving the PDE.
If you select a plot type and choose to plot the solution, the PDE app checks to see if there is a solution
to the current PDE available. If not, the PDE app first solves the current PDE. The solution is then
displayed using the selected plot options.
If you have not defined your PDE, the PDE app solves the default PDE, which is Poisson's equation:
u = 10.
(This corresponds to the generic elliptic PDE with c = 1, a = 0, and f = 10.) For the different application
modes, different default PDE settings apply.
http://www.mathworks.com/help/pde/ug/approach-for-defining-and-solving-your-pde-problem.html
3/3