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