TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Sch_CN_EX_iteratif.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 Sch_CN_EX_iteratif_included
17#define Sch_CN_EX_iteratif_included
18
19#include <Sch_CN_iteratif.h>
20/*! @brief Extended iterative Crank-Nicolson scheme with additional stabilisation tricks.
21 *
22 * Extends Sch_CN_iteratif to remain stable beyond its natural stability domain (facsec < 2).
23 *
24 * An iteration damping factor omega is introduced. It improves stability but degrades solution quality:
25 * at low iteration counts, time derivatives are underestimated and conservation laws may not be satisfied.
26 *
27 * To allow larger time steps, equations other than Navier-Stokes are solved by advancing n explicit
28 * Euler sub-steps. These n sub-steps are recomputed at each iteration of Sch_CN_iteratif.
29 *
30 * This scheme is suited to large-scale industrial LES hydraulic simulations with solid-coupled thermics.
31 *
32 * @sa Sch_CN_iteratif
33 */
35{
36 Declare_instanciable(Sch_CN_EX_iteratif);
37
38public :
39
40 void set_param(Param& titi) const override;
41 void mettre_a_jour_dt_stab() override;
42
43protected :
44
45 bool iterateTimeStepOnEquation(int i,bool& converged) override;
46 virtual bool iterateTimeStepOnNS(int i,bool& converged);
47 virtual bool iterateTimeStepOnOther(int i,bool& converged);
48
49 double omega=0.1;
50 void ajuster_facsec(type_convergence cv) override;
51
52};
53
54#endif
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Extended iterative Crank-Nicolson scheme with additional stabilisation tricks.
virtual bool iterateTimeStepOnOther(int i, bool &converged)
void mettre_a_jour_dt_stab() override
Only takes into account the Navier-Stokes equation of the problem (if there is one)....
virtual bool iterateTimeStepOnNS(int i, bool &converged)
void ajuster_facsec(type_convergence cv) override
void set_param(Param &titi) const override
bool iterateTimeStepOnEquation(int i, bool &converged) override
Computes one iteration of the resolution on equation i.
Time scheme alternating a half implicit Euler step and a half LeapFrog step.