Euler_LagrangianDdtScheme.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) 2025 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 
27 #include "LagrangianFields.H"
28 #include "LagrangianEqn.H"
29 
30 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
31 
32 template<class Type>
34 (
35  const dimensionSet& mDims,
37  const bool instantaneousDdt
38 )
39 {
40  if (instantaneousDdt)
41  {
43  << typeName << " " << ddtScheme<Type>::typeName << " does not "
44  << "support the generation of the instantaneous time derivative"
45  << exit(FatalError);
46  }
47 
48  return false;
49 }
50 
51 
52 template<class Type>
55 (
56  const LagrangianSubScalarField& deltaT,
57  const dimensionSet& mDims,
59 )
60 {
61  return tmp<LagrangianEqn<Type>>(new LagrangianEqn<Type>(deltaT, psi));
62 }
63 
64 
65 template<class Type>
68 (
69  const LagrangianSubScalarField& deltaT,
71 )
72 {
73  // Return the standard time-derivative equation, but add an empty equation
74  // to it so that the name, time-step and non-const field reference are set
75  return
78 }
79 
80 
81 template<class Type>
84 (
85  const LagrangianSubScalarField& deltaT,
88 )
89 {
90  // Return the standard time-derivative equation, but add an empty equation
91  // to it so that the name, time-step and non-const field reference are set
92  return
95 }
96 
97 
98 template<class Type>
101 (
103 )
104 {
105  LagrangianmInitDdt(dimless, psi, true);
106  return tmp<LagrangianSubField<Type>>(nullptr);
107 }
108 
109 
110 template<class Type>
113 (
116 )
117 {
118  LagrangianmInitDdt(dimless, psi, true);
119  return tmp<LagrangianSubField<Type>>(nullptr);
120 }
121 
122 
123 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
This class stores the coefficients of a Lagrangian equation, and facilitates solving that equation an...
Definition: LagrangianEqn.H:56
Abstract base class for Lagrangian ddt schemes.
virtual tmp< LagrangianEqn< Type > > LagrangianmNoDdt(const LagrangianSubScalarField &deltaT, const dimensionSet &mDims, const LagrangianSubSubField< Type > &psi)
Return an empty matrix.
virtual bool LagrangianmInitDdt(const dimensionSet &mDims, const LagrangianSubSubField< Type > &psi, const bool instantaneousDdt)
Does nothing.
virtual tmp< LagrangianEqn< Type > > LagrangianmDdt(const LagrangianSubScalarField &deltaT, LagrangianSubSubField< Type > &psi)
Return the time-derivative matrix.
virtual tmp< LagrangianSubField< Type > > LagrangiancDdt(const LagrangianSubSubField< Type > &psi)
Return the instantaneous time-derivative.
Dimension set for the base types.
Definition: dimensionSet.H:125
A class for managing temporary objects.
Definition: tmp.H:55
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
const volScalarField & psi
const dimensionSet dimless
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError