TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Schema_Adams_Moulton_order_2.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
17/*! @brief class Schema_Adams_Moulton_order_2
18 *
19 */
20
21#include <Schema_Adams_Moulton_order_2.h>
22#include <Equation_base.h>
23#include <Probleme_base.h>
24#include <Probleme_Couple.h>
25#include <Milieu_base.h>
26#include <Param.h>
27#include <communications.h>
28#include <Matrice_Morse.h>
29#include <string>
30
31Implemente_instanciable(Schema_Adams_Moulton_order_2,"Schema_Adams_Moulton_order_2",Schema_Adams_Moulton_base);
32// XD schema_adams_moulton_order_2 schema_implicite_base schema_adams_moulton_order_2 INHERITS_BRACE not_set
33// XD attr facsec_max floattant facsec_max OPT Maximum ratio allowed between time step and stability time returned by
34// XD_CONT CFL condition. The initial ratio given by facsec keyword is changed during the calculation with the implicit
35// XD_CONT scheme but it couldn\'t be higher than facsec_max value.NL2 Warning: Some implicit schemes do not permit high
36// XD_CONT facsec_max, example Schema_Adams_Moulton_order_3 needs facsec=facsec_max=1. NL2 Advice:NL2 The calculation
37// XD_CONT may start with a facsec specified by the user and increased by the algorithm up to the facsec_max limit. But
38// XD_CONT the user can also choose to specify a constant facsec (facsec_max will be set to facsec value then). Faster
39// XD_CONT convergence has been seen and depends on the kind of calculation: NL2-Hydraulic only or thermal hydraulic
40// XD_CONT with forced convection and low coupling between velocity and temperature (Boussinesq value beta low), facsec
41// XD_CONT between 20-30NL2-Thermal hydraulic with forced convection and strong coupling between velocity and
42// XD_CONT temperature (Boussinesq value beta high), facsec between 90-100 NL2-Thermohydralic with natural convection,
43// XD_CONT facsec around 300NL2 -Conduction only, facsec can be set to a very high value (1e8) as if the scheme was
44// XD_CONT unconditionally stableNL2These values can also be used as rule of thumb for initial facsec with a facsec_max
45// XD_CONT limit higher.
46
47
49{
51}
52
54{
56}
57
58/*! @brief Renvoie le nombre de valeurs temporelles a conserver.
59 *
60 */
65
67{
68 return 0;
69}
70
72{
73 return 0;
74}
75
76void Schema_Adams_Moulton_order_2::compute_adams_moulton_coefficients(double time_step, const DoubleTab& times) const
77{
78 assert(times.size_array() == 2); //past, present and future times, stored in ascending order inside "times" table
79
80 if ( adams_moulton_coefficients_.size_array() != 2)
81 {
82 adams_moulton_coefficients_.resize(2,RESIZE_OPTIONS::NOCOPY_NOINIT);
83 }
84
87}
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
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 compute_adams_moulton_coefficients(double time_step, const DoubleTab &times) const override
int nb_valeurs_temporelles() const override
Renvoie le nombre de valeurs temporelles a conserver.
Classe de base des flux de sortie.
Definition Sortie.h:52
_SIZE_ size_array() const