TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Assembleur_P_VDF.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 Assembleur_P_VDF_included
17#define Assembleur_P_VDF_included
18
19#include <Assembleur_base.h>
20#include <TRUST_Ref.h>
21
24class Domaine_Cl_VDF;
25class Domaine_VDF;
26class Front_VF;
27
29{
30 Declare_instanciable(Assembleur_P_VDF);
31
32public:
33 void associer_domaine_dis_base(const Domaine_dis_base&) override;
35 const Domaine_dis_base& domaine_dis_base() const override;
36 const Domaine_Cl_dis_base& domaine_Cl_dis_base() const override;
37 int assembler(Matrice&) override;
38 int assembler_mat(Matrice&, const DoubleVect&, int incr_pression, int resoudre_en_u) override;
39 int assembler_rho_variable(Matrice&, const Champ_Don_base& rho) override;
40 int assembler_QC(const DoubleTab&, Matrice&) override;
41 int modifier_secmem(DoubleTab&) override;
42 int modifier_solution(DoubleTab&) override;
43 void completer(const Equation_base&) override;
44 void dimensionner_continuite(matrices_t matrices, int aux_only = 0) const override;
45 void assembler_continuite(matrices_t matrices, DoubleTab& secmem, int aux_only = 0) const override;
46 DoubleTab norme_continuite() const override;
47
48protected:
49 int construire(Matrice& la_matrice);
50 int remplir(Matrice& la_matrice, const DoubleVect& volumes_entrelaces, const Champ_Don_base *rho_ptr);
51 void modifier_secmem_pression_imposee(const Neumann_sortie_libre& cond_lim, const Front_VF& frontiere_vf, DoubleTab& secmem);
52 void modifier_secmem_vitesse_imposee(const Entree_fluide_vitesse_imposee& cond_lim, const Front_VF& frontiere_vf, DoubleTab& secmem);
53 int liste_faces_periodiques(ArrOfInt& faces);
54
55 OBS_PTR(Domaine_VDF) le_dom_VDF;
56 OBS_PTR(Domaine_Cl_VDF) le_dom_Cl_VDF;
57 ArrOfDouble les_coeff_pression;
58
59 // Flag: indicates whether the pressure is imposed somewhere on a boundary condition.
61};
62
63#endif
OBS_PTR(Domaine_Cl_VDF) le_dom_Cl_VDF
const Domaine_dis_base & domaine_dis_base() const override
int assembler_mat(Matrice &, const DoubleVect &, int incr_pression, int resoudre_en_u) override
void modifier_secmem_pression_imposee(const Neumann_sortie_libre &cond_lim, const Front_VF &frontiere_vf, DoubleTab &secmem)
Modifies the right-hand side of the pressure solver for a "Neumann_sortie_libre" condition.
int modifier_secmem(DoubleTab &) override
Modifies the right-hand side to apply boundary conditions.
int liste_faces_periodiques(ArrOfInt &faces)
Fills the array faces with the list of indices of the periodic faces in the face_voisins array.
int assembler_QC(const DoubleTab &, Matrice &) override
Assembles the pressure matrix for a quasi-compressible fluid.
int modifier_solution(DoubleTab &) override
void assembler_continuite(matrices_t matrices, DoubleTab &secmem, int aux_only=0) const override
void modifier_secmem_vitesse_imposee(const Entree_fluide_vitesse_imposee &cond_lim, const Front_VF &frontiere_vf, DoubleTab &secmem)
Modifies the right-hand side of the pressure system for an imposed velocity boundary condition.
DoubleTab norme_continuite() const override
int construire(Matrice &la_matrice)
Determines the nonzero entries of the matrix and prepares the storage.
int assembler_rho_variable(Matrice &, const Champ_Don_base &rho) override
Assembles the pressure matrix M such that M*P = div(porosity/rho * grad(P)).
OBS_PTR(Domaine_VDF) le_dom_VDF
const Domaine_Cl_dis_base & domaine_Cl_dis_base() const override
void associer_domaine_dis_base(const Domaine_dis_base &) override
void dimensionner_continuite(matrices_t matrices, int aux_only=0) const override
int assembler(Matrice &) override
Assembles the pressure matrix M such that M*P = div(porosity * grad(P)).
void associer_domaine_cl_dis_base(const Domaine_Cl_dis_base &) override
void completer(const Equation_base &) override
int remplir(Matrice &la_matrice, const DoubleVect &volumes_entrelaces, const Champ_Don_base *rho_ptr)
Computes the coefficients of the pressure matrix with a rho field.
ArrOfDouble les_coeff_pression
class Champ_Don_base base class of Given Fields (not calculated)
class Domaine_Cl_VDF
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_VDF
Definition Domaine_VDF.h:61
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Entree_fluide_vitesse_imposee Special case of the class Dirichlet_entree_fluide.
class Equation_base The role of an equation is the calculation of one or more fields....
class Front_VF
Definition Front_VF.h:36
Matrice class - Generic class in the matrix hierarchy.
Definition Matrice.h:34
Neumann_sortie_libre This class represents an open boundary without imposed velocity.