ASPECT
dynamic_core.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2024 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file doc/COPYING. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 
23 #ifndef _aspect_boundary_temperature_dynamic_core_h
24 #define _aspect_boundary_temperature_dynamic_core_h
25 
28 
29 namespace aspect
30 {
31  namespace BoundaryTemperature
32  {
33 
37  namespace internal
38  {
39  struct CoreData
40  {
45  double Qs,Qr,Qg,Qk,Ql;
46 
54  double Es,Er,Eg,Ek,El,Eh;
55 
62  double Ri,Ti,Xi;
63 
67  double Q,H;
68 
72  double dt;
73 
78  double dR_dt,dT_dt,dX_dt;
79 
83  double Q_OES;
84 
86  };
87  }
88 
89 
97  template <int dim>
98  class DynamicCore : public Interface<dim>, public aspect::SimulatorAccess<dim>
99  {
100  public:
104  DynamicCore();
105 
110  void
111  update() override;
112 
116  const internal::CoreData &
117  get_core_data() const;
118 
124  bool
125  is_OES_used() const;
126 
137  double
138  boundary_temperature (const types::boundary_id boundary_indicator,
139  const Point<dim> &location) const override;
140 
148  double
149  minimal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;
150 
158  double
159  maximal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;
160 
165  static
166  void
167  declare_parameters (ParameterHandler &prm);
168 
173  void
174  parse_parameters (ParameterHandler &prm) override;
175 
176  private:
177 
183 
188 
193 
197  double init_dT_dt;
198 
202  double init_dR_dt;
203 
207  double init_dX_dt;
208 
213 
217  double Rc;
218 
222  double CpRho;
223 
227  double X_init;
228 
232  double Delta;
233 
237  double g;
238 
242  double P_CMB;
243 
247  double P_Core;
248 
256  double Tm0;
257  double Tm1;
258  double Tm2;
259  double Theta;
261 
265  bool use_bw11;
266 
267  //Variables for formulation of \cite NPB+04
271  double K0;
272 
276  double Alpha;
277 
281  double Rho_0;
282 
286  double Rho_cen;
287 
291  double Lh;
292 
296  double Rh;
297 
301  double Beta_c;
302 
306  double k_c;
307 
311  double Cp;
312 
317 
321  std::vector<double> heating_rate;
322 
326  std::vector<double> half_life;
327 
331  std::vector<double> initial_concentration;
332 
336  double L;
337  double D;
338 
342  double Mc;
343 
347  unsigned int max_steps;
348 
352  double dTa;
353 
357  std::string name_OES;
359  {
360  double t;
361  double w;
362  };
363  std::vector<struct str_data_OES> data_OES;
364  void read_data_OES();
365  double get_OES(double t) const;
366 
391  bool solve_time_step(double &X, double &T, double &R) const;
392 
397  double get_dT(const double r) const;
398 
403  double get_Tc(const double r) const;
404 
409  double get_Ts(const double r) const;
410 
415  double get_solidus(const double X, const double pressure) const;
416 
421  double get_initial_Ri(const double T) const;
422 
427  double get_X(const double r) const;
428 
432  double get_mass(const double r) const;
433 
437  double fun_Sn(const double B, const double R, const unsigned int n) const;
438 
442  double get_rho(const double r) const;
443 
447  double get_g(const double r) const;
448 
453  double get_T(const double Tc, const double r) const;
454 
458  double get_pressure(const double r) const;
459 
463  double get_gravity_potential(const double r) const;
464 
470  void get_specific_heating(const double Tc, double &Qs, double &Es) const;
471 
476  void get_radio_heating(const double Tc, double &Qr, double &Er) const;
477 
484  void get_gravity_heating(const double Tc, const double r, const double X, double &Qg, double &Eg) const;
485 
490  void get_adiabatic_heating(const double Tc, double &Ek, double &Qk) const;
491 
497  void get_latent_heating(const double Tc, const double r, double &El, double &Ql) const;
498 
503  void get_heat_solution(const double Tc, const double r, const double X, double &Eh) const;
504 
508  double get_radioheating_rate() const;
509 
514  void update_core_data();
515 
516  };
517  }
518 }
519 
520 
521 #endif
std::vector< struct str_data_OES > data_OES
Definition: dynamic_core.h:363
void declare_parameters(ParameterHandler &prm)
std::vector< double > initial_concentration
Definition: dynamic_core.h:331
Definition: compat.h:59