Impossible to set up a box 3D convection with periodic boundaries (especially Z)

Dear users

I need to run a thermochemical 3D convection in a box.

However, I receive this error message:

An error occurred in line <2360> of file </home/francesco-radica/Documenti/aspect/source/simulator/helper_functions.cc> in function
    void aspect::Simulator<dim>::check_consistency_of_boundary_conditions() const [with int dim = 3]
The violated condition was: 
    is_element( pb.first.first, boundary_temperature_manager.get_fixed_temperature_boundary_indicators() ) == false && is_element( pb.first.second, boundary_temperature_manager.get_fixed_temperature_boundary_indicators() ) == false && is_element( pb.first.first, boundary_composition_manager.get_fixed_composition_boundary_indicators() ) == false && is_element( pb.first.second, boundary_composition_manager.get_fixed_composition_boundary_indicators() ) == false && is_element( pb.first.first, boundary_indicator_lists[0] ) == false && is_element( pb.first.second, boundary_indicator_lists[0] ) == false && is_element( pb.first.first, boundary_indicator_lists[1] ) == false && is_element( pb.first.second, boundary_indicator_lists[1] ) == false && is_element( pb.first.first, boundary_indicator_lists[3] ) == false && is_element( pb.first.second, boundary_indicator_lists[3] ) == false
Additional information: 
    Periodic boundaries must not have boundary conditions set.

Stacktrace:
-----------
#0  aspect: aspect::Simulator<3>::check_consistency_of_boundary_conditions() const
#1  aspect: aspect::Simulator<3>::Simulator(ompi_communicator_t*, dealii::ParameterHandler&)
#2  aspect: void run_simulator<3>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool)
#3  aspect: main
--------------------------------------------------------

Aborting!

After some tests, the error is given by these lines:

subsection Geometry model
  set Model name = box

  subsection Box
    set X extent = 6000.e3
    set Y extent = 2890.e3
    set Z extent = 6000.e3

    set X periodic = true
    set X repetitions = 1
    set Z periodic = true
    set Z repetitions = 1
  end
end




subsection Boundary temperature model
  set List of model names = box
  set Fixed temperature boundary indicators   = right, left

  subsection Box
    set Right temperature = 3700
    set Top temperature    = 300
  end
end

The error disappears if I delete Z periodic and also if I delete the boundary temperature model.

The point is that I checked the manual, cookbooks, and tests, and there isn’t an example related, so I have no idea how to solve the problem. I think that, even if not explicit, the right and left boundaries are automatically set to 0, and so I get the error for Z.

How can I solve the problem?

Francesco.

Dear Francesco,

The error message tells you that you can’t set boundary conditions (temperature or composition) on periodic boundaries. This is essentially because those boundaries are in the interior of the domain.

So the question you need to answer is: given this constraint, how do you want to set up your model? This is very much a science question, rather than a problem with ASPECT per se. If you need help writing the prm, we can help if you describe your desired model precisely.

Best wishes,
Bob

I just wanted to simulate my termochemical convection in 3D:

The following is in 2d:

I just wanted it in 3D. So I assumed that both X and Z are periodic. It’s like to simulate a portion of our planet in a box, just this…

I also need to setup a mega perturbation to see how a basal layer can act in the upper mantle. In the video you can see what happens in 2D in the final part, but i wanted to explore that in 3D. Because of RAM issues, i can’t check that in a spherical shell, so i opted for a box in way that my RAM can handle that.

(i don’t know if you remember my topic about RAM and 3D models, but 200 Gbs are not enough for my experiment in a spherical shell with 186kk degree of freedom. I’ll respond later to that topic to see if we can solve in a way or in another…)

A few things:

  • By default, the gravity vector is set in the negative z direction (see Gravity model — ASPECT 2.6.0-pre), and it doesn’t look like you change this in your prm, so you want “X” and “Y” periodic, not “X” and “Z”.
  • You have “Fixed temperature boundary indicators = right, left”, but you probably mean “top” and “bottom”
  • In the Box subsection you have “set Right temperature = 3700” and “set Top temperature = 300”. These need to be consistent with the “Fixed temperature boundary indicators” (so Top and Bottom again).

i don’t know if you remember my topic about RAM and 3D models

Yes, I remember. I still suggest getting time on a department / university / national cluster, otherwise you will be endlessly fighting against the limited capabilities of a single desktop machine.