8000 intertial terms of trinagle plate element by jorgepz · Pull Request #803 · ONSAS/ONSAS · GitHub
[go: up one dir, main page]

Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
38 changes: 35 additions & 3 deletions examples/cantileverPlate/cantileverPlate.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
nu = 0.0;
Ly = .5;
Lx = 1;
tz = .05;
tz = .02;
I = Ly * tz^3 / 12;
%
qx = 100; % kN/m2
Expand Down Expand Up @@ -64,7 +64,7 @@
boundaryConds(1).imposDispVals = [0 0 0 0 0 0];
%
boundaryConds(2).loadsCoordSys = 'global';
boundaryConds(2).loadsTimeFact = @(t) t;
boundaryConds(2).loadsTimeFact = @(t) 1;
boundaryConds(2).loadsBaseVals = [qx 0 0 0 -qz 0];
%
% md
Expand Down Expand Up @@ -108,12 +108,44 @@
nelem = size(modelProperties.Conec, 1);
matSolic = getInternalForces(modelSolutions{end}.localInternalForces, 1:nelem, {'Mx', 'My', 'Mxy'});
numer_maxMx_plate = max(max(matSolic));
numer_wmax_plate = min(matUs(5:6:end));

[numer_wmax_plate, idx] = min(matUs(5:6:end,2));
% md
analy_maxMx = Fz * Lx / Ly;
analy_wmax = -Fz * Lx^3 / (3 * E * I);
analy_dxmax = qx * Lx / E;
%


materials(1).density = 8e3 ;

boundaryConds(2).loadsTimeFact = @(t) 1;
boundaryConds(2).loadsBaseVals = [qx 0 0 0 -qz 0];

analysisSettings.methodName = 'newmark';
analysisSettings.deltaT = 0.5;
analysisSettings.finalTime = 100;
analysisSettings.stopTolDeltau = 1e-8;
analysisSettings.stopTolForces = 1e-8;
analysisSettings.stopTolIts = 10;


otherParams.nodalDispDamping = 1e-0;


[modelInitSol, modelProperties, BCsData] = initONSAS(materials, elements, boundaryConds, initialConds, mesh, analysisSettings, otherParams);

% mdAfter that the structs are used to perform the numerical time analysis
[matUs, loadFactorsMat, modelSolutions] = solveONSAS(modelInitSol, modelProperties, BCsData);
idx
desp_dinam = matUs(5:6:end,:)(idx,:);

plot(0:analysisSettings.deltaT:analysisSettings.finalTime, desp_dinam)


stop


% ====================================================
% triangle CST element
% ====================================================
Expand Down
4 changes: 4 additions & 0 deletions src/core/assembler.m
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@
Finte = fs{1};
Ke = ks{1};

if dynamicProblemBool
[Fmase, Mmase] = inertialTriangleForces(elemNodesxyzRefCoords, thickness, density, dotdotdispsElem);
end

elseif strcmp(elemType, 'triangle-shell')

thickness = elemCrossSecParams{2};
Expand Down
32 changes: 32 additions & 0 deletions src/elements/triangle/inertialTriangleForces.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
% Copyright 2025, ONSAS Authors (see documentation)
%
% This file is part of ONSAS.
%
% ONSAS is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% ONSAS is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with ONSAS. If not, see <https://www.gnu.org/licenses/>.
%
% md Function for computation of nodal forces and tangent stiffness matrix for 2D 3 nodes triangle element with elastic-linear and linear isotropic hardening with von Mises flow rule models. The dofs are assumed to be on x-y.
% md
function [Fmase, Mmase ] = inertialTriangleForces(elemCoords, thickness, density, dotdotdispsElem)

x = elemCoords(1:3:end)';
y = elemCoords(2:3:end)';

A = 0.5 * det([ones(1, 3); x'; y']); % element area

assert(A >= 0, 'Element with negative area, check connectivity.');

% md### compute inertial loads and mass matrix
Mmase = sparse(9,9);
Mmase([1 4 7],[1 4 7]) = density * A / 3.0 * speye(3, 3);
Fmase = Mmase * dotdotdispsElem;
Loading
0