-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstart_metis_single_analysis.m
executable file
·54 lines (45 loc) · 2.11 KB
/
start_metis_single_analysis.m
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
%% metis_start.m - starts single simulations with metis
%
% Metis is an object-oriented MATLAB code package for the simulation of
% constrained mechanical systems under the usage of numerical
% time-integration methods and Newton-Rhapson method.
%
% This startscript provides single simulations. For error analyses see:
% metis_error_analysis.m
%
% Usage :
% metis_start()
%
% Other .m-files required: input-file in /input
% .mat-files required: none
%
% Author : Philipp Kinon
% Email : philipp.kinon@kit.edu
% Date : 04.11.2022
%% ----------------------------BEGIN CODE ---------------------------------
%% METIS initialise
% Clear present variables
clearvars;
% Add all subdirectories and to the current path
addpath(genpath(fileparts(which(mfilename))));
% Metis creates objects from input-file
[simulation, system, integrator, solver] = Metis('input/published/MUBO_kinon_betsch_2024/single_analysis_RedundantMassSpring', 1, 1);
%[simulation, system, integrator, solver] = Metis('input/published/MUBO_kinon_betsch_2024/single_analysis_SpringPendulumPolar', 1, 1);
%[simulation, system, integrator, solver] = Metis('input/published/MUBO_kinon_betsch_2024/single_analysis_rigidBodyRotatingQuat', 1, 1);
%[simulation, system, integrator, solver] = Metis('input/published/MUBO_kinon_betsch_2024/quat_heavytop/single_analysis_HeavyTopQuat', 1, 1);
%[simulation, system, integrator, solver] = Metis('input/published/MUBO_kinon_betsch_2024/single_analysis_ClosedLoopMBS', 1, 1);
%% METIS solver
% Solve system with chosen solver and integration scheme
simulation = solver.solve(simulation, system, integrator);
%% METIS postprocessing
% Define postprocessing from class
postprocess = Postprocess();
% Compute various postprocessing quantities
simulation = postprocess.compute(system, simulation, integrator);
% Animation of trajectory if activated in input-file
postprocess.animation(system, simulation);
% Plot time-evolution of postprocessing quantites
postprocess.plot(simulation);
% Export simulation results if activated in input-file
postprocess.save(simulation);
% -------------------------- END OF CODE ----------------------------------