207 {
209
210 const double vol = getMeasure();
211 auto t_dot_u = getFTensor1FromMat<U_FIELD_DIM>(*
dotUPtr);
212 auto t_u = getFTensor1FromMat<U_FIELD_DIM>(*
uPtr);
213 auto t_p = getFTensor0FromVec(*
pPtr);
214 auto t_grad_u = getFTensor2FromMat<U_FIELD_DIM, SPACE_DIM>(*
gradUPtr);
215 auto t_h = getFTensor0FromVec(*
hPtr);
216 auto t_grad_h = getFTensor1FromMat<SPACE_DIM>(*
gradHPtr);
217 auto t_g = getFTensor0FromVec(*
gPtr);
218 auto t_coords = getFTensor1CoordsAtGaussPts();
219
220 auto t_base = data.getFTensor0N();
221 auto t_diff_base = data.getFTensor1DiffN<
SPACE_DIM>();
222
223 auto t_w = getFTensor0IntegrationWeight();
224
232
234
235 for (int gg = 0; gg != nbIntegrationPts; gg++) {
236
237 const double r = t_coords(0);
239
242
244
245 t_inertia_force(
i) = (
rho *
alpha) * (t_dot_u(
i));
248 t_convection(
i) = (
rho *
alpha) * (t_u(
j) * t_grad_u(
i,
j));
249
252
253 auto t_nf = getFTensor1FromArray<U_FIELD_DIM, U_FIELD_DIM>(locF);
254
255 t_forces(
i) = t_inertia_force(
i) + t_buoyancy(
i) + t_convection(
i) +
257
258 int bb = 0;
260
261 t_nf(
i) += t_base * t_forces(
i);
262 t_nf(
i) += t_diff_base(
j) * t_stress(
i,
j);
263
264
266 t_nf(0) += (t_base * (
alpha / t_coords(0))) * (2 *
mu * t_u(0) + t_p);
267 }
268
269 ++t_base;
270 ++t_diff_base;
271 ++t_nf;
272 }
273
274 for (; bb < nbRowBaseFunctions; ++bb) {
275 ++t_diff_base;
276 ++t_base;
277 }
278
279 ++t_dot_u;
280 ++t_u;
281 ++t_grad_u;
282 ++t_h;
283 ++t_grad_h;
284 ++t_g;
285 ++t_p;
286
287 ++t_w;
288 ++t_coords;
289 }
290
292 }
Kronecker Delta class symmetric.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
constexpr int U_FIELD_DIM
constexpr CoordinateTypes coord_type
select coordinate system <CARTESIAN, CYLINDRICAL>;
constexpr double rho_diff
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k