Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Density approximations #954

Closed
wants to merge 64 commits into from

Conversation

tjhei
Copy link
Member

@tjhei tjhei commented Jun 24, 2016

Allow various different density approximations (BA, EBA, ALA, TALA, full, ...) to be selected in the parameter file.

Note:

  • the assemblers are currently only hacked in
  • right now only formulation=custom is implemented, so each approximation needs to be set manually
  • see this document for more information:
    approx-manual-piece.pdf -- start reading section 2.11. Updated file:
    approx-manual-piece.pdf

tjhei and others added 11 commits June 30, 2016 17:56
Conflicts:

	include/aspect/adiabatic_conditions/interface.h
	include/aspect/simulator.h
	source/adiabatic_conditions/initial_profile.cc
	source/simulator/assembly.cc
	source/simulator/parameters.cc
Conflicts:

	source/adiabatic_conditions/initial_profile.cc
@@ -72,7 +74,10 @@ namespace aspect
MaterialModel::MaterialModelInputs<dim> in(1, n_compositional_fields);
MaterialModel::MaterialModelOutputs<dim> out(1, n_compositional_fields);
in.position[0] = representative_point;
in.temperature[0] = temperatures[i-1];
in.temperature[0] = (this->get_material_model().is_compressible())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to ask if the model uses adiabatic heating instead of if the material model is compressible. I know this would not be consistent with EBA (but for EBA we could always set up its own adiabatic conditions), but it would make a difference in incompressible models with adiabatic heating in our old (full) formulation. With your changes, these models would have a constant temperature in the adiabatic profile, although material would move on an adiabat when it is transported up and down, which means that the average temperature in the model would be very different from the adiabatic profile. In particular, if the density uses adiabatic_conditions, you would want your adiabatic conditions and the temperature in the model to be consistent.
For all other cases (including BA, ALA, TALA), this would not make a difference, and for these models our adiabatic conditions should then also be consistent with what is assumed in the approximations.

}
densities[n_points-1] = densities[n_points-2];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can compute the density like this. If we are going to use the density from the adiabatic conditions in our computations (as reference density), the profile should be correct. Even if we let adiabatic_conditions.temperature() output some constant value when it is not yet initialized (like 0 or the adiabatic surface temperature) the material model would not compute the correct density. I think what we have to do here is something like adding a new function to the interface of AdiabaticConditions (something like initialize_density()), which is called after initialize(), and computes the density profile. We would have to loop over all points again, but we would get the correct reference density profile for all cases.

@tjhei
Copy link
Member Author

tjhei commented Dec 15, 2016

see #1275 .

@tjhei tjhei closed this Dec 15, 2016
@tjhei tjhei deleted the density_approximations branch December 15, 2016 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants