Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jdannberg committed Jun 26, 2018
1 parent 7a51cfc commit 9e6da5a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/aspect/simulator.h
Expand Up @@ -1194,7 +1194,7 @@ namespace aspect
LinearAlgebra::BlockVector &tmp_distributed_stokes);

/**
* Offset the boundary id of all faces located on an outflow bounday
* Offset the boundary id of all faces located on an outflow boundary
* by a fixed value given by the input parameter
* @param boundary_id_offset.
*
Expand All @@ -1210,7 +1210,7 @@ namespace aspect
* This function is implemented in
* <code>source/simulator/helper_functions.cc</code>.
*/
void reset_outflow_boundary_ids(const unsigned int boundary_id_offset);
void restore_outflow_boundary_ids(const unsigned int boundary_id_offset);

/**
* Remove the linear momentum of the given vector
Expand Down
15 changes: 13 additions & 2 deletions source/boundary_composition/interface.cc
Expand Up @@ -331,11 +331,22 @@ namespace aspect
"When the composition is fixed on a given boundary as determined "
"by the list of 'Fixed composition boundary indicators', there "
"might be parts of the boundary where material flows out and "
"one may want to prescribe the composition only on the parts of "
"one may want to prescribe the composition only on those parts of "
"the boundary where there is inflow. This parameter determines "
"if compositions are only prescribed at these inflow parts of the "
"boundary (if false) or everywhere on a given boundary, independent "
"of the flow direction (if true).");
"of the flow direction (if true)."
"Mathematically speaking, the compositional fields satisfy an "
"advection equation that has no diffusion. For this equation, one "
"can only impose Dirichlet boundary conditions (i.e., prescribe a "
"fixed compositional field value at the boundary) at those boundaries "
"where material flows in. This would correspond to the ``false'' "
"setting of this parameter, which is correspondingly the default. "
"On the other hand, on a finite dimensional discretization such as "
"the one one obtains from the finite element method, it is possible "
"to also prescribe values on outflow boundaries, even though this may "
"make no physical sense. This would then correspond to the ``true'' "
"setting of this parameter.");
}
prm.leave_subsection ();

Expand Down
14 changes: 13 additions & 1 deletion source/boundary_temperature/interface.cc
Expand Up @@ -362,7 +362,19 @@ namespace aspect
"the boundary where there is inflow. This parameter determines "
"if temperatures are only prescribed at these inflow parts of the "
"boundary (if false) or everywhere on a given boundary, independent "
"of the flow direction (if true).");
"of the flow direction (if true)."
"Mathematically speaking, the temperature satisfies an "
"advection-diffusion equation. For this type of equation, one can "
"prescribe the temperature even on outflow boundaries as long as the "
"diffusion coefficient is nonzero. This would correspond to the "
"``true'' setting of this parameter, which is correspondingly the "
"default. In practice, however, this would only make physical sense "
"if the diffusion coefficient is actually quite large to prevent "
"the creation of a boundary layer. "
"In addition, if there is no diffusion, one can only impose "
"Dirichlet boundary conditions (i.e., prescribe a fixed temperature "
"value at the boundary) at those boundaries where material flows in. "
"This would correspond to the ``false'' setting of this parameter.");
}
prm.leave_subsection ();

Expand Down
4 changes: 2 additions & 2 deletions source/simulator/core.cc
Expand Up @@ -744,7 +744,7 @@ namespace aspect
}

if (!boundary_temperature_manager.allows_fixed_temperature_on_outflow_boundaries())
reset_outflow_boundary_ids(boundary_id_offset);
restore_outflow_boundary_ids(boundary_id_offset);

// If there are fixed boundary compositions,
// update the composition boundary condition.
Expand Down Expand Up @@ -784,7 +784,7 @@ namespace aspect
}

if (!boundary_composition_manager.allows_fixed_composition_on_outflow_boundaries())
reset_outflow_boundary_ids(boundary_id_offset);
restore_outflow_boundary_ids(boundary_id_offset);

// let plugins add more constraints if they so choose, then close the
// constraints object
Expand Down
2 changes: 1 addition & 1 deletion source/simulator/helper_functions.cc
Expand Up @@ -1872,7 +1872,7 @@ namespace aspect

template <int dim>
void
Simulator<dim>::reset_outflow_boundary_ids(const unsigned int offset)
Simulator<dim>::restore_outflow_boundary_ids(const unsigned int offset)
{
// Loop over all of the boundary faces...
typename DoFHandler<dim>::active_cell_iterator
Expand Down

0 comments on commit 9e6da5a

Please sign in to comment.