44 {
45
47
48 try {
49
50 moab::Core mb_instance;
51 moab::Interface& moab = mb_instance;
52 int rank;
53 MPI_Comm_rank(PETSC_COMM_WORLD,&rank);
56
57
59
60 map<int,Gel::BlockMaterialData> material_data;
61
62
63 material_data[0].gAlpha = 1;
64 material_data[0].vAlpha = 0.3;
65 material_data[0].gBeta = 1;
66 material_data[0].vBeta = 0.3;
67 material_data[0].gBetaHat = 1;
68 material_data[0].vBetaHat = 0.3;
69 material_data[0].oMega = 1;
70 material_data[0].vIscosity = 1;
71 material_data[0].pErmeability = 2.;
72
74
75
79 F(0,0) = 0.01;
F(0,1) = 0.02;
F(0,2) = 0.03;
80 F(1,0) = 0.04;
F(1,1) = 0.05;
F(1,2) = 0.06;
81 F(2,0) = 0.07;
F(2,1) = 0.08;
F(2,2) = 0.09;
82
84 F_dot.resize(3,3);
85 F_dot.clear();
86 F_dot(0,0) = 0.01; F_dot(0,1) = 0.02; F_dot(0,2) = 0.03;
87 F_dot(1,0) = 0.04; F_dot(1,1) = 0.05; F_dot(1,2) = 0.06;
88 F_dot(2,0) = 0.07; F_dot(2,1) = 0.08; F_dot(2,2) = 0.09;
89
91 strainHat.resize(3,3);
92 strainHat.clear();
93 strainHat(0,0) = 0.01; strainHat(0,1) = 0.02; strainHat(0,2) = 0.03;
94 strainHat(1,0) = 0.04; strainHat(1,1) = 0.05; strainHat(1,2) = 0.06;
95 strainHat(2,0) = 0.07; strainHat(2,1) = 0.08; strainHat(2,2) = 0.09;
96
98 strainHatDot.resize(3,3);
99 strainHatDot.clear();
100 strainHatDot(0,0) = 0.01; strainHatDot(0,1) = 0.02; strainHatDot(0,2) = 0.03;
101 strainHatDot(1,0) = 0.04; strainHatDot(1,1) = 0.05; strainHatDot(1,2) = 0.06;
102 strainHatDot(2,0) = 0.07; strainHatDot(2,1) = 0.08; strainHatDot(2,2) = 0.09;
103
104 ce.mU = 1;
106 gradient_mu.resize(3);
107 gradient_mu.clear();
108 gradient_mu[0] = 1;
109 gradient_mu[1] = 0;
110 gradient_mu[2] = 0;
111
112
113
114 typedef tee_device<ostream, ofstream>
TeeDevice;
116 ofstream ofs("gel_constitutive_model_test.txt");
119
120
121
122 ierr = ce.calculateCauchyDefromationTensor(); CHKERRQ(
ierr);
123 my_split << "C\n" << ce.C << endl << endl;
124
125 ierr = ce.calculateStrainTotal(); CHKERRQ(
ierr);
126 my_split << "strainTotal\n" << ce.strainTotal << endl << endl;
127
128 ierr = ce.calculateTraceStrainTotalDot(); CHKERRQ(
ierr);
129 my_split << "traceStrianTotalDot\n" << ce.traceStrainTotalDot << endl << endl;
130
131 ierr = ce.calculateSolventConcentrationDot(); CHKERRQ(
ierr);
132 my_split << "solventConcentrationDot\n" << ce.solventConcentrationDot << endl << endl;
133
134 ierr = ce.calculateStressAlpha(); CHKERRQ(
ierr);
135 my_split << "stressAlpha\n" << ce.stressAlpha << endl << endl;
136
137 ierr = ce.calculateStressBeta(); CHKERRQ(
ierr);
138 my_split << "stressBeta\n" << ce.stressBeta << endl << endl;
139
140 ierr = ce.calculateStressBetaHat(); CHKERRQ(
ierr);
141 my_split << "stressBeta\n" << ce.stressBetaHat << endl << endl;
142
143 ierr = ce.calculateStressTotal(); CHKERRQ(
ierr);
144 my_split << "stressTotal\n" << ce.stressTotal << endl << endl;
145
146 ierr = ce.calculateSolventFlux(); CHKERRQ(
ierr);
147 my_split << "solventFlux\n" << ce.solventFlux << endl << endl;
148
149 ierr = ce.calculateStrainHatFlux(); CHKERRQ(
ierr);
150 my_split << "strainHatDot\n" << ce.strainHatDot << endl << endl;
151
152 ierr = ce.calculateResidualStrainHat(); CHKERRQ(
ierr);
153 my_split << "residualStrainHat\n" << ce.residualStrainHat << endl << endl;
154
155 }
157
159
160 return 0;
161}
#define CATCH_ERRORS
Catch errors.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
VectorBoundedArray< double, 3 > VectorDouble3
Constitutive model functions.
Implementation of Gel constitutive model.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Deprecated interface functions.