TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Cut_cell_surface_efficace.h
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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 Cut_cell_surface_efficace_included
17#define Cut_cell_surface_efficace_included
18
19#include <IJK_Field_vector.h>
20#include <IJK_Field.h>
21#include <Cut_field.h>
22
23enum class TYPE_SURFACE_EFFICACE_FACE : int
24{
25 NON_INITIALISE, // Valeur non valide
26 EXPLICITE, // Calcul explicite de la surface efficace
27 ALGEBRIQUE_SIMPLE, // Calcul algrebrique simple de la surface efficace
28 CONSERVATION_VOLUME_ITERATIF // Calcul de la surface efficace fonde sur la conservation du volume (methode iterative)
29};
30
31enum class TYPE_SURFACE_EFFICACE_INTERFACE : int
32{
33 NON_INITIALISE, // Valeur non valide
34 EXPLICITE, // Calcul explicite de la surface efficace
35 ALGEBRIQUE_SIMPLE, // Calcul algrebrique simple de la surface efficace
36 CONSERVATION_VOLUME // Calcul de la surface efficace fonde sur la conservation du volume
37};
38
40{
41public:
43 int methode_explicite,
44 const IJK_Field_double& old_indicatrice_ns,
45 const IJK_Field_double& next_indicatrice_ns,
46 const IJK_Field_double& surface_interface_ns_old,
47 const IJK_Field_double& surface_interface_ns_next,
48 const IJK_Field_vector3_double& normal_of_interf_ns_old,
49 const IJK_Field_vector3_double& normal_of_interf_ns_next,
50 DoubleTabFT_cut_cell_vector3& normale_deplacement_interface,
51 DoubleTabFT_cut_cell_scalar& surface_efficace_interface,
52 DoubleTabFT_cut_cell_scalar& surface_efficace_interface_initial);
53
54 static void calcul_vitesse_interface(
55 const IJK_Field_vector3_double& velocity,
56 const IJK_Field_double& old_indicatrice_ns,
57 const IJK_Field_double& next_indicatrice_ns,
58 const IJK_Field_vector3_double& barycentre_phase1_ns_old,
59 const IJK_Field_vector3_double& barycentre_phase1_ns_next,
60 DoubleTabFT_cut_cell_vector3& coord_deplacement_interface,
61 DoubleTabFT_cut_cell_vector3& vitesse_deplacement_interface);
62
64 double timestep,
65 const IJK_Field_vector3_double& velocity,
66 const IJK_Field_double& old_indicatrice_ns,
67 const IJK_Field_double& next_indicatrice_ns,
68 const DoubleTabFT_cut_cell_vector3& vitesse_deplacement_interface,
69 const DoubleTabFT_cut_cell_vector3& normale_deplacement_interface,
70 DoubleTabFT_cut_cell_scalar& surface_efficace_interface);
71
72 // calcul_surface_face_efficace_initiale: version with DoubleTabFT_cut_cell output (use cut-cell structures)
74 int methode_explicite,
75 const IJK_Field_vector3_double& old_indicatrice_surfacique_face_ns,
76 const IJK_Field_vector3_double& next_indicatrice_surfacique_face_ns,
77 DoubleTabFT_cut_cell_vector3& indicatrice_surfacique_efficace_face,
78 DoubleTabFT_cut_cell_vector3& indicatrice_surfacique_efficace_face_initial);
79
80 // calcul_surface_face_efficace_initiale: version with IJK_Field output (does not use cut-cell structures)
82 int methode_explicite,
83 const IJK_Field_vector3_double& old_indicatrice_surfacique_face_ns,
84 const IJK_Field_vector3_double& next_indicatrice_surfacique_face_ns,
85 IJK_Field_vector3_double& indicatrice_surfacique_efficace_face,
86 IJK_Field_vector3_double& indicatrice_surfacique_efficace_face_initial);
87
89 int verbosite_surface_efficace_face,
90 double timestep,
91 const Cut_field_vector3_double& velocity,
92 int& iteration_solver_surface_efficace_face,
93 const IJK_Field_double& old_indicatrice_ns,
94 const IJK_Field_double& next_indicatrice_ns,
95 const IJK_Field_vector3_double& old_indicatrice_surfacique_face_ns,
96 const IJK_Field_vector3_double& next_indicatrice_surfacique_face_ns,
97 DoubleTabFT_cut_cell_vector3& indicatrice_surfacique_efficace_face,
98 const DoubleTabFT_cut_cell_vector3& indicatrice_surfacique_efficace_face_initial,
99 DoubleTabFT_cut_cell_vector6& indicatrice_surfacique_efficace_face_correction,
100 DoubleTabFT_cut_cell_scalar& indicatrice_surfacique_efficace_face_absolute_error);
101
102
104 int verbosite_surface_efficace_interface,
105 double timestep,
106 const IJK_Field_vector3_double& velocity,
107 const IJK_Field_double& old_indicatrice_ns,
108 const IJK_Field_double& next_indicatrice_ns,
109 const DoubleTabFT_cut_cell_scalar& surface_efficace_interface,
110 const DoubleTabFT_cut_cell_scalar& surface_efficace_interface_initial,
111 const DoubleTabFT_cut_cell_vector3& normale_deplacement_interface,
112 const DoubleTabFT_cut_cell_vector3& vitesse_deplacement_interface);
113
115 int verbosite_surface_efficace_face,
116 int iteration_solver_surface_efficace_face,
117 double timestep,
118 const Cut_field_vector3_double& velocity,
119 const IJK_Field_double& old_indicatrice_ns,
120 const IJK_Field_double& next_indicatrice_ns,
121 const DoubleTabFT_cut_cell_vector3& indicatrice_surfacique_efficace_face,
122 const DoubleTabFT_cut_cell_vector3& indicatrice_surfacique_efficace_face_initial);
123
124 static void calcul_delta_volume_theorique_bilan(int compo, const DoubleTab& bounding_box_bulles, double timestep,
125 const IJK_Field_double& indicatrice_avant_deformation,
126 const IJK_Field_double& indicatrice_apres_deformation,
127 const IJK_Field_vector3_double& indicatrice_surfacique_efficace_deformation_face,
128 const Cut_field_vector3_double& deformation_velocity,
129 IJK_Field_double& delta_volume_theorique_bilan);
130};
131
132#endif /* Cut_cell_surface_efficace_included */
static void calcul_surface_interface_efficace(double timestep, const IJK_Field_vector3_double &velocity, const IJK_Field_double &old_indicatrice_ns, const IJK_Field_double &next_indicatrice_ns, const DoubleTabFT_cut_cell_vector3 &vitesse_deplacement_interface, const DoubleTabFT_cut_cell_vector3 &normale_deplacement_interface, DoubleTabFT_cut_cell_scalar &surface_efficace_interface)
static void calcul_surface_interface_efficace_initiale(int methode_explicite, const IJK_Field_double &old_indicatrice_ns, const IJK_Field_double &next_indicatrice_ns, const IJK_Field_double &surface_interface_ns_old, const IJK_Field_double &surface_interface_ns_next, const IJK_Field_vector3_double &normal_of_interf_ns_old, const IJK_Field_vector3_double &normal_of_interf_ns_next, DoubleTabFT_cut_cell_vector3 &normale_deplacement_interface, DoubleTabFT_cut_cell_scalar &surface_efficace_interface, DoubleTabFT_cut_cell_scalar &surface_efficace_interface_initial)
static void imprimer_informations_surface_efficace_interface(int verbosite_surface_efficace_interface, double timestep, const IJK_Field_vector3_double &velocity, const IJK_Field_double &old_indicatrice_ns, const IJK_Field_double &next_indicatrice_ns, const DoubleTabFT_cut_cell_scalar &surface_efficace_interface, const DoubleTabFT_cut_cell_scalar &surface_efficace_interface_initial, const DoubleTabFT_cut_cell_vector3 &normale_deplacement_interface, const DoubleTabFT_cut_cell_vector3 &vitesse_deplacement_interface)
static void calcul_delta_volume_theorique_bilan(int compo, const DoubleTab &bounding_box_bulles, double timestep, const IJK_Field_double &indicatrice_avant_deformation, const IJK_Field_double &indicatrice_apres_deformation, const IJK_Field_vector3_double &indicatrice_surfacique_efficace_deformation_face, const Cut_field_vector3_double &deformation_velocity, IJK_Field_double &delta_volume_theorique_bilan)
static void imprimer_informations_surface_efficace_face(int verbosite_surface_efficace_face, int iteration_solver_surface_efficace_face, double timestep, const Cut_field_vector3_double &velocity, const IJK_Field_double &old_indicatrice_ns, const IJK_Field_double &next_indicatrice_ns, const DoubleTabFT_cut_cell_vector3 &indicatrice_surfacique_efficace_face, const DoubleTabFT_cut_cell_vector3 &indicatrice_surfacique_efficace_face_initial)
static void calcul_vitesse_interface(const IJK_Field_vector3_double &velocity, const IJK_Field_double &old_indicatrice_ns, const IJK_Field_double &next_indicatrice_ns, const IJK_Field_vector3_double &barycentre_phase1_ns_old, const IJK_Field_vector3_double &barycentre_phase1_ns_next, DoubleTabFT_cut_cell_vector3 &coord_deplacement_interface, DoubleTabFT_cut_cell_vector3 &vitesse_deplacement_interface)
static void calcul_surface_face_efficace_initiale(int methode_explicite, const IJK_Field_vector3_double &old_indicatrice_surfacique_face_ns, const IJK_Field_vector3_double &next_indicatrice_surfacique_face_ns, DoubleTabFT_cut_cell_vector3 &indicatrice_surfacique_efficace_face, DoubleTabFT_cut_cell_vector3 &indicatrice_surfacique_efficace_face_initial)
static void calcul_surface_face_efficace_iteratif(int verbosite_surface_efficace_face, double timestep, const Cut_field_vector3_double &velocity, int &iteration_solver_surface_efficace_face, const IJK_Field_double &old_indicatrice_ns, const IJK_Field_double &next_indicatrice_ns, const IJK_Field_vector3_double &old_indicatrice_surfacique_face_ns, const IJK_Field_vector3_double &next_indicatrice_surfacique_face_ns, DoubleTabFT_cut_cell_vector3 &indicatrice_surfacique_efficace_face, const DoubleTabFT_cut_cell_vector3 &indicatrice_surfacique_efficace_face_initial, DoubleTabFT_cut_cell_vector6 &indicatrice_surfacique_efficace_face_correction, DoubleTabFT_cut_cell_scalar &indicatrice_surfacique_efficace_face_absolute_error)