OpenFOAM: API Guide
v2112
The open source CFD toolbox
surfaceAlignedSBRStressFvMotionSolver.H
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) 2015 OpenFOAM Foundation
9
Copyright (C) 2015-2016 OpenCFD Ltd.
10
-------------------------------------------------------------------------------
11
License
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
Class
28
Foam::surfaceAlignedSBRStressFvMotionSolver
29
30
Group
31
grpMeshMotionSolvers
32
33
Description
34
Mesh motion solver for an fvMesh. Based on solving the cell-centre
35
solid-body rotation stress equations for the motion displacement.
36
The model calculates the necessary rotation to align the stl surface
37
with the closest mesh face normals and it calculates the respective source
38
term for the SBRStress equation.
39
40
Input parameters:
41
42
\verbatim
43
surfaceAlignedSBRStressCoeffs
44
{
45
diffusivity uniform;
46
surfaces ("terrain.stl");
47
maxAng 85;
48
minAng 5;
49
nNonOrthogonalCorr 4;
50
accFactor 1.3;
51
smoothFactor 0.9;
52
minSigmaDiff 1e-4;
53
}
54
\endverbatim
55
56
surfaces: name of the stl surfaces to which apply alignment.
57
58
maxAng: Maximum angle (between surface and most aligned mesh face normal)
59
to which rotation is applied. (default 80 degress)
60
61
minAng: Minimum angle (between surface and most aligned mesh face normal)
62
to which rotation is applied (default 20 degress)
63
64
nNonOrthogonalCorr: Non-orthogonal correction of the SBRStress equation
65
66
accFactor: Proportionality constant applied to the source of the stress
67
equation.(default 1)
68
69
smoothFactor: Displacement smooth factor (1 very smooth , 0 no smoothing)
70
(default 0.9)
71
72
minSigmaDiff: Minimum magnitude difference between old and new magnitudes
73
of the applied stress.
74
75
If the difference between old and new is smaller than
76
minSigmaDiff no further addition to the stress source term
77
will be made (default: 1e-3)
78
79
SourceFiles
80
surfaceAlignedSBRStressFvMotionSolver.C
81
82
\*---------------------------------------------------------------------------*/
83
84
#ifndef surfaceAlignedSBRStressFvMotionSolver_H
85
#define surfaceAlignedSBRStressFvMotionSolver_H
86
87
#include "
triSurfaceMesh.H
"
88
#include "
vectorList.H
"
89
#include "
displacementSBRStressFvMotionSolver.H
"
90
91
92
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93
94
namespace
Foam
95
{
96
97
/*---------------------------------------------------------------------------*\
98
Class surfaceAlignedSBRStressFvMotionSolver Declaration
99
\*---------------------------------------------------------------------------*/
100
101
class
surfaceAlignedSBRStressFvMotionSolver
102
:
103
public
displacementSBRStressFvMotionSolver
104
{
105
// Private data
106
107
//- Names of the surfaces
108
wordList
surfaceNames_;
109
110
//- TriSurfaceMesh
111
PtrList<triSurfaceMesh>
surfaceMesh_;
112
113
//- Rotation vector field
114
volVectorField
cellRot_;
115
116
//- Maximum angle (between surface and most aligned mesh face normal)
117
//- to which rotation is applied
118
scalar maxAng_;
119
120
//- Minimum angle (between surface and most aligned mesh face normal)
121
//- to which rotation is applied
122
scalar minAng_;
123
124
//- Proportional constant applied to the source to accelerate
125
//- convergence
126
scalar accFactor_;
127
128
//- Displacement smooth factor
129
scalar smoothFactor_;
130
131
//- Non-orthogonal correction of the SBRStress equation
132
label nNonOrthogonalCorr_;
133
134
//- Point displacement field
135
pointVectorField
& pointDisplacement_;
136
137
//- Stress tensor
138
volSymmTensorField
sigmaD_;
139
140
//- Minimum magnitude difference between old and new magnitudes
141
// stress applied
142
scalar minSigmaDiff_;
143
144
145
// Private Member Functions
146
147
//- No copy construct
148
surfaceAlignedSBRStressFvMotionSolver
149
(
150
const
surfaceAlignedSBRStressFvMotionSolver
&
151
) =
delete
;
152
153
//- No copy assignment
154
void
operator=(
const
surfaceAlignedSBRStressFvMotionSolver
&) =
delete
;
155
156
//- Calculate cellRot
157
void
calculateCellRot();
158
159
160
public
:
161
162
//- Runtime type information
163
TypeName
(
"surfaceAlignedSBRStress"
);
164
165
166
// Constructors
167
168
//- Construct from polyMesh and IOdictionary
169
surfaceAlignedSBRStressFvMotionSolver
170
(
171
const
polyMesh
&,
172
const
IOdictionary
&
173
);
174
175
176
//- Destructor
177
~surfaceAlignedSBRStressFvMotionSolver
();
178
179
180
// Member Functions
181
182
//- Solve for motion
183
virtual
void
solve
();
184
};
185
186
187
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188
189
}
// End namespace Foam
190
191
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193
#endif
194
195
// ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition:
IOdictionary.H:54
vectorList.H
Foam::surfaceAlignedSBRStressFvMotionSolver::TypeName
TypeName("surfaceAlignedSBRStress")
Runtime type information.
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition:
polyMesh.H:77
Foam::surfaceAlignedSBRStressFvMotionSolver::solve
virtual void solve()
Solve for motion.
Definition:
surfaceAlignedSBRStressFvMotionSolver.C:290
Foam::surfaceAlignedSBRStressFvMotionSolver::~surfaceAlignedSBRStressFvMotionSolver
~surfaceAlignedSBRStressFvMotionSolver()
Destructor.
Definition:
surfaceAlignedSBRStressFvMotionSolver.C:129
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition:
List.H:59
Foam::displacementSBRStressFvMotionSolver
Mesh motion solver for an fvMesh. Based on solving the cell-centre solid-body rotation stress equatio...
Definition:
displacementSBRStressFvMotionSolver.H:59
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
displacementSBRStressFvMotionSolver.H
Foam::surfaceAlignedSBRStressFvMotionSolver
Mesh motion solver for an fvMesh. Based on solving the cell-centre solid-body rotation stress equatio...
Definition:
surfaceAlignedSBRStressFvMotionSolver.H:100
Foam::List< word >
Foam::GeometricField< vector, fvPatchField, volMesh >
triSurfaceMesh.H
src
fvMotionSolver
fvMotionSolvers
displacement
surfaceAlignedSBRStress
surfaceAlignedSBRStressFvMotionSolver.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.