Loading...
Searching...
No Matches
freeSurfaceVelocityFvPatchVectorField.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) 2019 Zeljko Tukovic, FSB Zagreb.
9 Copyright (C) 2020-2023 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
32#include "volFields.H"
33#include "surfaceFields.H"
35
36// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37
40(
41 const fvPatch& p,
53 const fvPatch& p,
55 const fvPatchFieldMapper& mapper
56)
57:
58 fixedGradientFvPatchVectorField(ptf, p, iF, mapper)
59{}
60
61
64(
65 const fvPatch& p,
67 const dictionary& dict
68)
69:
70 fixedGradientFvPatchVectorField(p, iF)
73 // Apply zero-gradient condition on start-up
74 this->extrapolateInternal();
75}
76
77
80(
83)
85 fixedGradientFvPatchVectorField(fcvpvf, iF)
86{}
87
88
89// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
90
92{
93 if (updated())
94 {
95 return;
96 }
97
98 // refCast<interfaceTrackingFvMesh>
99 auto* itm =
100 const_cast<interfaceTrackingFvMesh*>
101 (
103 );
104
105 if (!itm)
106 {
107 // FatalError
108 }
109 else
110 {
111 gradient() = itm->freeSurfaceSnGradU();
112 }
113
114 fixedGradientFvPatchVectorField::updateCoeffs();
115}
116
117
119{
123
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127namespace Foam
128{
130 (
133 );
134}
135
136// ************************************************************************* //
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
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
virtual void write(Ostream &) const
Write.
This boundary condition provides a velocity outlet boundary condition for free surface patches.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
freeSurfaceVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
A FieldMapper for finite-volume patch fields.
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
The interfaceTrackingFvMesh.
volScalarField & p
dynamicFvMesh & mesh
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
Namespace for OpenFOAM.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
Definition typeInfo.H:87
fvPatchField< vector > fvPatchVectorField
dictionary dict
Foam::surfaceFields.