TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Source_Flux_interfacial_base.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 Source_Flux_interfacial_base_included
17#define Source_Flux_interfacial_base_included
18
19#include <Sources_Multiphase_base.h>
20#include <Correlation_base.h>
21#include <TRUST_Ref.h>
22
23/*! @brief Interfacial flux source term (implemented in PolyMAC_HFV) of the form:
24 *
25 * F_{kl} = - F_{lk} = - C_{kl} (u_k - u_l).
26 * The coefficient C_{kl} is computed by the Coefficient_Flux_interfacial_base hierarchy.
27 *
28 * @sa Source_base
29 */
31{
32 Declare_base(Source_Flux_interfacial_base);
33public :
34 void dimensionner_blocs(matrices_t matrices, const tabs_t& semi_impl = {}) const override;
35 void ajouter_blocs(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = {}) const override;
36 void mettre_a_jour(double temps) override;
37 void completer() override;
38
39 /* wall-to-interface flux (per cell) and its derivatives */
40 /* these arrays are only accessible in the energy equation term and are used by others */
41 /* they can be filled by the diffusion operator (wall flux), a fuel rod thermal module, etc. */
42 DoubleTab& qpi() const; // qpi(e, k, l) : power deposited in element e from phase k to interface (k, l); unit: W
43 DoubleTab& dT_qpi() const; // dT_qpi(e, k, l, n) : its derivative w.r.t. T[n]
44 DoubleTab& da_qpi() const; // da_qpi(e, k, l, n) : its derivative w.r.t. alpha[n]
45 DoubleTab& dp_qpi() const; // dp_qpi(e, k, l) : its derivative w.r.t. p
46
47private:
48 mutable DoubleTab qpi_, dT_qpi_, da_qpi_, dp_qpi_;
49 OBS_PTR(Correlation_base) correlation_; // correlation providing the interfacial flux coefficient
50 int is_turb_ = 0;
51 double dv_min = -1.;
52 double mod2grp = -1. ;
53};
54
55#endif /* Source_Flux_interfacial_base_included */
Interfacial flux source term (implemented in PolyMAC_HFV) of the form:
void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={}) const override
void completer() override
Updates internal references of the Source_base object.
void mettre_a_jour(double temps) override
DOES NOTHING - to override in derived classes.
void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) const override