LCOV - code coverage report
Current view: top level - src/Integrator - Flame.H (source / functions) Coverage Total Hit
Test: coverage_merged.info Lines: 100.0 % 9 9
Test Date: 2025-02-27 04:17:48 Functions: 66.7 % 3 2

            Line data    Source code
       1              : #ifndef INTEGRATOR_FLAME_H
       2              : #define INTEGRATOR_FLAME_H
       3              : 
       4              : #include <string>
       5              : #include <limits>
       6              : #include <memory>
       7              : 
       8              : #include "Util/Util.H"
       9              : #include "Integrator/Integrator.H"
      10              : #include "Integrator/Mechanics.H"
      11              : #include "BC/BC.H"
      12              : #include "IC/Voronoi.H"
      13              : #include "IC/IC.H"
      14              : #include "IC/Wedge.H"
      15              : #include "IC/Constant.H"
      16              : #include "IC/Expression.H"
      17              : #include "IC/PSRead.H" 
      18              : #include "Set/Set.H"
      19              : #include "Model/Solid/Affine/Isotropic.H"
      20              : #include "Model/Solid/Finite/NeoHookeanPredeformed.H"
      21              : #include "IO/ParmParse.H"
      22              : #include "BC/Operator/Elastic/Constant.H"
      23              : #include "Solver/Nonlocal/Newton.H"
      24              : 
      25              : 
      26              : 
      27              : namespace Integrator
      28              : {
      29              : 
      30              : class Flame : virtual public Integrator::Integrator,
      31              :     virtual public Base::Mechanics<Model::Solid::Finite::NeoHookeanPredeformed>
      32              : {
      33              : 
      34              :     using model_type = Model::Solid::Finite::NeoHookeanPredeformed;
      35              : 
      36              : public:
      37              :     Flame();
      38              :     Flame(IO::ParmParse& pp);
      39              : 
      40              :     static void Parse(Flame& value, IO::ParmParse& pp);
      41              : 
      42            6 :     virtual ~Flame()
      43            3 :     {
      44            3 :         delete ic_eta;
      45            3 :         delete ic_phi;
      46            3 :         delete thermal.ic_temp;
      47            3 :         delete ic_laser;
      48            3 :         delete bc_eta;
      49            3 :         delete bc_temp;
      50            6 :     }
      51              : 
      52              : protected:
      53              :     void Initialize(int lev) override;
      54              :     void TimeStepBegin(Set::Scalar a_time, int a_iter) override;
      55              :     void TimeStepComplete(Set::Scalar a_time, int a_iter) override;
      56              :     void Advance(int lev, Set::Scalar time, Set::Scalar dt) override;
      57              :     void TagCellsForRefinement(int lev, amrex::TagBoxArray& tags, amrex::Real /*time*/, int /*ngrow*/) override;
      58              :     void Regrid(int lev, Set::Scalar time) override;
      59              :     void Integrate(int amrlev, Set::Scalar time, int step,
      60              :         const amrex::MFIter& mfi, const amrex::Box& box) override;
      61              :     void UpdateModel(int a_step, Set::Scalar a_time) override;
      62              : private:
      63              : 
      64              :     Set::Field<Set::Scalar> temp_mf;
      65              :     Set::Field<Set::Scalar> temp_old_mf;
      66              :     Set::Field<Set::Scalar> temps_mf;
      67              :     Set::Field<Set::Scalar> temps_old_mf;
      68              : 
      69              :     Set::Field<Set::Scalar> eta_mf;
      70              :     Set::Field<Set::Scalar> eta_old_mf;
      71              :     Set::Field<Set::Scalar> mob_mf;
      72              :     Set::Field<Set::Scalar> mdot_mf;
      73              : 
      74              :     Set::Field<Set::Scalar> phi_mf;
      75              :     Set::Field<Set::Scalar> field;
      76              :     Set::Field<Set::Scalar> alpha_mf;
      77              :     Set::Field<Set::Scalar> heatflux_mf;
      78              : 
      79              :     Set::Field<Set::Scalar> laser_mf;
      80              : 
      81              :     BC::BC<Set::Scalar>* bc_temp = nullptr;
      82              :     BC::BC<Set::Scalar>* bc_eta = nullptr;
      83              :     IC::IC<Set::Scalar>* ic_phi = nullptr;
      84              :     IC::IC<Set::Scalar>* ic_laser = nullptr;
      85              : 
      86              :     Set::Scalar phi_refinement_criterion = std::numeric_limits<Set::Scalar>::infinity();
      87              :     Set::Scalar m_refinement_criterion = NAN;
      88              :     Set::Scalar t_refinement_criterion = NAN;
      89              :     Set::Scalar t_refinement_restriction = NAN;
      90              :     Set::Scalar zeta = NAN;
      91              :     Set::Scalar zeta_0 =NAN;
      92              :     Set::Scalar small = NAN;
      93              :     Set::Scalar base_time = NAN;
      94              :     IC::IC<Set::Scalar>* ic_eta = nullptr;
      95              :     int ghost_count = -1;
      96              :     int homogeneousSystem = -1;
      97              :     bool plot_field = true;
      98              :     int variable_pressure = -1;
      99              : 
     100              :     struct {
     101              :         Set::Scalar gamma = NAN;
     102              :         Set::Scalar eps = NAN;
     103              :         Set::Scalar lambda = NAN;
     104              :         Set::Scalar kappa = NAN;
     105              :         Set::Scalar w1 = NAN, w12 = NAN, w0 = NAN;
     106              :         Set::Scalar min_eta = 0.001;
     107              :         int evolve = 1;
     108              :     } pf;
     109              : 
     110              :     struct {
     111              :         Set::Scalar P = 1.0;
     112              :         Set::Scalar gamma = 1.4;
     113              :         Set::Scalar Energy = 1;
     114              : 
     115              :         struct {
     116              :             Set::Scalar a1 = NAN, a2 = NAN, a3 = NAN;
     117              :             Set::Scalar b1 = NAN, b2 = NAN, b3 = NAN;
     118              :             Set::Scalar c1 = NAN;
     119              :             int mob_ap = 0;
     120              :             int dependency = 1;
     121              :             Set::Scalar h1 = 1.81, h2 = 1.34;
     122              : 
     123              :         } arrhenius;
     124              :         struct {
     125              :             Set::Scalar r_ap = NAN, r_htpb = NAN, r_comb = NAN;
     126              :             Set::Scalar n_ap = NAN, n_htpb = NAN, n_comb = NAN;
     127              :             Set::Scalar a_fit = 0.0, b_fit = 0.0, c_fit = 0.0;
     128              :         } power;
     129              :     } pressure;
     130              : 
     131              :     struct {
     132              :         bool on = 0;
     133              :         Set::Scalar rho_ap, rho_htpb;
     134              :         Set::Scalar k_ap, k_htpb;
     135              :         Set::Scalar cp_ap, cp_htpb;
     136              :         Set::Scalar q0 = NAN;
     137              :         Set::Scalar bound = NAN;
     138              :         Set::Scalar m_ap, m_htpb, m_comb;
     139              :         Set::Scalar E_ap, E_htpb;
     140              :         Set::Scalar hc = NAN, w1 = NAN;
     141              :         Set::Scalar modeling_ap = NAN, modeling_htpb = NAN;
     142              :         Set::Scalar mlocal_ap = NAN, mlocal_htpb = NAN, mlocal_comb = NAN;
     143              :         Set::Scalar T_fluid = NAN;
     144              :         Set::Scalar massfraction = NAN;
     145              :         Set::Scalar disperssion1 = NAN;
     146              :         Set::Scalar disperssion2 = NAN;
     147              :         Set::Scalar disperssion3 = NAN;
     148              :         IC::IC<Set::Scalar>* ic_temp = nullptr;
     149              :     } thermal;
     150              : 
     151              :     struct {
     152              :         int on = 0;
     153              :         Set::Scalar Tref = NAN;
     154              :         model_type model_ap, model_htpb;
     155              :         Set::Scalar traction = NAN;
     156              :         int phirefinement = -1;
     157              :     } elastic;
     158              : 
     159              :     // Integrated variables
     160              :     Set::Scalar volume = 0.0;
     161              :     Set::Scalar area = 0.0;
     162              :     Set::Scalar chamber_area = 0.0;
     163              :     Set::Scalar chamber_pressure = 1.0;
     164              :     Set::Scalar massflux = 0.00000001;
     165              : 
     166              :     Set::Scalar x_len = NAN;
     167              :     Set::Scalar y_len = NAN;
     168              : 
     169              :     BC::BC<Set::Scalar>* bc_psi = nullptr;
     170              : };
     171              : }
     172              : 
     173              : #endif
        

Generated by: LCOV version 2.0-1