-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModelCollagenEnsemble.hpp
104 lines (79 loc) · 2.68 KB
/
ModelCollagenEnsemble.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//
// ModelCollagenEnsemble.hpp
// fullstructuralmodel
//
// Created by Will Zhang on 5/11/18.
// Copyright © 2018 Will Zhang. All rights reserved.
//
#ifndef ModelCollagenEnsemble_hpp
#define ModelCollagenEnsemble_hpp
#include "math.h"
#include "Gauss_Quad_Points.hpp"
#include "BetaDistribution.hpp"
// This class and its methods for the fiber model are defined directly in the header file.
//
class model_col_fiber_PF
{
private:
double m_1_lf; // 1/lambda_fiber, which is the applied stretch
public:
model_col_fiber_PF():m_1_lf(1.0){};
model_col_fiber_PF(double lf):m_1_lf(1.0/lf){
}
double stress(double ls)
{
double m_1_ls = 1.0/ls;
return m_1_ls * (m_1_ls - m_1_lf);
}
// Given the stretch of the fibers, this gives the stress for any slack stretch
// This is done to save 1 operation when integrating over the fiber model.
double energydensity(double ls)
{
double m_1_ls = 1.0/ls;
double dummievariable = m_1_ls/m_1_lf - 1.0;
return dummievariable * dummievariable;
}
};
class model_col_ens_struc_PF
{
//PF = Linear in 1st PK and stretch
// The parameters of this model are:
// mean
// stdev
// lb
// ub
//
// The arguments are
// lf
// l_pushforward
private:
const int gq_n = 21; // The number of gauss quadrature points useed
const double *gq_abs = C_01_A21; // The non transformed abscissas
const double *gq_weight = C_01_W21; // The non-transformed weights
public:
int is_deltafunction;
// Check if the recruitment function is too narrow for integration
// In this case, the recruitment distribution is assumed to behaves as a delta function and proceed
// accordingly
double lower_limit;
double upper_limit;
double mean;
double stdev;
model_col_fiber_PF fibermodel;
//
beta_PDF Dx_PDF;
//The collagen fiber recruitment distribution
// Which has the parameters:
// mean, mean
// stdev, standard deviation
// lb, lowerbound
// ub, upperbound
void set_parameters(double mu, double sigma, double lb, double ub);
// default constructor, uses common material parameters from bovine pericardium
model_col_ens_struc_PF();
// This is the parameterized constructor
model_col_ens_struc_PF(double mu, double sigma, double lb, double ub);
double stress(double lambda_fiber, double lambda_pushforward);
double energydensity(double lambda_fiber, double lambda_pushforward);
};
#endif /* ModelCollagenEnsemble_hpp */