PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
demModel.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2024 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef MODEL_FASTDEMMODEL_H
12#define MODEL_FASTDEMMODEL_H
13
14#include "../modelData.h"
15
16namespace model {
17
32class DEMModel : public ModelData {
33
34public:
39 explicit DEMModel(inp::Input *deck, std::string modelName = "DEMModel");
40
42 std::string d_name;
43
55 void log(std::ostringstream &oss, int priority = 0, bool check_condition = true, int override_priority = -1, bool screen_out = false);
56
68 void log(const std::string &str, int priority = 0, bool check_condition = true, int override_priority = -1, bool screen_out = false);
69
74 virtual void run(inp::Input *deck);
75
85 virtual void restart(inp::Input *deck);
86
88 virtual void init();
89
91 virtual void close();
92
101 virtual void integrate();
102
109 virtual void integrateStep();
110
119 virtual void integrateCD();
120
122 virtual void integrateVerlet();
123
132 virtual void computeForces();
133
135 virtual void computePeridynamicForces();
136
138 virtual void computeExternalForces();
139
141 virtual void computeExternalDisplacementBC();
142
144 virtual void computeContactForces();
145
147 virtual void applyInitialCondition();
148
157 virtual void createParticles();
158
173 virtual void createParticlesFromFile(size_t z,
174 std::shared_ptr<particle::RefParticle> ref_p);
175
176 virtual void createParticleUsingParticleZoneGeomObject(size_t z,
177 std::shared_ptr<particle::RefParticle> ref_p);
178
180 virtual void createGeometryAtSite(const double &particle_radius,
181 const double &particle_orient,
182 const util::Point &site,
183 const std::vector<double> &rep_geom_params,
184 const std::shared_ptr<util::geometry::GeomObject> &rep_geom_p,
185 std::shared_ptr<util::geometry::GeomObject> &p_geom);
186
188 virtual void updateGeometryObjectsPostInit();
189
191 virtual void updateContactNeighborlist();
192
194 virtual void updatePeridynamicNeighborlist();
195
197 virtual void updateNeighborlistCombine();
198
200 virtual void setupContact();
201
203 virtual void setupQuadratureData();
204
207
216 virtual void output();
217
223 std::string ppTwoParticleTest();
224
230 std::string ppCompressiveTest();
231
233 virtual void checkStop();
234
236};
237
240} // namespace model
241
242#endif // MODEL_FASTDEMMODEL_H
A class to read input file.
Definition input.h:61
A class for discrete element particle simulation with peridynamic model
Definition demModel.h:32
virtual void computeExternalForces()
Computes external/boundary condition forces.
Definition demModel.cpp:791
virtual void integrate()
Perform time integration.
Definition demModel.cpp:268
virtual void setupContact()
Creates particles in a given container.
std::string ppCompressiveTest()
Function that handles post-processing for compressive test of particulate media by rigid wall and ret...
virtual void updatePeridynamicNeighborlist()
Update neighborlist for peridynamics force.
virtual void createGeometryAtSite(const double &particle_radius, const double &particle_orient, const util::Point &site, const std::vector< double > &rep_geom_params, const std::shared_ptr< util::geometry::GeomObject > &rep_geom_p, std::shared_ptr< util::geometry::GeomObject > &p_geom)
Creates geometrical object for a particle given particle radius, orientation, and site location.
virtual void output()
Output the snapshot of data at current time step.
virtual void applyInitialCondition()
Applies initial condition.
virtual void computeExternalDisplacementBC()
Applies displacement boundary conditions.
Definition demModel.cpp:814
virtual void integrateStep()
Performs one time step.
Definition demModel.cpp:342
virtual void computePeridynamicForces()
Computes peridynamic forces.
Definition demModel.cpp:602
virtual void updateContactNeighborlist()
Update neighborlist for contact.
virtual void computeContactForces()
Computes contact forces.
Definition demModel.cpp:820
virtual void close()
Closure operations.
Definition demModel.cpp:104
virtual void updateGeometryObjectsPostInit()
Update varioud geometry objects associated with container, particles, and reference particles.
virtual void updateNeighborlistCombine()
Update neighborlist for contact and peridynamics force.
std::string ppTwoParticleTest()
Function that handles post-processing for two particle collision test and returns maximum vertical di...
void log(std::ostringstream &oss, int priority=0, bool check_condition=true, int override_priority=-1, bool screen_out=false)
Prints message if any of these two conditions are true.
Definition demModel.cpp:53
virtual void integrateVerlet()
Perform time integration using velocity verlet scheme.
Definition demModel.cpp:392
virtual void createParticlesFromFile(size_t z, std::shared_ptr< particle::RefParticle > ref_p)
Creates particles in a Hexagonal arrangement.
virtual void init()
Initialize remaining data members.
Definition demModel.cpp:109
virtual void computeForces()
Computes peridynamic forces and contact forces.
Definition demModel.cpp:462
virtual void checkStop()
Checks if simulation should be stopped due to abnormal state of system.
std::string d_name
Name of the model for logging purposes (useful if other classes are built on top of this class)
Definition demModel.h:42
virtual void restart(inp::Input *deck)
Restarts the simulation from previous state.
Definition demModel.cpp:84
virtual void integrateCD()
Perform time integration using central-difference scheme.
Definition demModel.cpp:349
virtual bool updateContactNeighborSearchParameters()
Update contact neighbor search parameters.
virtual void createParticles()
Creates particles in a given container.
virtual void run(inp::Input *deck)
Main driver to simulate.
Definition demModel.cpp:68
virtual void createParticleUsingParticleZoneGeomObject(size_t z, std::shared_ptr< particle::RefParticle > ref_p)
Creates particles in a given container.
virtual void setupQuadratureData()
Sets up quadrature data.
A class to store model data.
Definition modelData.h:47
A structure to represent 3d vectors.
Definition point.h:30