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
Conversation
Conflicts: doc/manual/manual.bib doc/manual/manual.tex
fe3a18d
to
c596a6d
Compare
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()) |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
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.
Conflicts: benchmark/king2dcompressible/ala/ala.prm
- remove buoyancy approximation setting - introduce "adiabatic density" setting for the mass formulation - change mass formulation "adiabatic" to use adiabatic density gradient
see #1275 . |
Allow various different density approximations (BA, EBA, ALA, TALA, full, ...) to be selected in the parameter file.
Note:
approx-manual-piece.pdf -- start reading section 2.11. Updated file:
approx-manual-piece.pdf