MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Model.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef MODEL_H_
5#define MODEL_H_
6
7#include "Eigen/Core"
8using Eigen::Vector3d;
9
10#include<string>
11using std::string;
12
13#include <chrono>
14
17namespace ModelSetup {
18
22
26
30
34
38
42
46
49 void setLoadState(bool load_state_activated);
50
54
57 void setSaveState(bool save_state_activated);
58
62
65 double getTimeStep();
66
69 void setTimeStep(double time_step);
70
73 double getTime();
74
77 void setTime(double simulation_time);
78
81 unsigned getResultNum();
82
85 void setResultNum(unsigned total_results);
86
89 unsigned getResultSteps();
90
94
97 void setCriticalTimeStepMultiplier(double critical_time_step_multiplier);
98
101 unsigned getThreads();
102
105 void setThreads(unsigned n_threads);
106
110
113 void setContactActive(bool is_contact_activated);
114
118
121 void setGravityActive(bool is_gravity_activated);
122
126 const Vector3d& getGravity();
127
131 void setGravity(const Vector3d& gravity);
132
136
139 void setAxisymetricActive(bool if_axysimentric_active);
140
144
147 void setJanumannActive(bool if_jaumann_active);
148
151 string getInputFile();
152
155 void setInputFile(string file_name);
156
161
166
170
174
177 void setDampingLocalValue(double alpha);
178
182
186
191
196
199 void setNumThreads(unsigned nThreads);
200
204
207 void setSeismicAnalysis(bool seismic_analysis_active);
208
212
215 void setTwoPhaseActive(bool two_phase_calculation_active);
216
219 void setInitialSimulationTime( std::chrono::system_clock::time_point initialTime);
220
223 std::chrono::system_clock::time_point getInitialSimulationTime( );
224
226 std::string getSeismicFileName();
227
231
234 void setCurrentTime(double currentTime);
235
238
241};
242
243#endif /* MODEL_H_ */
Contain the configuration variables that defines an specific simulation.
DampingType
Defines the type of damping.
Definition Model.h:25
@ UNDAMPED
Definition Model.h:25
@ KINETIC_DYNAMIC_RELAXATION
Definition Model.h:25
@ LOCAL
Definition Model.h:25
bool getJanumannActive()
Return if Jaumann rate is active.
void setTerrainContactActive(bool)
Set terrain contact active.
void setAxisymetricActive(bool if_axysimentric_active)
Configure if axisymetric analisys is active.
ModelSetup::DampingType getDampingType()
Return the damping type.
double getDampingLocal()
Return the local damping value.
ModelSetup::StressUpdateScheme getUpdateStressScheme()
Return the scheme for updating the stress.
ModelSetup::DampingType getDamping()
Return the damping type.
bool getAxisymetricActive()
Return if axisymetric analisys is active.
bool getTwoPhaseActive()
Return if two-phase calculation is active.
unsigned getResultNum()
Return the total results to be written.
void setUpdateStressScheme(ModelSetup::StressUpdateScheme stress_sheme_update)
Configure the scheme for updating the stress.
double getTimeStep()
Return the time step.
bool getLinuxSystem()
Return true is the system is Linux.
std::chrono::system_clock::time_point getInitialSimulationTime()
Get initial simulation time.
unsigned getContributionNodesNum()
Return the number of nodes that a particle contributes.
std::string getSeismicFileName()
Return the seismic file name.
void setTwoPhaseActive(bool two_phase_calculation_active)
Configure if two-phase calculation is active.
bool getSaveState()
Return true is save state is activated.
void setTime(double simulation_time)
Configure the simulation time.
void setNumThreads(unsigned nThreads)
Configure the number of threads in the model.
void setSaveState(bool save_state_activated)
Set save state activated.
void setThreads(unsigned n_threads)
Configures the number of threads.
bool getContactActive()
Return if contact method is activated.
bool getSeismicAnalysis()
Return true if seismic analysis is active.
unsigned getThreads()
Return the number of threads in the simulation.
bool getWindowsSystem()
Return true is the system is Windows.
unsigned getResultSteps()
Return the every how many steps the results will be written.
InterpolationFunctionType
Defines the type of interpolation function.
Definition Model.h:33
@ GIMP
Definition Model.h:33
@ LINEAR
Definition Model.h:33
void setInputFile(string file_name)
Configure the input file name.
void setCurrentTime(double currentTime)
Set current simulation time.
OperationalSystem
Defines the current operational system.
Definition Model.h:29
@ LINUX
Definition Model.h:29
@ WINDOWS
Definition Model.h:29
void setDampingType(ModelSetup::DampingType dampingType)
Configure the damping type.
StressUpdateScheme
Defines the type of scheme used to update the stress.
Definition Model.h:21
@ USL
Definition Model.h:21
@ MUSL
Definition Model.h:21
@ USF
Definition Model.h:21
void setTimeStep(double time_step)
Configure the time step.
double getTime()
Return the simulation time.
void setInitialSimulationTime(std::chrono::system_clock::time_point initialTime)
Set initial simulation time.
void setInterpolationFunction(ModelSetup::InterpolationFunctionType interpolation_functions_type)
Configure the interpolation functions type.
void setGravity(const Vector3d &gravity)
Configure the gravity vector.
double getCriticalTimeStepMultiplier()
Return the critical sime step multiplier.
bool getGravityActive()
Return if gravity is active.
double getCurrentTime()
Get current simulation time.
void setGravityActive(bool is_gravity_activated)
Configure if gravity is active.
ModelSetup::InterpolationFunctionType getInterpolationFunction()
Return the interpolation functions type.
void setContactActive(bool is_contact_activated)
Configure if contact method is activated.
void setResultNum(unsigned total_results)
Configure the total results to be written.
bool getTerrainContactActive()
Return if terrain contact is active.
void setCriticalTimeStepMultiplier(double critical_time_step_multiplier)
Configures the fraction of critical time step.
void setJanumannActive(bool if_jaumann_active)
Configure if Jaumann rate is active.
void setDampingLocalValue(double alpha)
Configure the local damping value.
void setLoadState(bool load_state_activated)
Set load state activated.
const Vector3d & getGravity()
Return the gravity vector.
void setSeismicAnalysis(bool seismic_analysis_active)
Configure if seismic analysis is active.
string getInputFile()
Return the input file name.
bool getLoadState()
Return true is load state is activated.