16#ifndef IJK_Navier_Stokes_tools_included
17#define IJK_Navier_Stokes_tools_included
24double compute_fractionnal_timestep_rk3(
const double dt_tot,
int step);
26void compute_divergence_times_constant(
const IJK_Field_double& vx,
const IJK_Field_double& vy,
const IJK_Field_double& vz,
27 const double constant, IJK_Field_double& resu);
29void compute_divergence(
const IJK_Field_double& vx,
const IJK_Field_double& vy,
const IJK_Field_double& vz,
30 IJK_Field_double& resu);
32void add_gradient_times_constant(
const IJK_Field_double& pressure,
const double constant,
33 IJK_Field_double& vx, IJK_Field_double& vy, IJK_Field_double& vz);
35void add_gradient_times_constant_over_rho(
const IJK_Field_double& pressure,
const IJK_Field_double& rho,
const double constant,
36 IJK_Field_double& vx, IJK_Field_double& vy, IJK_Field_double& vz);
37void add_gradient_times_constant_times_inv_rho(
const IJK_Field_double& pressure,
const IJK_Field_double& inv_rho,
const double constant,
38 IJK_Field_double& vx, IJK_Field_double& vy, IJK_Field_double& vz);
40void pressure_projection(IJK_Field_double& vx, IJK_Field_double& vy, IJK_Field_double& vz,
41 IJK_Field_double& pressure,
double dt,
42 IJK_Field_double& pressure_rhs,
45void pressure_projection_with_rho(
const IJK_Field_double& rho,
46 IJK_Field_double& vx, IJK_Field_double& vy, IJK_Field_double& vz,
47 IJK_Field_double& pressure,
double dt,
48 IJK_Field_double& pressure_rhs,
51void pressure_projection_with_inv_rho(
const IJK_Field_double& rho,
52 IJK_Field_double& vx, IJK_Field_double& vy, IJK_Field_double& vz,
53 IJK_Field_double& pressure,
double dt,
54 IJK_Field_double& pressure_rhs,
57void forward_euler_update(
const IJK_Field_double& dv, IJK_Field_double& v,
58 const int k_layer,
double dt_tot);
60void runge_kutta3_update(
const IJK_Field_double& dv, IJK_Field_double& F, IJK_Field_double& v,
61 const int step,
const int k_layer,
double dt_tot);
63void runge_kutta3_update_surfacic_fluxes(IJK_Field_double& dv, IJK_Field_double& F,
64 const int step,
const int k_layer,
double dt_tot);
66void force_zero_on_walls(IJK_Field_double& vz);
68template<
class T,
int N>
71 assert(
static_cast<int>(N) == 3);
73 v.
get_ptr(0) = std::make_shared<IJK_Field_template<T,TRUSTArray<T>>>();
74 v.
get_ptr(1) = std::make_shared<IJK_Field_template<T,TRUSTArray<T>>>();
75 v.
get_ptr(2) = std::make_shared<IJK_Field_template<T,TRUSTArray<T>>>();
80 v[0].get_shear_BC_helpler().set_dU_(DU);
81 v[1].get_shear_BC_helpler().set_dU_(0.);
82 v[2].get_shear_BC_helpler().set_dU_(0.);
88template<
class T,
int N>
91 for (
int i=0; i<N ; i++)
93 v.
get_ptr(i) = std::make_shared<IJK_Field_template<T,TRUSTArray<T>>>();
101void calculer_rho_v(
const IJK_Field_double& rho,
102 const IJK_Field_vector3_double& v,
103 IJK_Field_vector3_double& rho_v);
105void calculer_rho_harmonic_v(
const IJK_Field_double& rho,
106 const IJK_Field_vector3_double& v,
107 IJK_Field_vector3_double& rho_v);
109double get_channel_control_volume(IJK_Field_double& field,
int local_k_layer,
const ArrOfDouble_with_ghost& delta_z_local);
111void mass_solver_with_rho(IJK_Field_double& velocity,
const IJK_Field_double& rho,
const ArrOfDouble_with_ghost& delta_z_local,
const int k);
112void mass_solver_with_inv_rho(IJK_Field_double& velocity,
const IJK_Field_double& inv_rho,
const ArrOfDouble_with_ghost& delta_z_local,
const int k);
114void mass_solver_scalar(IJK_Field_double& dv,
const ArrOfDouble_with_ghost& delta_z_local,
int k_index);
116void density_solver_with_rho(IJK_Field_double& velocity,
const IJK_Field_double& rho,
const ArrOfDouble_with_ghost& delta_z_local,
const int k);
119void update_integral_velocity(
const IJK_Field_vector3_double& v_instant, IJK_Field_vector3_double& v_tmp,
120 const IJK_Field_double& indic,
const IJK_Field_double& indic_tmp);
121void compute_and_store_gradU_cell(
const IJK_Field_double& vitesse_i,
122 const IJK_Field_double& vitesse_j,
123 const IJK_Field_double& vitesse_k,
125 IJK_Field_double& dudx, IJK_Field_double& dvdy, IJK_Field_double& dwdx,
126 IJK_Field_double& dudz, IJK_Field_double& dvdz, IJK_Field_double& dwdz,
127 const int compute_all,
129 IJK_Field_double& dudy, IJK_Field_double& dvdx, IJK_Field_double& dwdy,
130 IJK_Field_double& lambda2);
132void supprimer_chevauchement(IJK_Field_double& ind);
134void update_integral_pressure(
const IJK_Field_double& p_instant, IJK_Field_double& p_tmp,
const IJK_Field_double& indic,
const IJK_Field_double& indic_tmp);
135void update_integral_indicatrice(
const IJK_Field_double& indic,
const double deltat, IJK_Field_double& out);
137double calculer_v_moyen(
const IJK_Field_double& vx);
138double calculer_vl_moyen(
const IJK_Field_double& vx,
const IJK_Field_double& indic);
139double calculer_rho_cp_u_moyen(
const IJK_Field_double& vx,
const IJK_Field_double& cp_rhocp,
const IJK_Field_double& rho_field,
const double& rho_cp,
const int rho_cp_case);
144double calculer_temperature_adimensionnelle_theta_moy(
const IJK_Field_double& vx,
145 const IJK_Field_double& temperature_adimensionnelle_theta,
146 const IJK_Field_double& cp_rhocp_rhocpinv,
147 const IJK_Field_double& rho_field,
148 const double& rho_cp,
149 const int rho_cp_case);
151double calculer_temperature_theta_moy(
const IJK_Field_double& vx,
const IJK_Field_double& temperature,
152 const IJK_Field_double& cp,
const IJK_Field_double& rho_field);
154double calculer_variable_wall(
const IJK_Field_double& variable,
const IJK_Field_double& cp_rhocp_rhocpinv,
const IJK_Field_double& rho_field,
const double& rho_cp,
const int kmin,
const int kmax,
const int rho_cp_case);
155void calculer_rho_cp_var(
const IJK_Field_double& variable,
const IJK_Field_double& cp_rhocp_rhocpinv,
const IJK_Field_double& rho,
const double& rho_cp,
double& rho_cp_moy,
double& variable_moy,
int k,
const int rho_cp_case);
157double calculer_tauw(
const IJK_Field_double& vx,
const double mu_liquide);
159void calculer_gradient_temperature(
const IJK_Field_double& temperature, IJK_Field_vector3_double& grad_T);
160void add_gradient_temperature(
const IJK_Field_double& temperature,
const double constant, IJK_Field_double& vx,
163void force_entry_velocity(IJK_Field_double& vx, IJK_Field_double& vy, IJK_Field_double& vz,
double v_imposed,
const int& dir,
const int& compo,
const int& stencil);
165double calculer_v_moyen(
const IJK_Field_double& vx);
166double calculer_vl_moyen(
const IJK_Field_double& vx,
const IJK_Field_double& indic);
167double calculer_rho_cp_u_moyen(
const IJK_Field_double& vx,
const IJK_Field_double& cp_rhocp,
const IJK_Field_double& rho_field,
const double& rho_cp,
const int rho_cp_case);
: class Boundary_Conditions_Thermique
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
: This class is an IJK_Field_local with parallel informations.
The class IJK_Field_vector is a fixed array of polymorphic IJK fields.
std::shared_ptr< IJK_Field_template< T, TRUSTArray< T > > > & get_ptr(int i)
void nommer(const Nom &nam) override
Donne un nom au champ.
class Nom Une chaine de caractere pour nommer les objets de TRUST