theader.h - simple_DEM - a simple 2D Discrete Element Method code for educational purposes
(HTM) git clone git://src.adamsgaard.dk/simple_DEM
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
theader.h (1272B)
---
1 #ifndef HEADER_H_
2 #define HEADER_H_
3
4 /* Structure declarations */
5 typedef struct
6 {
7 double m; /* Mass */
8 double R; /* Radius */
9 double I; /* Inertia */
10 double x, y, ang; /* Position */
11 double vx, vy, angv; /* Velocities */
12 double ax, ay, anga; /* Acceleration */
13 double fx, fy, t; /* Sum of forces, decomposed */
14 double p; /* Pressure */
15 } grain;
16
17
18
19 /* Prototype functions */
20
21 /* initialize.c */
22 void triangular_grid(grain* g);
23
24 /* grains.c */
25 void prediction(grain* g);
26 void interparticle_force(grain* g, int a, int b);
27 void interact_grains(grain* g);
28 void update_acc(grain* g);
29 void correction(grain* g);
30
31 /* walls.c */
32 double compute_force_upper_wall(int i, grain* g, double wup);
33 double compute_force_lower_wall(int i, grain* g, double wdown);
34 double compute_force_left_wall(int i, grain* g, double wleft);
35 double compute_force_right_wall(int i, grain* g, double wright);
36 void interact_walls(grain* g, double wleft, double wright, double wup, double wdown,
37 double* wp_up, double* wp_down, double* wp_left, double* wp_right);
38
39 /* vtk_export.c */
40 int vtk_export_grains(grain* g, int numfile);
41 /*int vtk_export_walls(int numfile, double wlex, double wrix, double wloy, double wupy);*/
42 int vtk_export_forces(grain* g, int numfile);
43
44 #endif