TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_Thermal_Onefluid.h
1/****************************************************************************
2* Copyright (c) 2023, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef IJK_Thermal_Onefluid_included
17#define IJK_Thermal_Onefluid_included
18
19#include <IJK_Thermal_base.h>
20#include <IJK_Field_vector.h>
21#include <IJK_Field.h>
22#include <Boundary_Conditions_Thermique.h>
23#include <Domaine_IJK.h>
24#include <IJK_Field.h>
25#include <Parser.h>
26#include <IJK_Lata_writer.h>
27#include <OpConvQuickIJKScalar.h>
28#include <OpConvCentre2IJKScalar.h>
29#include <Ouvrir_fichier.h>
30#include <Corrige_flux_FT_base.h>
31#include <TRUST_Ref.h>
32#include <Operateur_IJK_elem_diff_base.h>
33#include <OpConvAmontIJK.h>
34#include <OpConvDiscQuickIJKScalar.h>
35#include <OpConvCentre4IJK.h>
36
37/////////////////////////////////////////////////////////////////////////////
38//
39// .DESCRIPTION : class IJK_Thermal_Onefluid
40//
41// <Description of class IJK_Thermal_Onefluid>
42//
43/////////////////////////////////////////////////////////////////////////////
44
45
47{
48
49 Declare_instanciable( IJK_Thermal_Onefluid ) ;
50
51public :
52
53 void initialize(const Domaine_IJK& splitting) override;
54
55 void update_thermal_properties() override;
56 void set_param( Param& param ) const override;
57 virtual void euler_rustine_step(const double timestep) override;
58 virtual void rk3_rustine_sub_step(const int rk_step, const double total_timestep,
59 const double fractionnal_timestep, const double time) override;
60 void euler_rustine_step(const double timestep, const double dE);
61 void rk3_rustine_sub_step(const int rk_step, const double total_timestep,
62 const double fractionnal_timestep, const double time, const double dE);
63 void compute_temperature_convection_conservative(const IJK_Field_vector3_double& velocity) override ;
64
65protected :
66 void compute_dT_rustine(const double dE);
67 void compute_T_rust(const IJK_Field_vector3_double& velocity);
68
69 void add_temperature_diffusion() override;
70 void compute_diffusion_increment() override;
71 /* correct_temperature_for_eulerian_fluxes() May be clearly overridden later */
73 double get_rho_cp_ijk(int i, int j, int k) const;
74 double get_rho_cp_u_ijk(const IJK_Field_double& vx, int i, int j, int k) const override;
75 double compute_rho_cp_u_mean(const IJK_Field_double& vx) override;
76 double get_div_lambda_ijk(int i, int j, int k) const override;
77 double compute_temperature_dimensionless_theta_mean(const IJK_Field_double& vx) override;
78
79 //Rustine
80 double E0_ = 0;//volumique
81
82 bool deprecated_rho_cp_ = false;
84 bool lambda_moy_arith_ = false;
85
86
87 IJK_Field_double T_rust_;
88 IJK_Field_double d_T_rustine_; // Temperature increment to conserve the energy.
89 IJK_Field_double RK3_F_rustine_; // Temporary storage for substeps in the RK3 algorithm for the rustine calculation.
90 IJK_Field_double div_rho_cp_T_;
91 IJK_Field_double lambda_;
92 IJK_Field_double cp_;
93 IJK_Field_double rho_cp_inv_;
94
95
96};
97
98#endif /* IJK_Thermal_Onefluid_included */
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
IJK_Field_double d_T_rustine_
void set_param(Param &param) const override
double get_rho_cp_u_ijk(const IJK_Field_double &vx, int i, int j, int k) const override
void add_temperature_diffusion() override
virtual void rk3_rustine_sub_step(const int rk_step, const double total_timestep, const double fractionnal_timestep, const double time) override
double get_rho_cp_ijk(int i, int j, int k) const
void compute_diffusion_increment() override
void initialize(const Domaine_IJK &splitting) override
IJK_Field_double RK3_F_rustine_
double get_div_lambda_ijk(int i, int j, int k) const override
void compute_dT_rustine(const double dE)
void update_thermal_properties() override
double compute_rho_cp_u_mean(const IJK_Field_double &vx) override
virtual void euler_rustine_step(const double timestep) override
IJK_Field_double div_rho_cp_T_
IJK_Field_double rho_cp_inv_
void compute_T_rust(const IJK_Field_vector3_double &velocity)
double compute_temperature_dimensionless_theta_mean(const IJK_Field_double &vx) override
void compute_temperature_convection_conservative(const IJK_Field_vector3_double &velocity) override
void correct_temperature_for_eulerian_fluxes() override
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112