Plotting z = f(x, y) when (x, y, z) values are known

2 views (last 30 days)
For an FEM question, I have meshed a plate with a circular hole, as shown below. I determined the temperature values at specific node locations and am trying to plot them on the surface. However, when I use the griddata function to interpolate the values in between, it also fills the hole area. Is there a way to create a surface plot without filling the hole?

Accepted Answer

Walter Roberson
Walter Roberson on 29 Nov 2024
Use https://www.mathworks.com/help/pde/ug/decsg.html to create a decomposed geometry.
Calculate the temperature values on the resulting mesh.
Use pdeplot to plot the 2D geometry, specifying the temperature values as XYData https://www.mathworks.com/help/pde/ug/pdeplot.html#btmrraf-XYData
  2 Comments
Mukul
Mukul on 29 Nov 2024
Edited: Mukul on 29 Nov 2024
It worked! I used the mesh data in place of results.Mesh and temperature values as XYData. Thank you!
Is there a way to interoplate data in between points and also plot tempearture gradients and/or heat flux for apart from refining the mesh?
Walter Roberson
Walter Roberson on 29 Nov 2024
I suspect that for pdeplot() the data needs to align with the mesh nodes.

Sign in to comment.

More Answers (0)

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!