#include <users_modules/fracture_mechanics/AnalyticalFun.hpp>
Definition at line 51 of file AnalyticalFun.hpp.
◆ getForce()
PetscErrorCode FractureMechanics::AnalyticalForces::getForce |
( |
const EntityHandle |
ent, |
|
|
const VectorDouble3 & |
coords, |
|
|
const VectorDouble3 & |
normal, |
|
|
VectorDouble3 & |
force |
|
) |
| |
|
inlinevirtual |
User implemented analytical force
- Parameters
-
coords | coordinates of integration point |
normal | normal at integration point |
force | returned force |
- Returns
- error code
Reimplemented from NeumannForcesSurface::MethodForAnalyticalForce.
Definition at line 54 of file AnalyticalFun.hpp.
65 const double x = coords[0];
66 const double y = coords[1];
67 const double z = coords[2];
68 double &fx = forces[0];
69 double &fy = forces[1];
70 double &fz = forces[2];
72 const double n0 = normal[0] / sqrt(pow(normal[0], 2) + pow(normal[1], 2) +
74 const double n1 = normal[1] / sqrt(pow(normal[0], 2) + pow(normal[1], 2) +
76 const double n2 = normal[2] / sqrt(pow(normal[0], 2) + pow(normal[1], 2) +
79 const double pi = M_PI;
80 const double alpha =
aLpha;
81 const double theta = atan2(z, x * sin(alpha) + y * cos(alpha));
84 sqrt(pow(x * sin(alpha) + y * cos(alpha), 2) + pow(z, 2));
85 const double sref1 = 1 / sqrt(2 *
pi * rxy) * cos(theta / 2.) *
86 (1. - sin(theta / 2.) * sin(3. * theta / 2.));
87 const double sref2 = 1 / sqrt(2 *
pi * rxy) * cos(theta / 2.) *
88 (1. + sin(theta / 2.) * sin(3. * theta / 2.));
89 const double sref3 = 1 / sqrt(2 *
pi * rxy) * sin(theta / 2.) *
90 cos(theta / 2.) * cos(3. * theta / 2.);
92 const double scal1 = sref1 * pow(sin(alpha), 2);
93 const double scal2 = sref1 * pow(cos(alpha), 2);
94 const double scal3 = sref2;
95 const double scal4 = sref1 * sin(alpha) * cos(alpha);
96 const double scal5 = sref3 * sin(alpha);
97 const double scal6 = sref3 * cos(alpha);
100 fx = scal1 * n0 + scal4 * n1 + scal5 * n2;
101 fy = scal4 * n0 + scal2 * n1 + scal6 * n2;
102 fz = scal5 * n0 + scal6 * n1 + scal3 * n2;
The documentation for this struct was generated from the following file: