FEM post processing: How to plot strain field in MATLAB
Afficher commentaires plus anciens
So I have the strain values (i.e. strain in x, in y and in xy), from an FEM analysis data in ABAQUS, at the integration point of each element. I'd like to plot a strain field in MATLAB; does anyone know how to do this? All I know is how to interpolate the strain values to each node that make up the element; but then how do I find the strain values at other coordinates?
Réponses (2)
Wan Ji
le 20 Août 2021
Since the strain values to each node can be obtained by interpolate method with the values of the integration point of each element. Why not use scatteredInterpolant function to do all the work? For example:
node = [-1,-1; 1,-1; 1,1; -1,1];
element = [1,2,3,4];
gaussPoints = [-1,-1; 1,-1; 1,1; -1,1]*sqrt(3)/3;
gaussPointsStrain = [1e-4; 2e-4; 5e-4; 3e-4]; % only one strin component offered here
Fstrain = scatteredInterpolant(gaussPoints(:,1), gaussPoints(:,2), gaussPointsStrain, 'linear');
nodeStrain = Fstrain(node(:,1), node(:,2));
patch('vertices', node, 'faces', element, 'facevertexcdata', nodeStrain, 'facecolor', 'interp');
colormap(jet); colorbar;
colormap of node strainIf you want strain in side of the element, point (x,y) for example, you can use
strain_at_special_location = Fstrain(x,y);
tasneem
le 6 Avr 2024
0 votes
Edof = [1 1 2 5 6;
2 5 6 9 10;
3 9 10 13 14;
4 13 14 15 16;
5 15 16 17 18;
6 17 18 11 12;
7 11 12 7 8;
8 3 4 7 8;
9 14 13 17 18;
10 9 10 17 18;
11 9 10 11 12;
12 5 6 12 12;
13 5 6 7 8;
14 1 2 7 8];
P = 20 * 10^3;
E = 2.1 * 10^5 * 10^6;
A_HEA = 2124 * 10^-6;
K = zeros(18);
f = zeros(18, 1);
f(5) = -P;
ep = [E A_HEA];
Ex = [0 1.5;
0 1.5;
1.5 3;
3 4.5;
0 1.5;
1.5 3;
3 4.5;
4.5 6;
4.5 6;
4.5 4.5;
3 4.5;
1.5 3;
1.5 1.5;
0 1.5];
Ey = [1.5 1.5;
1.5 1.5;
1.5 1.5;
1.5 0;
0 0;
0 0;
0 0;
0 0;
0 1.5;
0 1.5;
0 1.5;
0 1.5;
0 1.5;
0 1.5];
% Loop for Assembling Element Matrices
for i = 1:14
Ke=bar2e(Ex(i,:),Ey(i,:),ep);
K = assem(Edof(i,:), K, Ke);
end
% Boundary Conditions
bc = [1 0;
2 0;
3 0;
4 0];
% Solve the System of Equations
[~, ~] = solveq(K, f, bc);
Edof = [1 1 2 5 6;
2 5 6 9 10;
3 9 10 13 14;
4 13 14 15 16;
5 15 16 17 18;
6 17 18 11 12;
7 11 12 7 8;
8 3 4 7 8;
9 14 13 17 18;
10 9 10 17 18;
11 9 10 11 12;
12 5 6 12 12;
13 5 6 7 8;
14 1 2 7 8];
P = 20 * 10^3;
l = 1.5;
E = 2.1 * 10^5 * 10^6;
A_RHS = 1530 * 10^-6;
K = zeros(18);
f = zeros(18, 1);
f(5) = -P;
ep = [E A_HEA];
Ex = [0 1.5;
0 1.5;
1.5 3;
3 4.5;
0 1.5;
1.5 3;
3 4.5;
4.5 6;
4.5 6;
4.5 4.5;
3 4.5;
1.5 3;
1.5 1.5;
0 1.5];
Ey = [1.5 1.5;
1.5 1.5;
1.5 1.5;
1.5 0;
0 0;
0 0;
0 0;
0 0;
0 1.5;
0 1.5;
0 1.5;
0 1.5;
0 1.5;
0 1.5];
% Loop for Assembling Element Matrices
for i = 1:14
Ke=bar2e(Ex(i,:),Ey(i,:),ep);
K = assem(Edof(i,:), K, Ke);
end
% Boundary Conditions
bc = [1 0;
2 0;
3 0;
4 0];
% Solve the System of Equations
[a, r] = solveq(K, f, bc);
Catégories
En savoir plus sur Stress and Strain dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!