TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Paroi_contact.cpp
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#include <Discretisation_base.h>
17#include <Paroi_contact.h>
18#include <Equation_base.h>
19#include <Probleme_base.h>
20
21Implemente_instanciable(Paroi_contact, "paroi_contact", Cond_lim_utilisateur_base);
22// XD paroi_contact condlim_base paroi_contact INHERITS_BRACE Thermal condition between two domains. Important: the name
23// XD_CONT of the boundaries in the two domains should be the same. (Warning: there is also an old limitation not yet
24// XD_CONT fixed on the sequential algorithm in VDF to detect the matching faces on the two boundaries: faces should be
25// XD_CONT ordered in the same way). The kind of condition depends on the discretization. In VDF, it is a heat exchange
26// XD_CONT condition, and in VEF, a temperature condition. NL2 Such a coupling requires coincident meshes for the
27// XD_CONT moment. In case of non-coincident meshes, run is stopped and two external files are automatically generated
28// XD_CONT in VEF (connectivity_failed_boundary_name and connectivity_failed_pb_name.med). In 2D, the keyword
29// XD_CONT Decouper_bord_coincident associated to the connectivity_failed_boundary_name file allows to generate a new
30// XD_CONT coincident mesh. NL2 In 3D, for a first preliminary cut domain with HOMARD (fluid for instance), the second
31// XD_CONT problem associated to pb_name (solide in a fluid/solid coupling problem) has to be submitted to HOMARD
32// XD_CONT cutting procedure with connectivity_failed_pb_name.med. NL2 Such a procedure works as while the primary
33// XD_CONT refined mesh (fluid in our example) impacts the fluid/solid interface with a compact shape as described below
34// XD_CONT (values 2 or 4 indicates the number of division from primary faces obtained in fluid domain at the interface
35// XD_CONT after HOMARD cutting): NL2 2-2-2-2-2-2 NL2 2-4-4-4-4-4-2 \\; 2-2-2 NL2 2-4-4-4-4-2 \\; 2-4-2 NL2 2-2-2-2-2
36// XD_CONT \\; 2-2 NL2 OK NL2 NL2 2-2 \\; \\; 2-2-2 NL2 2-4-2 \\; 2-2 NL2 2-2 \\; 2-2 NL2 NOT OK
37// XD attr autrepb ref_Pb_base autrepb REQ Name of other problem.
38// XD attr nameb chaine nameb REQ boundary name of the remote problem which should be the same than the local name
39
41{
42 return s << que_suis_je() << " " << nom_autre_pb << " " << nom_autre_bord;
43}
44
46{
47 s >> nom_autre_pb;
48 s >> nom_autre_bord;
49 return s;
50}
51
53{
54 const Nom& nom_mon_pb = mon_equation->probleme().le_nom();
55 if (nom_mon_pb == nom_autre_pb)
56 {
57 Cerr << "Error in " << que_suis_je() << " the name of the other problem is the same as my problem :" << nom_mon_pb << " on the boundary :" << nom_bord_ << finl;
59 }
60
61 if (mon_equation->discretisation().is_vdf() || mon_equation->discretisation().is_poly_family())
62 {
63 if (mon_equation->discretisation().is_vdf())
64 ajout = "paroi_echange_contact_VDF ";
65 else
66 ajout = mon_equation->discretisation().is_PolyMAC_HFV() ? "paroi_echange_contact_PolyMAC_HFV " :
67 mon_equation->discretisation().is_PolyMAC_MPFA() ? "paroi_echange_contact_PolyMAC_MPFA " : "paroi_echange_contact_PolyMAC_CDO ";
68
69 ajout += nom_autre_pb;
70 ajout += " ";
71 ajout += nom_autre_bord + " ";
72 ajout += mon_equation->inconnue().le_nom() + " 1.e10";
73 }
74 else
75 {
76 ajout = "scalaire_impose_paroi ";
77 ajout += "Champ_Front_contact_VEF ";
78 ajout += nom_mon_pb;
79 ajout += " ";
80 ajout += nom_bord_;
81 ajout += " ";
82 ajout += nom_autre_pb;
83 ajout += " ";
84 ajout += nom_autre_bord;
85 }
86}
classe Cond_lim_utilisateur_base: Les classes heritant de cette classe sont des classes utilisaturs
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
const Nom & le_nom() const override
Renvoie *this;.
Definition Nom.cpp:563
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
void complement(Nom &nom) override
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52