File tree Expand file tree Collapse file tree 3 files changed +21
-35
lines changed
source/simulator/assemblers Expand file tree Collapse file tree 3 files changed +21
-35
lines changed Original file line number Diff line number Diff line change @@ -464,31 +464,13 @@ namespace aspect
464
464
if (enable_prescribed_dilation)
465
465
{
466
466
const unsigned int index_direction=fe.system_to_component_index (i).first ;
467
- // Only want the velocity components and not the pressure one (which is the last one), so add 1
468
- if (introspection.is_stokes_component (index_direction+1 ))
469
- data.local_rhs (i) += (
470
- // RHS of - (div u,q) = - (R,q)
471
- - pressure_scaling
472
- * (prescribed_dilation->dilation_rhs_term [index_direction][q] -
473
- prescribed_dilation->dilation_lhs_term [q] *
474
- scratch.material_model_inputs .pressure [q])
475
- * scratch.phi_p [i]
476
- ) * JxW;
477
- }
478
-
479
- // Only assemble this term if we are running incompressible, otherwise this term
480
- // is already included on the LHS of the equation.
481
- if (enable_prescribed_dilation && !material_model_is_compressible)
482
- {
483
- const unsigned int index_direction=fe.system_to_component_index (i).first ;
484
- // Only want the velocity components and not the pressure one (which is the last one), so add 1
485
- if (introspection.is_stokes_component (index_direction+1 ))
486
- data.local_rhs (i) += (
487
- // RHS of momentum eqn: - \int 2/3 eta R, div v
488
- - 2.0 / 3.0 * eta
489
- * prescribed_dilation->dilation_rhs_term [index_direction][q]
490
- * scratch.div_phi_u [i]
491
- ) * JxW;
467
+ data.local_rhs (i) += (
468
+ - pressure_scaling
469
+ * (prescribed_dilation->dilation_rhs_term [index_direction][q] -
470
+ prescribed_dilation->dilation_lhs_term [q] *
471
+ scratch.material_model_inputs .pressure [q])
472
+ * scratch.phi_p [i]
473
+ ) * JxW;
492
474
}
493
475
}
494
476
Original file line number Diff line number Diff line change @@ -456,12 +456,16 @@ namespace aspect
456
456
const unsigned int index_direction=fe.system_to_component_index (i).first ;
457
457
// Only want the velocity components and not the pressure one (which is the last one), so add 1
458
458
if (introspection.is_stokes_component (index_direction+1 ))
459
- data.local_rhs (i) += (
460
- // RHS of - (div u,q) = - (R,q)
461
- - pressure_scaling
462
- * prescribed_dilation->dilation_rhs_term [index_direction][q]
463
- * scratch.phi_p [i]
464
- ) * JxW;
459
+ {
460
+ const unsigned int index_direction=fe.system_to_component_index (i).first ;
461
+ data.local_rhs (i) += (
462
+ - pressure_scaling
463
+ * (prescribed_dilation->dilation_rhs_term [index_direction][q] -
464
+ prescribed_dilation->dilation_lhs_term [q] *
465
+ scratch.material_model_inputs .pressure [q])
466
+ * scratch.phi_p [i]
467
+ ) * JxW;
468
+ }
465
469
}
466
470
467
471
// Only assemble this term if we are running incompressible, otherwise this term
Original file line number Diff line number Diff line change @@ -207,11 +207,11 @@ namespace aspect
207
207
}
208
208
if (prescribed_dilation)
209
209
{
210
- prescribed_dilation->dilation_rhs_term [i] = x ;
211
- prescribed_dilation->dilation_lhs_term [0 ][i] = 0 . ;
212
- prescribed_dilation->dilation_lhs_term [1 ][i] = 0 . ;
210
+ prescribed_dilation->dilation_lhs_term [i] = 0 ;
211
+ prescribed_dilation->dilation_rhs_term [0 ][i] = x ;
212
+ prescribed_dilation->dilation_rhs_term [1 ][i] = x ;
213
213
if (dim == 3 )
214
- prescribed_dilation->dilation_lhs_term [2 ][i] = 0 . ;
214
+ prescribed_dilation->dilation_rhs_term [2 ][i] = x ;
215
215
}
216
216
217
217
}
You can’t perform that action at this time.
0 commit comments