ignitionIO.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 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 "engineTime.H"
30#include "ignition.H"
31
32// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
33
35(
36 const dictionary& combustionProperties,
37 const Time& db,
38 const fvMesh& mesh
39)
40:
41 mesh_(mesh),
42 ignite_(combustionProperties.get<bool>("ignite")),
43 ignSites_
44 (
45 combustionProperties.lookup("ignitionSites"),
46 ignitionSite::iNew(db, mesh)
47 )
48{
49 if (ignite_)
50 {
51 Info<< "\nIgnition on" << endl;
52 }
53 else
54 {
55 Info<< "\nIgnition switched off" << endl;
56 }
57}
58
59
61(
62 const dictionary& combustionProperties,
63 const engineTime& edb,
64 const fvMesh& mesh
65)
66:
67 mesh_(mesh),
68 ignite_(combustionProperties.get<bool>("ignite")),
69 ignSites_
70 (
71 combustionProperties.lookup("ignitionSites"),
72 ignitionSite::iNew(edb, mesh)
73 )
74{
75 if (ignite_)
76 {
77 Info<< "\nIgnition on" << endl;
78 }
79 else
80 {
81 Info<< "\nIgnition switched off" << endl;
82 }
83}
84
85
86// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
An abstract class for the time description of the piston motion.
Definition: engineTime.H:57
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Foam::ignitionSite.
Definition: ignitionSite.H:63
Foam::ignition.
Definition: ignition.H:56
Lookup type of boundary radiation properties.
Definition: lookup.H:66
bool
Definition: EEqn.H:20
dynamicFvMesh & mesh
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372