-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain_transientPlateInMembraneAction.m
More file actions
167 lines (135 loc) · 5.55 KB
/
Copy pathmain_transientPlateInMembraneAction.m
File metadata and controls
167 lines (135 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
%% Licensing
%
% License: BSD License
% cane Multiphysics default license: cane/license.txt
%
% Main authors: Andreas Apostolatos
%
%% Script documentation
%
% Task : Geometrically nonlinear transient plane stress analysis
%
% Date : 19.02.2014
%
%% Preamble
% Clear memory
clear;
% Clear the command window
clc;
% Close all generated windows
close all;
%% Includes
% Add general math functions
addpath('../../generalMath/');
% Add all functions related to parsing
addpath('../../parsers/');
% Add all functions related to the low order basis functions
addpath('../../basisFunctions/');
% Equation system solvers
addpath('../../equationSystemSolvers/');
% Equation system solvers
addpath('../../efficientComputation/');
% Include functions related to transient analysis
addpath('../../transientAnalysis/');
% Add all functions related to plate in membrane action analysis
addpath('../../FEMPlateInMembraneActionAnalysis/solvers/',...
'../../FEMPlateInMembraneActionAnalysis/solutionMatricesAndVectors/',...
'../../FEMPlateInMembraneActionAnalysis/loads/',...
'../../FEMPlateInMembraneActionAnalysis/graphics/',...
'../../FEMPlateInMembraneActionAnalysis/output/',...
'../../FEMPlateInMembraneActionAnalysis/initialConditions/',...
'../../FEMPlateInMembraneActionAnalysis/postprocessing/');
%% Parse data from GiD input file
% Define the path to the case
pathToCase = '../../inputGiD/FEMPlateInMembraneActionAnalysis/';
% caseName = 'curvedPlateTipShearPlaneStressTransient';
caseName = 'cantileverBeamPlaneStressTransientNLinear';
% caseName = 'turek_csd';
% Parse the data from the GiD input file
[strMsh, homDBC, inhomDBC, valuesInhomDBC, propNBC, propAnalysis, ...
parameters, propNLinearAnalysis, propStrDynamics, propGaussInt] = ...
parse_StructuralModelFromGid(pathToCase, caseName, 'outputEnabled');
% Define traction vector
propNBC.tractionLoadVct = [0; -1e1; 0];
%% UI
% On the computation of the body forces
computeBodyForces = @computeConstantVerticalStructureBodyForceVct;
% Equation system solver
solve_LinearSystem = @solve_LinearSystemMatlabBackslashSolver;
% Function handle to the computation of the initial conditions
computeInitCnds = @computeInitCndsFEMPlateInMembraneAction;
% Define the amplitude of the externally applied load and time duration
propNBC.tractionVector = [-1e-1; 0; 0];
propNBC.endTime = 1;
% Assign the function handles for the computation of the stiffness matrix
% and choose solver for the finite element system based on whether the
% analysis is linear or nonlinear
isLinear = true;
if ~isempty(propNLinearAnalysis)
if ~ischar(propNLinearAnalysis)
if isfield(propNLinearAnalysis, 'method')
if strcmp(propNLinearAnalysis.method, 'NEWTON_RAPHSON')
isLinear = false;
end
else
error('Structure propNLinearAnalysis should define member variable method')
end
end
end
if isLinear
% computeProblemMatricesSteadyState = @computeStiffMtxAndLoadVctFEMPlateInMembraneActionMixed;
computeProblemMatricesSteadyState = @computeStiffMtxAndLoadVctFEMPlateInMembraneActionCST;
solve_FEMSystem = @solve_FEMLinearSystem;
else
% computeProblemMatricesSteadyState = @computeTangentStiffMtxResVctFEMPlateInMembraneAction;
computeProblemMatricesSteadyState = @computeTangentStiffMtxResVctFEMPlateInMembraneActionCST;
solve_FEMSystem = @solve_FEMNLinearSystem;
end
% On the writing the output function
propVTK.isOutput = true;
propVTK.writeOutputToFile = @writeOutputFEMPlateInMembraneActionToVTK;
propVTK.VTKResultFile = 'undefined';
% On transient inhomogeneous Dirichlet boundary conditions
updateInhomDOFs = 'undefined';
propIDBC = [];
% Not a unit test case
isUnitTest = false;
% Choose the matric computation corresponding to the chosen time
% integration scheme
if strcmp(propStrDynamics.method,'EXPLICIT_EULER')
propStrDynamics.computeProblemMtrcsTransient = ...
@computeProblemMtrcsExplicitEuler;
propStrDynamics.computeUpdatedVct = ...
@computeBETITransientUpdatedVctAccelerationField;
elseif strcmp(propStrDynamics.method,'BOSSAK')
propStrDynamics.computeProblemMtrcsTransient = ...
@computeProblemMtrcsBossak;
propStrDynamics.computeUpdatedVct = ...
@computeBossakTransientUpdatedVctAccelerationField;
else
error('Invalid time integration method selected in propStrDynamics.method as %s',propStrDynamics.method);
end
% Choose time integration scheme parameters
if strcmp(propStrDynamics.method,'BOSSAK')
propStrDynamics.alphaB = -.1; % -.1
propStrDynamics.betaB = .5; % .5
propStrDynamics.gammaB = .6; % .6
end
% Initialize graphics index
graph.index = 1;
%% Visualization of the configuration
% graph.index = plot_referenceConfigurationFEMPlateInMembraneAction(strMsh,analysis,F,homDBC,graph,'outputEnabled');
%% Solve the plate in membrane action problem
[~, minElSize] = solve_FEMPlateInMembraneActionTransient ...
(propAnalysis, strMsh, homDBC, inhomDBC, valuesInhomDBC, ...
updateInhomDOFs, propNBC, @computeLoadVctFEMPlateInMembraneAction, ...
parameters, computeBodyForces, computeInitCnds, ...
computeProblemMatricesSteadyState, propNLinearAnalysis, propIDBC, ...
propStrDynamics, solve_LinearSystem, solve_FEMSystem, propGaussInt, ...
propVTK, caseName, 'outputEnabled');
%% Postprocessing
% graph.visualization.geometry = 'reference_and_current';
% resultant = 'stress';
% component = 'y';
% graph.index = plot_currentConfigurationAndResultants(strMsh,homDBC,dHat,parameters,analysis,resultant,component,graph);
%% END OF THE SCRIPT