solidLagrangianThermo.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "solidLagrangianThermo.H"
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
34 }
35 
36 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
37 
40 {
41  return p_;
42 }
43 
44 
47 (
48  const LagrangianInjection&,
49  const LagrangianSubMesh&
50 ) const
51 {
52  return p_;
53 }
54 
55 
56 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
57 
59 (
60  const dictionary& dict,
61  const LagrangianMesh& mesh,
62  const word& phaseName
63 )
64 :
65  p_
66  (
67  IOobject
68  (
69  IOobject::groupName("p", phaseName),
70  mesh.time().name(),
71  mesh,
72  IOobject::NO_READ,
73  IOobject::NO_WRITE
74  ),
75  dimensionedScalar(IOobject::groupName("p", phaseName), dimPressure, NaN)
76  )
77 {}
78 
79 
80 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
81 
84 (
85  const LagrangianMesh& mesh,
86  const word& phaseName
87 )
88 {
89  return basicLagrangianThermo::New<solidLagrangianThermo>(mesh, phaseName);
90 }
91 
92 
93 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
94 
96 {}
97 
98 
100 {}
101 
102 
103 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
104 
106 {
107  correct(mesh().subAll());
108 }
109 
110 
112 {}
113 
114 
115 // ************************************************************************* //
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
Class containing Lagrangian geometry and topology.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
virtual const LagrangianMesh & mesh() const =0
Access the mesh.
virtual void correct(const LagrangianSubMesh &)=0
Update state.
virtual const word & phaseName() const =0
Access the phase name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
tmp< uniformDimensionedScalarField > p(const LagrangianSubMesh &) const
Pressure for a sub-mesh [Pa].
uniformGeometricScalarField p_
Pressure [Pa].
implementation(const dictionary &, const LagrangianMesh &, const word &)
Construct from dictionary, mesh and phase name.
Base-class for solid Lagrangian thermodynamic models.
virtual void initialise()
Initialise state.
virtual ~solidLagrangianThermo()
Destructor.
virtual void correctPressure(const LagrangianSubMesh &)
Update the pressure (does nothing)
static autoPtr< solidLagrangianThermo > New(const LagrangianMesh &mesh, const word &phaseName=word::null)
Select a solid thermo.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
const dimensionSet time
Namespace for OpenFOAM.
defineRunTimeSelectionTable(fvConstraint, dictionary)
const dimensionSet & dimPressure
Definition: dimensions.C:163
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
dictionary dict