Skip to content

Commit

Permalink
use background field to calculate adiabatic profile
Browse files Browse the repository at this point in the history
  • Loading branch information
RanpengLi committed Jun 4, 2024
1 parent ecc67a9 commit f9b090e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
8 changes: 1 addition & 7 deletions source/adiabatic_conditions/compute_entropy_profile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,13 @@ namespace aspect
in.requested_properties = MaterialModel::MaterialProperties::density | MaterialModel::MaterialProperties::additional_outputs;
in.velocity[0] = Tensor <1,dim> ();
// The entropy along an adiabat is constant (equals the surface entropy)
// TODO : need to make it work for more than one entropy field
// When there are more than one entropy field, we use the background field to compute adiabat profile
// TODO : provide more ways to specify compositional fields like in compute_profile.cc
for (unsigned int i=0; i < this->n_compositional_fields(); ++i)
in.composition[0][i] = 0;

in.composition[0][entropy_indices[0]] = surface_entropy;

if (this->introspection().composition_type_exists(CompositionalFieldDescription::Type::chemical_composition))
{
const std::vector<unsigned int> &chemical_indices = this->introspection().chemical_composition_field_indices();
in.composition[0][chemical_indices[0]] = 1;
}

// Check whether gravity is pointing up / out or down / in. In the normal case it should
// point down / in and therefore gravity should be positive, leading to increasing
// adiabatic pressures and temperatures with depth. In some cases it will point up / out
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f9b090e

Please sign in to comment.