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 {
75 
76  // Set the equation name and the non-const field reference
77  tEqn->op(LagrangianEqn<Type>(psi));
78 
79  return tEqn;
80 }
81 
82 
83 template<class Type>
86 (
87  const LagrangianSubScalarField& deltaT,
90 )
91 {
94 
95  // Set the equation name and the non-const field reference
96  tEqn->op(LagrangianEqn<Type>(psi));
97 
98  return tEqn;
99 }
100 
101 
102 template<class Type>
105 (
107 )
108 {
109  LagrangianmInitDdt(dimless, psi, true);
110  return tmp<LagrangianSubField<Type>>(nullptr);
111 }
112 
113 
114 template<class Type>
117 (
120 )
121 {
122  LagrangianmInitDdt(dimless, psi, true);
123  return tmp<LagrangianSubField<Type>>(nullptr);
124 }
125 
126 
127 // ************************************************************************* //
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 the no-time-derivative matrix.
virtual bool LagrangianmInitDdt(const dimensionSet &mDims, const LagrangianSubSubField< Type > &psi, const bool instantaneousDdt)
Initialise time-derivative information.
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
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
const volScalarField & psi
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
const dimensionSet dimless
error FatalError