TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Post_Processing_Hydrodynamic_Forces_Stokes.h
1/****************************************************************************
2* Copyright (c) 2025, 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 Post_Processing_Hydrodynamic_Forces_Stokes_included
17#define Post_Processing_Hydrodynamic_Forces_Stokes_included
18
19#include <Post_Processing_Hydrodynamic_Forces.h>
20
22{
23 Declare_instanciable_with_param(Post_Processing_Hydrodynamic_Forces_Stokes);
24
25public:
26 void compute_hydrodynamic_forces() override;
27 void set_param(const Post_Processing_Hydrodynamic_Forces& post_process_hydro_forces_);
28
29 const DoubleTab& get_pressure_force_Stokes_th() const { return total_pressure_force_Stokes_th_; }
30 const DoubleTab& get_friction_force_Stokes_th() const { return total_friction_force_Stokes_th_; }
31 const DoubleTab& get_pressure_force_Stokes_th_fa7() const { return pressure_force_Stokes_th_fa7_; }
32 const DoubleTab& get_friction_force_Stokes_th_fa7() const { return friction_force_Stokes_th_fa7_; }
33
34 void resize_and_init_tables(int nb_particles_tot) override;
35 const DoubleTab& get_sigma_xx_fa7_Stokes_th() const { return sigma_xx_fa7_Stokes_th_; }
36 const DoubleTab& get_sigma_xy_fa7_Stokes_th() const { return sigma_xy_fa7_Stokes_th_; }
37 const DoubleTab& get_sigma_xz_fa7_Stokes_th() const { return sigma_xz_fa7_Stokes_th_; }
38 const DoubleTab& get_sigma_yy_fa7_Stokes_th() const { return sigma_yy_fa7_Stokes_th_; }
39 const DoubleTab& get_sigma_yz_fa7_Stokes_th() const { return sigma_yz_fa7_Stokes_th_; }
40 const DoubleTab& get_sigma_zz_fa7_Stokes_th() const { return sigma_zz_fa7_Stokes_th_; }
41 const DoubleTab& get_dUdx_P1_Stokes_th() { return dUdx_P1_Stokes_th_; }
42 const DoubleTab& get_dUdz_P1_Stokes_th() { return dUdz_P1_Stokes_th_; }
43 const DoubleTab& get_dVdz_P1_Stokes_th() { return dVdz_P1_Stokes_th_; }
44 const DoubleTab& get_dWdx_P1_Stokes_th() { return dWdx_P1_Stokes_th_; }
45 const DoubleTab& get_dWdy_P1_Stokes_th() { return dWdy_P1_Stokes_th_; }
46 const DoubleTab& get_dWdz_P1_Stokes_th() { return dWdz_P1_Stokes_th_; }
47 const DoubleTab& get_dUdx_P2_Stokes_th() { return dUdx_P2_Stokes_th_; }
48 const DoubleTab& get_dUdz_P2_Stokes_th() { return dUdz_P2_Stokes_th_; }
49 const DoubleTab& get_dVdz_P2_Stokes_th() { return dVdz_P2_Stokes_th_; }
50 const DoubleTab& get_dWdx_P2_Stokes_th() { return dWdx_P2_Stokes_th_; }
51 const DoubleTab& get_dWdy_P2_Stokes_th() { return dWdy_P2_Stokes_th_; }
52 const DoubleTab& get_dWdz_P2_Stokes_th() { return dWdz_P2_Stokes_th_; }
53 const DoubleTab& get_U_P1_Stokes_th() const { return U_P1_Stokes_th_; }
54 const DoubleTab& get_U_P2_Stokes_th() const { return U_P2_Stokes_th_; }
55 const DoubleVect& get_pressure_fa7_Stokes_th() const { return pressure_fa7_Stokes_th_; };
56
57protected:
58 void resize_data_fa7(int nb_fa7) override;
59 void resize_sigma(int nb_fa7) override;
60 void resize_gradU_P1(int nb_fa7) override;
61 void resize_gradU_P2(int nb_fa7) override;
65 void compute_UP1_UP2_Stokes(int fa7,double vinf_Stokes,
66 double particle_radius, double phi_mu);
67 double compute_pressure_interf(double x, double y, double z);
68 double compute_Stokes_Ux_fluid(double x, double y, double z,
69 double vinf_Stokes, double particle_radius, double phi_mu);
70 double compute_Stokes_Uy_fluid(double x, double y, double z,
71 double vinf_Stokes, double particle_radius, double phi_mu);
72 double compute_Stokes_Uz_fluid(double x, double y, double z,
73 double vinf_Stokes, double particle_radius, double phi_mu);
74
75 const double& get_vinf_Stokes() const { return vinf_Stokes_; }
76
77 void compute_neighbors_coordinates_fluid_fa7(const int nb_fa7,
78 const int is_discr_elem_diph,
79 const DoubleTab& gravity_center_fa7,
80 const Maillage_FT_Disc& mesh,
81 const DoubleTab& tab_fa7_normal,
82 const IntTab& particles_eulerian_id_number) override;
83
85 const Maillage_FT_Disc& mesh,
87 Thermal_correction_discretization_method
88 dummy_value,
89 const IntVect& compo_connexes_fa7,
90 const ArrOfDouble& fa7_surface,
91 const DoubleTab& tab_fa7_normal) override;
92
94 const Maillage_FT_Disc& mesh,
95 const IntVect& compo_connexes_fa7,
96 const ArrOfDouble& fa7_surface,
97 const DoubleTab& tab_fa7_normal) override;
98
100 const Maillage_FT_Disc& mesh,
101 const IntVect& compo_connexes_fa7,
102 const ArrOfDouble& fa7_surface,
103 const DoubleTab& tab_fa7_normal) override;
104
105 double compute_dUdx_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7,
106 double r_fa7, double phi_mu, double particle_radius);
107 double compute_dUdz_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7,
108 double r_fa7, double phi_mu, double particle_radius);
109 double compute_dVdz_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7,
110 double r_fa7, double phi_mu, double particle_radius);
111 double compute_dWdx_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7,
112 double r_fa7, double phi_mu, double particle_radius);
113 double compute_dWdy_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7,
114 double r_fa7, double phi_mu, double particle_radius);
115 double compute_dWdz_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7,
116 double r_fa7, double phi_mu, double particle_radius);
117
118 void fill_gradU_P1_Stokes_th(int fa7, double phi_mu, double particle_radius);
119 void fill_gradU_P2_Stokes_th(int fa7, double phi_mu, double particle_radius);
120 void fill_sigma_Stokes_th(int fa7);
121
122
123
124private:
125 double vinf_Stokes_;
126
127 DoubleTab total_pressure_force_Stokes_th_;
128 DoubleTab total_friction_force_Stokes_th_;
129 DoubleVect pressure_fa7_Stokes_th_;
130
131 DoubleTab pressure_force_Stokes_th_fa7_;
132 DoubleTab friction_force_Stokes_th_fa7_;
133
134 DoubleTab sigma_xx_fa7_Stokes_th_;
135 DoubleTab sigma_xy_fa7_Stokes_th_;
136 DoubleTab sigma_xz_fa7_Stokes_th_;
137 DoubleTab sigma_yy_fa7_Stokes_th_;
138 DoubleTab sigma_yz_fa7_Stokes_th_;
139 DoubleTab sigma_zz_fa7_Stokes_th_;
140
141 DoubleTab dUdx_P1_Stokes_th_;
142 DoubleTab dUdz_P1_Stokes_th_;
143 DoubleTab dVdz_P1_Stokes_th_;
144 DoubleTab dWdx_P1_Stokes_th_;
145 DoubleTab dWdy_P1_Stokes_th_;
146 DoubleTab dWdz_P1_Stokes_th_;
147 DoubleTab dUdx_P2_Stokes_th_;
148 DoubleTab dUdz_P2_Stokes_th_;
149 DoubleTab dVdz_P2_Stokes_th_;
150 DoubleTab dWdx_P2_Stokes_th_;
151 DoubleTab dWdy_P2_Stokes_th_;
152 DoubleTab dWdz_P2_Stokes_th_;
153
154 DoubleTab U_P1_Stokes_th_;
155 DoubleTab U_P2_Stokes_th_;
156};
157
158#endif
: class Maillage_FT_Disc Cette classe decrit un maillage:
void compute_UP1_UP2_Stokes(int fa7, double vinf_Stokes, double particle_radius, double phi_mu)
void compute_friction_force_complet_tensor(int nb_fa7, const Maillage_FT_Disc &mesh, const IntVect &compo_connexes_fa7, const ArrOfDouble &fa7_surface, const DoubleTab &tab_fa7_normal) override
double compute_dWdy_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7, double r_fa7, double phi_mu, double particle_radius)
double compute_Stokes_Uy_fluid(double x, double y, double z, double vinf_Stokes, double particle_radius, double phi_mu)
double compute_dWdx_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7, double r_fa7, double phi_mu, double particle_radius)
double compute_dVdz_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7, double r_fa7, double phi_mu, double particle_radius)
double compute_dUdx_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7, double r_fa7, double phi_mu, double particle_radius)
void fill_gradU_P1_Stokes_th(int fa7, double phi_mu, double particle_radius)
void compute_friction_force_projected_tensor(int nb_fa7, const Maillage_FT_Disc &mesh, const IntVect &compo_connexes_fa7, const ArrOfDouble &fa7_surface, const DoubleTab &tab_fa7_normal) override
double compute_Stokes_Ux_fluid(double x, double y, double z, double vinf_Stokes, double particle_radius, double phi_mu)
void set_param(const Post_Processing_Hydrodynamic_Forces &post_process_hydro_forces_)
double compute_dWdz_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7, double r_fa7, double phi_mu, double particle_radius)
double compute_dUdz_Stokes_th(int fa7, double x_fa7, double y_fa7, double z_fa7, double r_fa7, double phi_mu, double particle_radius)
void fill_gradU_P2_Stokes_th(int fa7, double phi_mu, double particle_radius)
void compute_neighbors_coordinates_fluid_fa7(const int nb_fa7, const int is_discr_elem_diph, const DoubleTab &gravity_center_fa7, const Maillage_FT_Disc &mesh, const DoubleTab &tab_fa7_normal, const IntTab &particles_eulerian_id_number) override
void compute_pressure_force_trilinear_linear(int nb_fa7, const Maillage_FT_Disc &mesh, Convection_Diffusion_Temperature_FT_Disc::Thermal_correction_discretization_method dummy_value, const IntVect &compo_connexes_fa7, const ArrOfDouble &fa7_surface, const DoubleTab &tab_fa7_normal) override
double compute_Stokes_Uz_fluid(double x, double y, double z, double vinf_Stokes, double particle_radius, double phi_mu)