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 
116  double boundary_temperature (const types::boundary_id boundary_indicator,
117  const Point<dim> &location) const override;
118 
126  double minimal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;
127 
135  double maximal_temperature (const std::set<types::boundary_id> &fixed_boundary_ids) const override;
136 
141  static
142  void
143  declare_parameters (ParameterHandler &prm);
144 
149  void
150  parse_parameters (ParameterHandler &prm) override;
151 
156  void update() override;
157 
161  const internal::CoreData &
162  get_core_data() const;
163 
169  bool
170  is_OES_used() const;
171 
172 
173  private:
174 
180 
185 
190 
194  double init_dT_dt;
195 
199  double init_dR_dt;
200 
204  double init_dX_dt;
205 
210 
214  double Rc;
215 
219  double CpRho;
220 
224  double X_init;
225 
229  double Delta;
230 
234  double g;
235 
239  double P_CMB;
240 
244  double P_Core;
245 
253  double Tm0;
254  double Tm1;
255  double Tm2;
256  double Theta;
258 
262  bool use_bw11;
263 
264  //Variables for formulation of \cite NPB+04
268  double K0;
269 
273  double Alpha;
274 
278  double Rho_0;
279 
283  double Rho_cen;
284 
288  double Lh;
289 
293  double Rh;
294 
298  double Beta_c;
299 
303  double k_c;
304 
308  double Cp;
309 
314 
318  std::vector<double> heating_rate;
319 
323  std::vector<double> half_life;
324 
328  std::vector<double> initial_concentration;
329 
333  double L;
334  double D;
335 
339  double Mc;
340 
345 
349  double dTa;
350 
354  std::string name_OES;
356  {
357  double t;
358  double w;
359  };
360  std::vector<struct str_data_OES> data_OES;
361  void read_data_OES();
362  double get_OES(double t) const;
363 
364 
365 
391  bool solve_time_step(double &X, double &T, double &R);
392 
397  double get_dT(double r) const;
398 
403  double get_Tc(double r) const;
404 
409  double get_Ts(double r) const;
410 
414  double get_solidus(double X,double p) const;
415 
419  double get_initial_Ri(double T);
420 
425  double get_X(double r) const;
426 
430  double get_Mass(double r) const;
431 
435  double fun_Sn(double B,double R,double n) const;
436 
440  double get_Rho(double r) const;
441 
445  double get_g(double r) const;
446 
451  double get_T(double Tc, double r) const;
452 
456  double get_Pressure(double r) const;
457 
461  double get_gravity_potential(double r) const;
462 
468  void get_specific_heating(double Tc, double &Qs,double &Es);
469 
474  void get_radio_heating(double Tc, double &Qr, double &Er);
475 
481  void get_gravity_heating(double Tc, double r,double X,double &Qg,double &Eg);
482 
487  void get_adiabatic_heating(double Tc, double &Ek, double &Qk);
488 
494  void get_latent_heating(double Tc, double r, double &El, double &Ql);
495 
499  void get_heat_solution(double Tc, double r, double X, double &Eh);
500 
504  double get_radioheating_rate() const;
505 
510  void update_core_data();
511 
512  };
513  }
514 }
515 
516 
517 #endif
std::vector< struct str_data_OES > data_OES
Definition: dynamic_core.h:360
void declare_parameters(ParameterHandler &prm)
std::vector< double > initial_concentration
Definition: dynamic_core.h:328
Definition: compat.h:59