1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "deformingEngineMesh.H"
27 #include "surfaceFields.H"
28 #include "regionSplit.H"
29 #include "directTopoChange.H"
30 #include "zeroGradientTetPolyPatchFields.H"
31 #include "tetMotionSolver.H"
33 #include "fixedValueTetPolyPatchFields.H"
34 #include "mixedTetPolyPatchFields.H"
35 #include "slipTetPolyPatchFields.H"
36 #include "zeroGradientTetPolyPatchFields.H"
37 #include "meshTools.H"
38 #include "syncTools.H"
41 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
43 void Foam::deformingEngineMesh::addMeshZones()
45 // Add the zones and mesh modifiers to operate piston motion
46 Switch addBoundary(true);
50 pointZones().size() > 0
53 Info<< "Time = " << engTime().theta() << endl;
54 Info<< "void Foam::deformingEngineMesh::addZonesAndModifiers() : "
55 << "Zones and modifiers already present. Skipping."
60 Info << "Point zones found = " << pointZones().size() << endl;
61 Info << "Face zones found = " << faceZones().size() << endl;
62 Info << "Cell zones found = " << cellZones().size() << endl;
67 pointZones().setSize(0);
68 faceZones().setSize(0);
69 cellZones().setSize(0);
70 topoChanger_.setSize(0);
72 Info << "checkAndCalculate()" << endl;
75 Info<< "Time = " << engTime().theta() << endl
76 << "Adding zones to the engine mesh" << endl;
78 DynamicList<pointZone*> pz;
80 DynamicList<faceZone*> fz;
82 DynamicList<cellZone*> cz;
84 label nPointZones = 0;
89 # include "addPistonFacesPointZonesDeformingEngineMesh.H"
91 # include "addValveFaceZonesDeformingEngineMesh.H"
93 # include "addOutputCellsDeformingEngineMesh.H"
96 Info<< "Adding " << nPointZones << " point, "
97 << nFaceZones << " face zones and "
98 << nCellZones << " cell zones" << endl;
100 Info << boundary().size() << endl;
102 pz.setSize(nPointZones);
103 Info << "setSize pz" << endl;
104 fz.setSize(nFaceZones);
105 Info << "setSize fz" << endl;
106 cz.setSize(nCellZones);
107 Info << "setSize cz" << endl;
109 addZones(pz, fz, cz);
113 // Calculating the virtual positions of piston and valves
115 // setVirtualPositions();
117 // Write mesh and modifiers
119 Info << "virtualPistonPosition = " << virtualPistonPosition() << endl;
120 Info << "piston position = " << pistonPosition() << endl;
124 // ************************************************************************* //