v0.14.0
Loading...
Searching...
No Matches
Classes | Functions
BoneRemodeling Namespace Reference

Classes

struct  CommonData
 Data structure for storing global and local matrix K and vector f. More...
 
struct  DataFromMetaIO
 Load data from MetaImage file, translate grayscale values to densities. More...
 
struct  DensityMapFe
 
struct  MonitorPostProc
 
struct  OpAssmbleRhoLhs_dF
 Off diagonal block of tangent matrix \(K_{\rho u}\). More...
 
struct  OpAssmbleRhoLhs_dRho
 Diagonal block of tangent matrix \(K_{\rho\rho}\). More...
 
struct  OpAssmbleRhoRhs
 Assemble residual for conservation of mass (density) More...
 
struct  OpAssmbleRhs
 Assemble RHS vector f. More...
 
struct  OpAssmbleStressLhs_dF
 Off diagonal block of tangent matrix \(K_{u u}\). More...
 
struct  OpAssmbleStressLhs_dRho
 Off diagonal block of tangent matrix \(K_{u \rho}\) /f[ K_{u \rho}=\intop_{V} \left[\frac{n}{\rho_{0}}\right] \left[\frac{\rho_{0}}{\rho_{0}^{\ast}}\right]^{n} \nabla N_j P_{ij} N_i \,dV /f]. More...
 
struct  OpAssmbleStressRhs
 Assemble residual for conservation of momentum (stresses) More...
 
struct  OpCalculateLhs
 Assemble LHS matrix K. More...
 
struct  OpCalculateStress
 Evaluate physical equations at integration points. More...
 
struct  OpCalculateStressTangent
 
struct  OpCalculateStressTangentWithAdolc
 
struct  OpCalulatefRhoAtGaussPts
 Assemble local vector containing density data. More...
 
struct  OpGetRhoTimeDirevative
 Evaluate density derivative with respect to time in case of Backward Euler Method. More...
 
struct  OpMassAndEnergyCalculation
 
struct  OpMassCalculation
 Calculate mass before approximation. More...
 
struct  OpMassCalculationFromApprox
 Calculate mass after approximation. More...
 
struct  OpPostProcStress
 Used to post proc stresses, energy, source term. More...
 
struct  OpVolumeCalculation
 Calculate volume of the model. More...
 
struct  Remodeling
 Implementation of bone remodeling finite element. More...
 
struct  SurfaceKDTree
 Create KDTree on surface of the mesh and calculate distance. More...
 

Functions

template<class B1 , class B2 , class T >
MoFEMErrorCode freeEnergy (Remodeling::CommonData &common_data, T &C, B1 &psi)
 
template<class B1 , class T >
MoFEMErrorCode recordFreeEnergy_dC (Remodeling::CommonData &common_data, T &dC, B1 &psi)
 
PetscErrorCode sphereSurfaceIntegration28 (MatrixDouble &gauss_pts, VectorDouble &weights)
 28 integration points on sphere More...
 
PetscErrorCode sphereSurfaceIntegration21 (MatrixDouble &gauss_pts, VectorDouble &weights)
 21 integration points on sphere More...
 
PetscErrorCode sphereSurfaceIntegration61 (MatrixDouble &gauss_pts, VectorDouble &weights)
 61 integration points on sphere More...
 

Function Documentation

◆ freeEnergy()

template<class B1 , class B2 , class T >
MoFEMErrorCode BoneRemodeling::freeEnergy ( Remodeling::CommonData common_data,
T C,
B1 &  psi 
)
inline

Calculate free energy

\[\psi_{0}=\frac{\mu}{2}\left(\textrm{tr}(\mathbf{C})-3\right)-\mu\ln(J)+\frac{\lambda}{2}\ln^{2}(\ln J) \]

Examples
Remodeling.hpp.

Definition at line 272 of file Remodeling.hpp.

273 {
274
278 const double mu = common_data.mu;
279 const double lambda = common_data.lambda;
280
281 // Compressible Neo-Hookean
282 B2 det;
283 CHKERR determinantTensor3by3(C, det);
284 det = sqrt(det);
285 B2 traceC;
286 traceC = C(I, I);
287 B2 log_det = log(det);
288 psi = 0.5 * mu * (traceC - 3.0) - mu * log_det +
289 0.5 * lambda * log_det * log_det;
290
291 // St. Venant–Kirchhoff Material
292 // T E;
293 // E(I,J) = C(I,J);
294 // E(0,0) -= 1;
295 // E(1,1) -= 1;
296 // E(2,2) -= 1;
297 // E(I,J) *= 0.5;
298 // B2 traceE = E(I,I);
299 // psi = 0.5*lambda*traceE*traceE+mu*E(I,J)*E(I,J);
300
302}
static Index< 'J', 3 > J
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define CHKERR
Inline error check.
Definition: definitions.h:535
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
static double lambda
constexpr IntegrationType I

◆ recordFreeEnergy_dC()

template<class B1 , class T >
MoFEMErrorCode BoneRemodeling::recordFreeEnergy_dC ( Remodeling::CommonData common_data,
T dC,
B1 &  psi 
)
inline
Examples
Remodeling.hpp.

Definition at line 305 of file Remodeling.hpp.

306 {
307
311 trace_on(common_data.tAg, common_data.kEep);
312 common_data.aC(I, J) <<= dC(I, J); // Set independent variables
313 CHKERR freeEnergy<adouble, adouble, FTensor::Tensor2_symmetric<adouble, 3>>(
314 common_data, common_data.aC, common_data.aPsi);
315 double psi_val;
316 common_data.aPsi >>= psi_val; // Set dependent variables
317 psi = psi_val;
318 trace_off();
320}
FTensor::Tensor2_symmetric< adouble, 3 > aC
right Cauchy-Green deformation tensor
Definition: Remodeling.hpp:173

◆ sphereSurfaceIntegration21()

PetscErrorCode BoneRemodeling::sphereSurfaceIntegration21 ( MatrixDouble &  gauss_pts,
VectorDouble &  weights 
)

21 integration points on sphere

Parameters
gauss_ptsreferenced matrix consisting normals at integration points
weightsWeights at gauss points
Returns
Error code

◆ sphereSurfaceIntegration28()

PetscErrorCode BoneRemodeling::sphereSurfaceIntegration28 ( MatrixDouble &  gauss_pts,
VectorDouble &  weights 
)

28 integration points on sphere

Parameters
gauss_ptsreferenced matrix consisting normals at integration points
weightsWeights at gauss points
Returns
Error code

◆ sphereSurfaceIntegration61()

PetscErrorCode BoneRemodeling::sphereSurfaceIntegration61 ( MatrixDouble &  gauss_pts,
VectorDouble &  weights 
)

61 integration points on sphere

Parameters
gauss_ptsreferenced matrix consisting normals at integration points
weightsWeights at gauss points
Returns
Error code