TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Pb_Couple_Optimisation_IBM.h
1/****************************************************************************
2* Copyright (c) 2026, 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 Pb_Couple_Optimisation_IBM_included
17#define Pb_Couple_Optimisation_IBM_included
18
19#include <Probleme_Couple.h>
20#include <Source_PDF_base.h>
21#include <Interpolation_IBM_base.h>
22#include <TRUST_Ref.h>
23#include <Champ_Don_base.h>
24#include <Ecrire_MED.h>
25
26class Cond_lim_base;
27
30
32{
33 Declare_instanciable(Pb_Couple_Optimisation_IBM);
34
35public:
36 void initialize() override;
37 inline const Interpolation_IBM_base& le_modele_interpolation_IBM() const { return my_interpolation_opt_;}
38 inline const Source_PDF_base& la_source_PDF_IBM() const { return my_source_PDF_opt_;}
39 inline const Source_PDF_base& la_source_PDF_IBM_adjt() const { return my_source_PDF_opt_adjt_;}
40 inline const Champ_Don_base& le_champ_aire_IBM() const { return my_source_PDF_opt_->get_champ_aire();}
41 inline const Champ_Don_base& le_champ_rotation_IBM() const { return my_source_PDF_opt_->get_champ_rotation();}
42 double alpha() const { return alpha_; }
43 bool solveTimeStep() override;
45 bool initTimeStep(double) override;
46
47protected:
48 void Save_Med_File_fonction_cout(DoubleTab&);
50 int visu_cout_ = 0;
51
52 OBS_PTR(Interpolation_IBM_base) my_interpolation_opt_;
53 OBS_PTR(Interpolation_IBM_base) my_interpolation_opt_adjt_;
54 OBS_PTR(Prepro_IBM_base) my_prepro_opt_;
55 OBS_PTR(Source_PDF_base) my_source_PDF_opt_;
56 OBS_PTR(Source_PDF_base) my_source_PDF_opt_adjt_;
57 OBS_PTR(Probleme_base) pb_etat_opt_;
58 OBS_PTR(Probleme_base) pb_adjt_opt_;
59 OBS_PTR(Probleme_base) pb_projection_opt_;
60 OWN_PTR(Champ_Don_base) source_derivee_forme_; // Scalar right-hand side of the projection equation (scalar per element)
61 OWN_PTR(Champ_Don_base) normal_derivee_forme_; // Scalar right-hand side of the projection equation (normalized vector per element)
62 OWN_PTR(Champ_Don_base) fonction_cout_lu_,fonction_cout_; // Scalar cost function (per element)
63 double alpha_ = 1.;
68 double modif_aire_pc_low_ = -1.0e+6;
69 double modif_aire_pc_high_ = 1.0e+6;
70 double area_ref_ = 0.;
73};
74#endif
class Champ_Don_base base class of Given Fields (not calculated)
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
class Discretisation_base This class represents a spatial discretization scheme, which
const Champ_Don_base & le_champ_rotation_IBM() const
const Source_PDF_base & la_source_PDF_IBM() const
OBS_PTR(Probleme_base) pb_etat_opt_
OBS_PTR(Source_PDF_base) my_source_PDF_opt_
bool solveTimeStep() override
For possible re-implementation and unified call from python.
OWN_PTR(Champ_Don_base) source_derivee_forme_
OBS_PTR(Prepro_IBM_base) my_prepro_opt_
OBS_PTR(Source_PDF_base) my_source_PDF_opt_adjt_
bool initTimeStep(double) override
This method allocates and initializes the unknown and given fields for the future time step.
const Champ_Don_base & le_champ_aire_IBM() const
OBS_PTR(Interpolation_IBM_base) my_interpolation_opt_adjt_
const Source_PDF_base & la_source_PDF_IBM_adjt() const
OBS_PTR(Probleme_base) pb_adjt_opt_
OBS_PTR(Probleme_base) pb_projection_opt_
const Interpolation_IBM_base & le_modele_interpolation_IBM() const
void initialize() override
This method is called once at the beginning, before any other one of the interface Problem.
OBS_PTR(Interpolation_IBM_base) my_interpolation_opt_
OWN_PTR(Champ_Don_base) normal_derivee_forme_
Probleme_Couple This is the historical coupling class of TRUST.
class Probleme_base It is a Probleme_U that is not a coupling.
class Schema_Temps_base
class Source_PDF_base Base class for the source terms for the penalisation of the momentum in the Imm...