TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_One_Dimensional_Subproblem_Geometry.h
1/****************************************************************************
2* Copyright (c) 2024, 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_One_Dimensional_Subproblem_Geometry_included
17#define IJK_One_Dimensional_Subproblem_Geometry_included
18
19#include <Objet_U.h>
20#include <IJK_Field.h>
21#include <IJK_Interfaces.h>
22#include <FixedVector.h>
23#include <Vecteur3.h>
24#include <IJK_subres_constants.h>
25
26#define INVALID_TEMPERATURE 1e10
27#define INVALID_FIELD 1e10
28#define INVALID_VELOCITY 1e-12
29#define INVALID_INTERP 1.e20
30#define INVALID_INTERP_TEST 1.e19
31#define INVALID_VELOCITY_CFL 1e-20
32#define INVALID_SOURCE_TERM 1e-20
33#define NEIGHBOURS_FIRST_DIR {-1., -1., 1., 1.}
34#define NEIGHBOURS_SECOND_DIR {-1., 1., -1., 1.}
35#define FACES_DIR {0, 0, 1, 1, 2, 2}
36#define FLUX_SIGN_DIFF {-1, -1, -1, -1, -1, -1}
37#define FLUX_SIGN_CONV {1, 1, 1, 1, 1, 1}
38
39
42{
43
44 Declare_instanciable( IJK_One_Dimensional_Subproblem_Geometry ) ;
46
47public :
48
52
54 double find_cell_related_indicator_on_probes(const int& last_index);
55
58
60 double compute_cell_weighting(const double& dx_contrib,
61 const double& dy_contrib,
62 const double& dz_contrib);
63
64
66 double compute_cell_faces_weighting(const double& dx_contrib,
67 const double& dy_contrib,
68 const double& dz_contrib,
69 const int& dir);
70 Vecteur3 compute_relative_vector_cell_faces(const double& dx_contrib,
71 const double& dy_contrib,
72 const double& dz_contrib);
73 double compute_colinearity(const double& dx_contrib,
74 const double& dy_contrib,
75 const double& dz_contrib);
76 double compute_colinearity_cell_faces(const double& dx_contrib,
77 const double& dy_contrib,
78 const double& dz_contrib,
79 const int& dir);
80 double compute_distance_cell_faces(const double& dx_contrib,
81 const double& dy_contrib,
82 const double& dz_contrib);
83
86 void get_maximum_remaining_distance(int& dx_remaining,
87 int& dy_remaining,
88 int& dz_remaining);
89
90protected :
91
92 void compute_vertex_position(const int& vertex_number,
93 const int& face_dir,
94 Vecteur3& bary_vertex,
95 double& distance_vertex_centre,
96 double& tangential_distance_vertex_centre,
97 Vecteur3& tangential_distance_vector_vertex_centre);
98
101 int debug_ = 0;
102
104 double probe_length_ = 0.;
106
112
115
116 int index_i_ = 0, index_j_ = 0, index_k_ = 0;
117
132
133 /*
134 * Identify neighbours cells centre for temperature correction
135 */
144 std::vector<std::vector<std::vector<bool>>> pure_neighbours_to_correct_;
145 std::vector<std::vector<std::vector<double>>> pure_neighbours_corrected_distance_;
146 std::vector<std::vector<std::vector<double>>> pure_neighbours_corrected_colinearity_;
149
151
152 /*
153 * Identify neighbours faces centres for flux correction
154 */
163 std::vector<std::vector<std::vector<std::vector<bool>>>> pure_neighbours_last_faces_to_correct_;
164 std::vector<std::vector<std::vector<std::vector<double>>>> pure_neighbours_last_faces_corrected_distance_;
165 std::vector<std::vector<std::vector<std::vector<double>>>> pure_neighbours_last_faces_corrected_colinearity_;
166
167};
168
169#endif /* IJK_One_Dimensional_Subproblem_Geometry_included */
: class IJK_Interfaces
FixedVector< FixedVector< double, 4 >, 6 > vertices_centres_distance_
double compute_distance_cell_faces(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
FixedVector< FixedVector< double, 4 >, 6 > vertices_centres_tangential_distance_
std::vector< std::vector< std::vector< std::vector< double > > > > pure_neighbours_last_faces_corrected_distance_
double compute_cell_faces_weighting(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib, const int &dir)
void compute_vertex_position(const int &vertex_number, const int &face_dir, Vecteur3 &bary_vertex, double &distance_vertex_centre, double &tangential_distance_vertex_centre, Vecteur3 &tangential_distance_vector_vertex_centre)
std::vector< std::vector< std::vector< double > > > pure_neighbours_corrected_distance_
std::vector< std::vector< std::vector< std::vector< double > > > > pure_neighbours_last_faces_corrected_colinearity_
double compute_cell_weighting(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
FixedVector< FixedVector< Vecteur3, 4 >, 6 > vertices_tangential_distance_vector_
Vecteur3 compute_relative_vector_cell_faces(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
double compute_colinearity_cell_faces(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib, const int &dir)
double compute_colinearity(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
OBS_PTR(Probleme_FTD_IJK_base) ref_ijk_ft_
std::vector< std::vector< std::vector< double > > > pure_neighbours_corrected_colinearity_
std::vector< std::vector< std::vector< std::vector< bool > > > > pure_neighbours_last_faces_to_correct_
void get_maximum_remaining_distance(int &dx_remaining, int &dy_remaining, int &dz_remaining)
std::vector< std::vector< std::vector< bool > > > pure_neighbours_to_correct_
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55