-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain_steadyStateGeometricallyNLinearPlateInMembraneAction.m
More file actions
120 lines (95 loc) · 3.72 KB
/
Copy pathmain_steadyStateGeometricallyNLinearPlateInMembraneAction.m
File metadata and controls
120 lines (95 loc) · 3.72 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
%% Licensing
%
% License: BSD License
% cane Multiphysics default license: cane/license.txt
%
% Main authors: Andreas Apostolatos
%
%% Script documentation
%
% Task : Plane stress analysis for a rectangular plate subject to uniform
% pressure on its top edge
%
% 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/');
% Add the equation system solvers
addpath('../../equationSystemSolvers/');
% Add all the efficient computation functions
addpath('../../efficientComputation/');
% Add all functions related to plate in membrane action analysis
addpath('../../FEMPlateInMembraneActionAnalysis/solvers/',...
'../../FEMPlateInMembraneActionAnalysis/solutionMatricesAndVectors/',...
'../../FEMPlateInMembraneActionAnalysis/loads/',...
'../../FEMPlateInMembraneActionAnalysis/graphics/',...
'../../FEMPlateInMembraneActionAnalysis/output/',...
'../../FEMPlateInMembraneActionAnalysis/postprocessing/');
%% Parse data from GiD input file
% Define the path to the case
pathToCase = '../../inputGiD/FEMPlateInMembraneActionAnalysis/';
caseName = 'cantileverBeamPlaneStress';
% caseName = 'PlateWithAHolePlaneStress';
% caseName = 'PlateWithMultipleHolesPlaneStress';
% caseName = 'InfinitePlateWithAHolePlaneStress';
% caseName = 'unitTest_curvedPlateTipShearPlaneStress';
% caseName = 'NACA2412_AoA5_CSD';
% caseName = 'turek_csd';
% Parse the data from the GiD input file
[strMsh, homDOFs, inhomDOFs, valuesInhomDOFs, propNBC, propAnalysis, ...
parameters, propNLinearAnalysis, propStrDynamics, propGaussInt] = ...
parse_StructuralModelFromGid(pathToCase, caseName, 'outputEnabled');
%% GUI
% On the body forces
computeBodyForces = @computeConstantVerticalStructureBodyForceVct;
% Choose solver for the linear equation system
solve_LinearSystem = @solve_LinearSystemMatlabBackslashSolver;
% solve_LinearSystem = @solve_LinearSystemGMResWithIncompleteLUPreconditioning;
% Output properties
propVTK.isOutput = true;
propVTK.writeOutputToFile = @writeOutputFEMPlateInMembraneActionToVTK;
propVTK.VTKResultFile = 'undefined';
% Define traction vector
propNBC.tractionLoadVct = [0; -1e1; 0];
% Initialize graphics index
propGraph.index = 1;
%% Output data to a VTK format
pathToOutput = '../../outputVTK/FEMPlateInMembraneActionAnalysis/';
%% Visualization of the configuration
F = computeLoadVctFEMPlateInMembraneAction...
(strMsh, propAnalysis, propNBC, 0, propGaussInt,'');
segmentsContact = [];
propGraph.index = plot_referenceConfigurationFEMPlateInMembraneAction ...
(strMsh, propAnalysis, F, homDOFs, segmentsContact, propGraph, 'outputEnabled');
%% Initialize solution
numNodes = length(strMsh.nodes(:,1));
numDOFs = 2*numNodes;
dHat = zeros(numDOFs,1);
%% Solve the plate in membrane action problem
[dHat, FComplete, minElSize] = ...
solve_FEMPlateInMembraneActionNLinear...
(propAnalysis, strMsh, dHat, homDOFs, inhomDOFs, valuesInhomDOFs, propNBC, ...
computeBodyForces, parameters, solve_LinearSystem, propNLinearAnalysis, ...
propGaussInt, propVTK, caseName, pathToOutput, 'outputEnabled');
%% Postprocessing
% graph.visualization.geometry = 'reference_and_current';
% resultant = 'stress';
% component = 'y';
% nodeIDs_active = [];
% contactSegments = [];
% graph.index = plot_currentConfigurationAndResultants ...
% (propAnalysis, strMsh, homDOFs, dHat, nodeIDs_active, ...
% contactSegments, parameters, resultant, component, graph);
%% END OF THE SCRIPT