Loading...
Searching...
No Matches
acousticWaveTransmissiveFvPatchField.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) 2020 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
30#include "fvPatchFieldMapper.H"
31#include "volFields.H"
34#include "backwardDdtScheme.H"
35
36// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37
38template<class Type>
40(
41 const fvPatch& p,
43)
44:
45 advectiveFvPatchField<Type>(p, iF),
46 advectiveU_(0)
47{}
48
49
50template<class Type>
52(
54 const fvPatch& p,
56 const fvPatchFieldMapper& mapper
57)
59 advectiveFvPatchField<Type>(ptf, p, iF, mapper),
60 advectiveU_(ptf.advectiveU_)
61{}
62
63
64template<class Type>
66(
67 const fvPatch& p,
69 const dictionary& dict
70)
72 advectiveFvPatchField<Type>(p, iF, dict),
73 advectiveU_(dict.get<scalar>("advectiveSpeed"))
74{}
75
76
77template<class Type>
79(
81)
83 advectiveFvPatchField<Type>(ptpsf),
84 advectiveU_(ptpsf.advectiveU_)
85{}
86
87
88template<class Type>
90(
93)
94:
95 advectiveFvPatchField<Type>(ptpsf, iF),
96 advectiveU_(ptpsf.advectiveU_)
97{}
98
99
100// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
101
102template<class Type>
105{
106 return tmp<scalarField>::New(this->size(), advectiveU_);
107}
108
109
110template<class Type>
112{
114 os.writeEntry("advectiveSpeed", advectiveU_);
116}
117
118
119// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
bool get(const label i) const
Definition UList.H:868
void size(const label n)
Definition UList.H:118
This boundary condition provides a wave transmissive outflow condition, based on solving DDt(W,...
acousticWaveTransmissiveFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual tmp< scalarField > advectionSpeed() const
Calculate and return the advection speed at the boundary.
This boundary condition provides an advective outflow condition, based on solving DDt(W,...
advectiveFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
A class for managing temporary objects.
Definition tmp.H:75
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Definition tmp.H:215
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
dictionary dict