hemocell
Loading...
Searching...
No Matches
constant_defaults.h
Go to the documentation of this file.
1/*
2This file is part of the HemoCell library
3
4HemoCell is developed and maintained by the Computational Science Lab
5in the University of Amsterdam. Any questions or remarks regarding this library
6can be sent to: info@hemocell.eu
7
8When using the HemoCell library in scientific work please cite the
9corresponding paper: https://doi.org/10.3389/fphys.2017.00563
10
11The HemoCell library is free software: you can redistribute it and/or
12modify it under the terms of the GNU Affero General Public License as
13published by the Free Software Foundation, either version 3 of the
14License, or (at your option) any later version.
15
16The library is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU Affero General Public License for more details.
20
21You should have received a copy of the GNU Affero General Public License
22along with this program. If not, see <http://www.gnu.org/licenses/>.
23*/
24
25#include <iomanip>
26
27#ifndef CONSTANT_DEFAULTS_H
28#define CONSTANT_DEFAULTS_H
29// ============== Compile time options - Set these
30
31/*
32 * Which version are we at
33 */
34#define VERSION_MAJOR 2
35#define VERSION_MINOR "6"
36
37// Use for solidifying, performance impact so only enable when using
38#ifndef SOLIDIFY_MECHANICS
39#define SOLIDIFY_MECHANICS
40#endif
41
42// Use for Interior Viscosity mechanics, performance impact so only enable when using
43#ifndef INTERIOR_VISCOSITY
44//#define INTERIOR_VISCOSITY
45#endif
46
47/*
48Choose material integration method.
49Euler [1], Adams-Bashforth [2]
50*/
51#ifndef HEMOCELL_MATERIAL_INTEGRATION
52#define HEMOCELL_MATERIAL_INTEGRATION 1
53#endif
54
55/*
56Select BGK dynamics with Guo's forcing method.
57*/
58#ifndef DESCRIPTOR
59#include "latticeBoltzmann/nearestNeighborLattices3D.h"
60#define DESCRIPTOR plb::descriptors::ForcedD3Q19Descriptor
61#endif
62
63#ifndef CEPAC_DESCRIPTOR
64#include "latticeBoltzmann/advectionDiffusionLattices.h"
65#define CEPAC_DESCRIPTOR plb::descriptors::AdvectionDiffusionD3Q19Descriptor
66#endif
67
68/*
69Force unconditional stability on the material model. Note: it will not make the model magically correct, only stable!
70FORCE_LIMIT sets the allowed maximal force coming from the constitutive model (in LBM units).
71*/
72// in [pN / surface particle].
73#ifndef FORCE_LIMIT
74#define FORCE_LIMIT 50.0
75#endif
76
77/*
78 * Used for defining the shape of the cells through constructMeshElement function
79 */
80#define RBC_FROM_SPHERE 1
81#define ELLIPSOID_FROM_SPHERE 6
82#define STRING_FROM_VERTEXES 7
83#define WBC_SPHERE 0
84#define MESH_FROM_STL 2
85
86/*
87 * Defines for desired output per celltype, can save space/time etc. etc. also works for specific fluid ones (vel, force etc)
88 */
89#define OUTPUT_POSITION 1
90#define OUTPUT_FORCE 2
91#define OUTPUT_FORCE_VOLUME 21
92#define OUTPUT_FORCE_BENDING 22
93#define OUTPUT_FORCE_AREA 23
94#define OUTPUT_FORCE_LINK 24
95#define OUTPUT_FORCE_VISC 25
96#define OUTPUT_FORCE_INNER_LINK 26
97#define OUTPUT_FORCE_REPULSION 27
98#define OUTPUT_TRIANGLES 3
99#define OUTPUT_VELOCITY 4
100#define OUTPUT_DENSITY 5
101#define OUTPUT_VERTEX_ID 7
102#define OUTPUT_CELL_ID 8
103#define OUTPUT_CELL_DENSITY 9
104#define OUTPUT_SHEAR_STRESS 10
105#define OUTPUT_INNER_LINKS 11
106#define OUTPUT_OMEGA 12
107#define OUTPUT_BOUNDARY 13
108#define OUTPUT_BINDING_SITES 14
109#define OUTPUT_INTERIOR_POINTS 15
110#define OUTPUT_SHEAR_RATE 16
111#define OUTPUT_STRAIN_RATE 17
112#define OUTPUT_RES_TIME 18
113
114//==================== Not really an option but a nice shortcut
115#define param Parameters
116
117#ifndef T
118typedef double T;
119#endif
120
121#ifndef PI
122#define PI 3.14159265358979323846
123#endif
124
125//Define signed and unsigned ints
126#ifndef plint
127typedef long int plint;
128#endif
129#ifndef pluint
130typedef long unsigned int pluint;
131#endif
132
157constexpr T MaxCellVolumetricChange = 0.01;
164constexpr T MaxCellBendingAngle = 0.0555;
169constexpr T MaxPLTBendingAngle = 2.467;
174
// end of the cell group constants
176
177namespace hemo {
180{
181 char value;
183 // do nothing
184 static_assert(sizeof *this == sizeof value, "invalid size");
185 static_assert(__alignof *this == __alignof value, "invalid alignment");
186 }
188};
189}
190
191#endif
double T
Definition constant_defaults.h:118
long int plint
Definition constant_defaults.h:127
long unsigned int pluint
Definition constant_defaults.h:130
constexpr T MaxCellSurfaceAreaChange
The maximum change of the cells surface area is limited to 30%.
Definition constant_defaults.h:159
constexpr T MaxCellVolumetricChange
The maximum volumetric change of an cell to maintain quasi-incompressibility.
Definition constant_defaults.h:157
constexpr T MaxCellBendingAngle
The maximum bending angle for red/white blood cells. The bending angle of the RBC/WBC are changed to ...
Definition constant_defaults.h:164
constexpr T MaxPLTBendingAngle
The maximum bending angle for platelets. Approximately (pi/2)^2 as derived from the smallest represen...
Definition constant_defaults.h:169
constexpr T MaxCellPersistenceLength
The maximum link force derived from persistence lengths. This maximum cell persistence length allows ...
Definition constant_defaults.h:173
Definition config.cpp:34
Used to circumvent buffer initialization of characters.
Definition constant_defaults.h:180
char value
Definition constant_defaults.h:181
NoInitChar()
Definition constant_defaults.h:182
~NoInitChar()
Definition constant_defaults.h:187