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
53
57
61
65
69
73
77
80 void setLoadState(bool load_state_activated);
81
85
88 void setSaveState(bool save_state_activated);
89
93
96 double getTimeStep();
97
100 void setTimeStep(double time_step);
101
104 double getTime();
105
108 void setTime(double simulation_time);
109
112 unsigned getResultNum();
113
116 void setResultNum(unsigned total_results);
117
120 unsigned getResultSteps();
121
125
128 void setCriticalTimeStepMultiplier(double critical_time_step_multiplier);
129
132 unsigned getThreads();
133
136 void setThreads(unsigned n_threads);
137
141
144 void setContactActive(bool is_contact_activated);
145
149
152 void setGravityActive(bool is_gravity_activated);
153
157 const Vector3d& getGravity();
158
162 void setGravity(const Vector3d& gravity);
163
167
170 void setAxisymetricActive(bool if_axysimentric_active);
171
175
178 void setJanumannActive(bool if_jaumann_active);
179
182 string getInputFile();
183
186 void setInputFile(string file_name);
187
192
197
201
205
208 void setDampingLocalValue(double alpha);
209
213
217
222
227
230 void setNumThreads(unsigned nThreads);
231
235
238 void setSeismicAnalysisActive(bool seismic_analysis_active);
239
243
246 void setTwoPhaseActive(bool two_phase_calculation_active);
247
250 void setInitialSimulationTime( std::chrono::system_clock::time_point initialTime);
251
254 std::chrono::system_clock::time_point getInitialSimulationTime( );
255
257 std::string getSeismicFileName();
258
262
265 void setCurrentTime(double currentTime);
266
269
272
276
280
284
288
291 void setLoopCounter(int a);
292
296};
297
298#endif /* MODEL_H_ */
Contain the configuration variables that defines an specific simulation.
DampingType
Defines the type of damping used in the simulation.
Definition Model.h:48
@ UNDAMPED
No damping applied.
Definition Model.h:49
@ KINETIC_DYNAMIC_RELAXATION
Kinetic dynamic relaxation damping.
Definition Model.h:51
@ LOCAL
Local damping (requires "value")
Definition Model.h:50
bool getJanumannActive()
Return if Jaumann rate is active.
void setTerrainContactActive(bool)
Set terrain contact active.
bool getHydroMechOneWayEnabled()
Return if one way hydro-mechanical coupling is enabled.
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.
void setLoopCounter(int a)
Set the current loop counter.
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.
void setHydroMechanicalCouplingType(HydroMechanicalCouplingType type)
Set hydro-mechanical coupling type.
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.
int incrementLoopCounter()
Increment the loop counter by one.
void setThreads(unsigned n_threads)
Configures the number of threads.
HydroMechanicalCouplingType
Defines the type of hydro-mechanical coupling.
Definition Model.h:64
bool getContactActive()
Return if contact method is activated.
unsigned getThreads()
Return the number of threads in the simulation.
bool getWindowsSystem()
Return true is the system is Windows.
HydroMechanicalCouplingType getHydroMechanicalCouplingType()
return the hydro-mechanical coupling type
unsigned getResultSteps()
Return the every how many steps the results will be written.
InterpolationFunctionType
Defines the type of interpolation function.
Definition Model.h:60
@ GIMP
Definition Model.h:60
@ LINEAR
Definition Model.h:60
int getLoopCounter()
Get the current loop counter.
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:56
@ LINUX
Definition Model.h:56
@ WINDOWS
Definition Model.h:56
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.
void setSeismicAnalysisActive(bool seismic_analysis_active)
Configure if seismic analysis is active.
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.
bool getSeismicAnalysisActive()
Return true if seismic analysis is active.
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.
string getInputFile()
Return the input file name.
bool getLoadState()
Return true is load state is activated.