BreakupModel.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2015 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "BreakupModel.H"
30
31// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32
33template<class CloudType>
35(
36 CloudType& owner
37)
38:
40 solveOscillationEq_(false),
41 y0_(0.0),
42 yDot0_(0.0),
43 TABComega_(0.0),
44 TABCmu_(0.0),
45 TABtwoWeCrit_(0.0)
46{}
47
48
49template<class CloudType>
51(
53)
54:
56 solveOscillationEq_(bum.solveOscillationEq_),
57 y0_(bum.y0_),
58 yDot0_(bum.yDot0_),
59 TABComega_(bum.TABComega_),
60 TABCmu_(bum.TABCmu_),
61 TABtwoWeCrit_(bum.TABtwoWeCrit_)
62{}
63
64
65template<class CloudType>
67(
68 const dictionary& dict,
69 CloudType& owner,
70 const word& type,
71 bool solveOscillationEq
72)
73:
74 CloudSubModelBase<CloudType>(owner, dict, typeName, type),
75 solveOscillationEq_(solveOscillationEq),
76 y0_(this->coeffDict().template getOrDefault<scalar>("y0", 0)),
77 yDot0_(this->coeffDict().template getOrDefault<scalar>("yDot0", 0)),
78 TABComega_(8),
79 TABCmu_(5),
80 TABtwoWeCrit_(12)
81{
82 if (solveOscillationEq_ && dict.found("TABCoeffs"))
83 {
84 const dictionary coeffs(dict.subDict("TABCoeffs"));
85 coeffs.readEntry("Comega", TABComega_);
86 coeffs.readEntry("Cmu", TABCmu_);
87
88 const scalar WeCrit(coeffs.get<scalar>("WeCrit"));
89 TABtwoWeCrit_ = 2*WeCrit;
90 }
91}
92
93
94// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
95
96template<class CloudType>
98{}
100
101// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103#include "BreakupModelNew.C"
104
105// ************************************************************************* //
Templated break-up model class.
Definition: BreakupModel.H:61
virtual ~BreakupModel()
Destructor.
Definition: BreakupModel.C:97
Base class for cloud sub-models.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Definition: dictionary.C:460
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Definition: dictionaryI.H:87
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
A class for handling words, derived from Foam::string.
Definition: word.H:68
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
dictionary dict