Information about meshgrid in pdetool. How can I define specific mesh?

8 Ansichten (letzte 30 Tage)
Hello, I am developing a project to study a heat transfer in a plate. I am using pdetool to solve the EDP.
I would like to know a little bit more about the mesh...
Now, I have this mesh:
But I would like the mesh like squares:
Is it possible?
Cheers

Antworten (2)

Ravi Kumar
Ravi Kumar am 3 Nov. 2017
Hi Yogan,
PDE Toolbox does not support quadrilateral elements as shown in your second picture. If your purpose is the find the solution on a rectangular grid, then you can first solve using the PDE Toolbox triangular mesh and then interpolate the solution onto a rectangular grid. Refer to the documentation following documentation page for examples:
https://www.mathworks.com/help/pde/ug/pde.steadystatethermalresults.interpolatetemperature.html
Also, I would suggest use the programmatic approach as shown in the documentation not the PDE App.

Precise Simulation
Precise Simulation am 4 Nov. 2017
If you prefer to set up and solve heat transfer plate and other PDE problems with a structured quadrilateral mesh, it is possible to use the rectgrid function included in the finite element FEA toolbox . The following code shows a small example of defining and solving heat conduction in a rectangular 2D domain with structured quadrilateral mesh cells (alternatively, you can use the GUI at first, and then save you model as an editable m-file script file to see how the FEA script modeling and definition works):
% Define geometry and grid.
nx = 20;
ny = 5;
dim = [ 0, 4; 0, 1 ];
fea.grid = rectgrid( nx, ny, dim );
fea.sdim = { 'x' 'y' };
% Add heattransfer multiphysics mode.
fea = addphys( fea, @heattransfer );
rho = 1;
k = '1e-3*(1 + x)';
cp = 'cos(x)';
fea.phys.ht.eqn.coef{1,end} = { rho };
fea.phys.ht.eqn.coef{2,end} = { cp };
fea.phys.ht.eqn.coef{3,end} = { k };
% Use temperature boundary conditions (1)
% on the left (4) and right (2) edges.
fea.phys.ht.bdr.sel([2 4]) = 1;
Tl = 300;
Tr = 450;
fea.phys.ht.bdr.coef{1,end}{2} = Tr;
fea.phys.ht.bdr.coef{1,end}{4} = Tl;
% Check, parse, and solve stationary problem.
fea = parsephys( fea );
fea = parseprob( fea );
fea.sol.u = solvestat( fea );
% Plot grid and solution.
postplot( fea, 'surfexpr', 'T', 'linestyle', '-' )

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by