Visualize PDE Results
Create and explore visualizations of PDE results in the Live Editor
Description
The Visualize PDE Results task enables you to plot and inspect results of structural, thermal, electromagnetic, or general PDE analysis using interactive controls. The task automatically generates MATLAB® code for your live script.
Using this task, you can:
Select which solution data to display.
Quickly access plots for different frequencies, modes, time steps, and phases.
Show animated solutions.
Add a mesh to a solution plot.
Adjust color limits for a colormap.
Adjust surface transparency.
For general information about Live Editor tasks, see Add Interactive Tasks to a Live Script.
Open the Task
To add the Visualize PDE Results task to a live script in the MATLAB Editor:
On the Live Editor tab, select Task > Visualize PDE Results.
In a code block in the script, type a relevant keyword, such as
pde
. Select Visualize PDE Results from the suggested command completions.
Examples
Related Examples
Parameters
Select results
— Results to plot
structural results | thermal results | electromagnetic results | general PDE results
Choose the results to plot from the structural, thermal, electromagnetic, and general PDE results available in the MATLAB workspace. You can select only one solution at a time. The solution must be specified as one of these objects:
StaticStructuralResults
,TransientStructuralResults
,ModalStructuralResults
, orFrequencyStructuralResults
for a structural modelSteadyStateThermalResults
,TransientThermalResults
, orModalThermalResults
for a thermal modelElectrostaticResults
,MagnetostaticResults
,HarmonicResults
, orConductionResults
for an electromagnetic modelStationaryResults
,TimeDependentResults
, orEigenResults
for a general PDE model
Type
— Part of solution to plot
Displacement
| Temperature
| Electric field
| ...
Choose the part of the solution to plot, such as a displacement for a structural problem, temperature for a thermal problem, or electric field for an electrostatic problem.
Component
— Components to plot
Magnitude
(default) | X
| Y
| Z
| ...
Choose to plot the x-, y-, or z-component of a solution such as displacement, stress, temperature gradient, electric field, or magnetic field.
Mode
— Mode to plot
first mode (default) | number
Choose the number corresponding to the solution mode to plot.
Frequency
— Solution frequency to plot
lowest frequency (default) | number
Choose the number corresponding to the solution frequency to plot.
Decay rate
— Eigenvalue of thermal model
first eigenvalue (default) | number
Choose the number corresponding to the eigenvalue of a thermal model.
Equation
— Equation to plot
1 (default) | positive integer
Choose the number corresponding to the equation to plot.
Eigenvalue
— Eigenvalue of general PDE model
first eigenvalue (default) | number
Choose the number corresponding to the eigenvalue of a PDE model.
Time
— Time to plot results for
solution times
Choose the time to plot results for. The slider values correspond to the times that you used when solving the problem.
Phase
— Phase to plot results for
values are from 0 to 2π
Choose the phase to plot results for. The slider values are from 0 to 2π.
Animate
— Animate plot
off (default) | on
Select this option to play the animation.
Axes
— Show coordinate axes
on (default) | off
Select this option to show the coordinate axes.
Colorbar
— Show color bar
on (default) | off
Select this option to show the color bar.
Mesh
— Show mesh
off (default) | on
Select this option to show the mesh.
Title
— Show plot title
off (default) | on
Select this option to show an autogenerated plot title.
Deformation
— Deformed or undeformed shape for structural analysis models
on (default) | off
Switch between deformed and undeformed shapes for a 3-D structural model. In an undeformed shape, center nodes in quadratic meshes are always added at the halfway point between corners. When you plot a deformed shape, the center nodes can move away from the edge centers.
Color limits
— Set colormap limits
numbers
Set the colormap limits. The default mapping is useful in most cases, but you can perform the mapping over any range you choose, even if the range you choose is different than the range of your data. Choosing a different mapping range allows you to:
See where your data is at or beyond the limits of that range.
See where your data lies within that range.
For details, see Control Colormap Limits.
Transparency
— Surface transparency
None
| transparency in the range from None
to
High
Adjust the surface transparency by moving the slider between
None
, Medium
, and High
.
Version History
Introduced in R2022b