Hi Daniel,
As I don’t have access to your code, I can’t pinpoint the exact problem you're facing, but we can proceed with an example.
- You create a rectangular geometry with length \(L = 1\) meter and width \(W = 0.5\) meter.
gdm = [3, 4, 0, L, L, 0, 0, 0, W, W]';
g = decsg(gdm, 'R1', ('R1')');
- You create a structural model for static plane stress analysis.
model = createpde('structural', 'static-planestress');
- The geometry is included in the structural model.
geometryFromEdges(model, g);
- This step visualizes the geometry with edge labels for reference.
pdegplot(model, 'EdgeLabels', 'on');
title('Geometry with Edge Labels');
- You specify the material properties (Young's modulus and Poisson's ratio) for the rectangular plate.
structuralProperties(model, 'YoungsModulus', E, 'PoissonsRatio', nu);
- The edges are fixed to prevent rigid body motion and to ensure the model is properly constrained.
Edge 1 (Bottom Edge): Fully fixed (both x and y displacements are zero).
Edge 4 (Left Edge): Fixed in the x direction to prevent horizontal movement.
structuralBC(model, 'Edge', 1, 'Constraint', 'fixed');
structuralBC(model, 'Edge', 4, 'XDisplacement', 0);
- You apply a uniform pressure load to the top and right edges.
structuralBoundaryLoad(model, 'Edge', [2, 3], 'SurfaceTraction', [0; -pressure]);
- A mesh with a specified maximum element size is generated.
generateMesh(model, 'Hmax', 0.05);
- This step visualizes the generated mesh.
- The structural model is solved.
- The displacement magnitude and Von Mises stress are plotted to visualize the results, including deformation.
pdeplot(model, 'XYData', result.Displacement.Magnitude, 'Deformation', result.Displacement, 'DeformationScaleFactor', 1);
title('Displacement Magnitude with Deformation');
pdeplot(model, 'XYData', result.VonMisesStress, 'Deformation', result.Displacement, 'DeformationScaleFactor', 1);
title('Von Mises Stress with Deformation');
I hope this helps you get a clearer picture!
Thanks,
Karan